Jump to content

Recommended Posts

Hey,

 

Well I'm fairly new to PHP, but I've got experience of Java and  C++ and so OOP.

 

However, for some reason I can't quite get my head around OOP with PHP and the best ways to use it.

 

I'm trying to create a website system which allows patient and drug data to be stored, and these are used together to create a prescription.

 

I have made a small prototype which is fairly procedural, I'm unsure on how to design the system.

 

Atm, for example there is a form1.php file which allows patient data to be entered, data sent to process1.php, which saves to db etc.

 

Would it be best to have 1 php file for each data set? e.g. patient.php (then the saving/search/edit patient forms use this 1 file), then two other files for drugs and prescription?

 

Some advice and direction would be really greatful as I think I'm thinking about it the wrong way.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/226720-oop-php-design/
Share on other sites

The general OOP rules are universal. If you have an experience with Java, you should already know, how to design an object-oriented application in PHP. In addition, many features look exactly the same, so there should be even less confusion.

 

The most important difference are namespaces, and class autoloading, but they are not directly related to the OOP design. Another useful PHP-specific thing that might be helpful can be found here:

 

- http://groups.google.com/group/php-standards/web/psr-0-final-proposal

Link to comment
https://forums.phpfreaks.com/topic/226720-oop-php-design/#findComment-1170909
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.