Welcome Guest, Not a member yet? Register   Sign In
Best way to design OO classes
#2

[eluser]mihailt[/eluser]
in my point of view, you need to define your Customer class, and model will be responsible for fetching,processing and saving changes. in simple words you need to follow Data Mapper pattern.

so in model you would have methods like, fetch($params),proccess($object),save($object).
and your customer class would probably be a custom data type, with get and set methods.

that way there will be no difference with working with one customer entry or many.

take a look at this link : http://martinfowler.com/eaaCatalog/dataMapper.html


Messages In This Thread
Best way to design OO classes - by El Forum - 12-02-2008, 10:43 AM
Best way to design OO classes - by El Forum - 12-03-2008, 03:53 AM
Best way to design OO classes - by El Forum - 12-03-2008, 05:09 PM
Best way to design OO classes - by El Forum - 12-08-2008, 07:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB