Welcome to WebmasterWorld Guest from 188.8.131.52 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Accredited PayPal World Seller
OOP in web development Hevymetal msg:627302 9:01 am on Sep 5, 2004 (gmt 0) Hi
I know the basics of
object oriented programming but i don't know how and where to use OOP in web development - lets say in PHP language.
Can someone describe me a simple class diagram of a web project - its variables, methods and the description of this object itself.
mattglet msg:627303 2:15 pm on Sep 5, 2004 (gmt 0)
You might have some better luck in the PHP Forum [ webmasterworld.com]. Easy_Coder msg:627304 3:21 pm on Sep 5, 2004 (gmt 0)
An example... and I'm not sure if php supports objects would be:
A Customer Object that is capable of managing all functions relating to a customer. Here's brief listing of items you'd want to consider for a customer object:
- Save Method
- Update Method - Delete Method
- ShopperID Property
- CustomerID Property - FirstName Property - LastName Property - Address Property - City Property - State Property - Zip Property Hevymetal msg:627305 7:24 pm on Sep 5, 2004 (gmt 0)
Thank you - i'll go try that other forum too then. danieljean msg:627306 12:22 am on Sep 6, 2004 (gmt 0)
One of the main design patterns in OOP for the web is the MVC pattern. Struts is one I'm familiar with in Java, but a search for "PHP MVC framework" yields a few results.
There are a few patterns that are incredibly useful in more complex web development projects, and I can't for the life of me understand why/how someone would use procedural code for the same tasks. MVC however is the best place to start.
Have fun! :)