|
Re: Best practices in a thin-controller application: msg#00134php.zend.framework.mvc
HI David, David Mintz wrote: Which brings me to another question, maybe sort of OT. If your model's constructor requires an id parameter, how do you instantiate a "blank" object to be populated with data provided by the user and then -- excuse me for thinking database -- inserted into a table? I am thinking of RDMSes that have auto-incrementing.You find out the id after the insert. One possibility would be to use a Special Case [1] object to encapsulate the "blank object" concept. The special case should be interchangeable with the the "real" object. [1] http://martinfowler.com/eaaCatalog/specialCase.html Regards, Bryce Lohr -- |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Best practices in a thin-controller application: 00134, Adam Jensen |
|---|---|
| Next by Date: | Zend_Test: 00134, Steven Brown |
| Previous by Thread: | Re: Best practices in a thin-controller applicationi: 00134, Bryce Lohr |
| Next by Thread: | Re: Best practices in a thin-controller application: 00134, David Mintz |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |