Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sale object in bus terminal project

Status
Not open for further replies.

yekta68

Programmer
Aug 30, 2010
2
IR
hi all

I work on bus terminal project.This project is for online bus ticket reservation or purchase it.

Is it necessary to have all of these classes:reservation,sale and ticket?
i feel reservation class is enough.please guide me about this problem and sale object for this purpose.
 
the answer is usually "it depends". however I would say in this case it's undoubtedly "no" a domain consisting of a single object doesn't have value.

you will have users who purchase a ticket for a trip on a bus. there are 4 entities right there (user, ticket, trip, bus). There will probably be more entities and definitely services as the process is discovered.

I recommend reading Domain Driven Design by Eric Evans to get a better feel of how you can design the code around the business problem.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top