Thursday, July 1, 2010

Re: Need CSV import: best practices?

without details we can only speculate

but we all agree that the model should process the imported data
if we open and parse the files the models as well, is not that clear.
maybe its cleaner to to that in the "import" action" and pass the data
to the model.


On 30 Jun., 16:23, Shaz <shazam...@gmail.com> wrote:
> CakePHP follows the MVC design pattern - most of the heavy lifting
> should be done in the model with the controller just being the
> intermediary between the model and view.
>
> Remember: Fat Model, Skinny Controllerhttp://teknoid.wordpress.com/2009/01/06/another-way-to-think-about-mvc/
>
> On Jun 30, 12:27 pm, Rick Dane <r.dane1...@gmail.com> wrote:
>
>
>
> > This should all be in the controller as far as I can tell, cakephp
> > seems to want everything in the control with the model just being
> > representative of the database, so I believe the model wouldn't come
> > into play until you are uploading the csv to the database
>
> > On Jun 30, 2:49 am, euromark <dereurom...@googlemail.com> wrote:
>
> > > i would use a library (lib) for cake1.3 (those can then use vendor
> > > files if neccessary)
>
> > > does it have to be in a model? or could that happen in the controller?
>
> > > On 30 Jun., 11:40, Ernesto <e.fanz...@gmail.com> wrote:
>
> > > > Hello.
> > > > i need to import data from a CSV file in two of my app's model.
>
> > > > what's the best place to code the import routine?
> > > > - a behavior
> > > > - a vendor class
> > > > - appModel

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: