Hey,
Although I've been using classes and object for quite a while now I've
never actually programmed proper OO code yet. It ofcourse depends on
what you call proper OO code. I have been seperating parts of the
website. Like a user class, guestbook class, etc. But I've been
putting all the code in one single class instead of of spreiding it.
Since a short while I've been reading up on OOP and now I am trying to
actually do things the way they should be done to make a nice
maintainable module. Which in fact means that I'm trying to stick to
some rules: Don't repeat yourself, seperation of concerns,
encapsulation, etc.
I've created (not finished just started it) a user system, this
according to the mvc pattern. The names for the classes aren't perfect
(user should actually be named userController, and userData should be
named user, etc.).
Could any of you guys have a look and see if I'm going in the right
direction?
The few classes (put in a single file for the sake of easy reading)
can be found here: http://web-develop.nl/user_oop.phps
Hope you guys can give me some useful comments.
Thanks
Although I've been using classes and object for quite a while now I've
never actually programmed proper OO code yet. It ofcourse depends on
what you call proper OO code. I have been seperating parts of the
website. Like a user class, guestbook class, etc. But I've been
putting all the code in one single class instead of of spreiding it.
Since a short while I've been reading up on OOP and now I am trying to
actually do things the way they should be done to make a nice
maintainable module. Which in fact means that I'm trying to stick to
some rules: Don't repeat yourself, seperation of concerns,
encapsulation, etc.
I've created (not finished just started it) a user system, this
according to the mvc pattern. The names for the classes aren't perfect
(user should actually be named userController, and userData should be
named user, etc.).
Could any of you guys have a look and see if I'm going in the right
direction?
The few classes (put in a single file for the sake of easy reading)
can be found here: http://web-develop.nl/user_oop.phps
Hope you guys can give me some useful comments.
Thanks
Comment