Hi guys,
I just want to know HOW do I start in OOP. I'll explain it further. I am trying to create systems and programs using OOP. But I have a little problem about this. I don't know what classes/objects should I create. Like for example, I will create a reservation system for a hotel. I don't know what objects should I make. Can I use the tables in my database as a reference? Like if I have a "users" table, I should create an object of "users"? I know some basic UML but really can't come up with something because I don't know where to start. Hope anyone could help me cause I've been searching for so long and ended up with nothing but concepts and "an already given objects" examples.
Thanks.
Loading
Jean PaulPosted Feb 8, 2011, 10:17 AM
(by using bicycle for a while, you will enjoy a motor bike :))
The OOPs provides Encapsulation, Inheritance, Polymorphism etc. which are down the line giving reusable,
structured and easily maintainable code. OOPs also provides us to apply Object Oriented Extensions like
Design Patterns.
If you are in the world of .Net, going with the OOPs way you can make use of many frameworks which are
build on OOPs like Enterprise Library, Spring.Net, Ninject etc.
Regarding the tables, you could go for some ORM (Object Relational Mapping) frameworks like ADO.NET Entity Framework
that automatically creates your table schema. It helps you in cutting down the tedious CRUD code creation and management.
Hope this could slightly touch your queries. Please let us know if you have further doubts.
Jirr MeynorPosted Feb 14, 2011, 12:58 AM