seekdestroy Posted February 4, 2011 Share Posted February 4, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/226720-oop-php-design/ Share on other sites More sharing options...
pornophobic Posted February 6, 2011 Share Posted February 6, 2011 http://www.killerphp.com/tutorials/object-oriented-php/ Quote Link to comment https://forums.phpfreaks.com/topic/226720-oop-php-design/#findComment-1170670 Share on other sites More sharing options...
Zyx Posted February 7, 2011 Share Posted February 7, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/226720-oop-php-design/#findComment-1170909 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.