A spot on reply. A broad brush to view it is to start from the database and 
create a model/controller/views for each table. That will take you pretty near 
where you want to go, and then you can start to combine things together.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 13 Jul 2010, at 10:16, nurvzy wrote:

> Ok, so the issue here is you're still thinking about your website/app
> as a basic procedural script.  Which isn't that hard to do, as that is
> kind of the life cycle of a standard HTTP request.  However, the trick
> here is to stop thinking about your website as your basic php
> procedural script, and start thinking of it in an Object Oriented
> manner.  This can be a tough thing to wrap your head around at first.
> It was for me, and everyone other developer I've talked to.  It's an
> odd thing, eventually it will all just click, like a light goes on
> above your head, and at least for me it was rather sudden.
> 
> I mean by Object Oriented, is thinking about the various actions,
> logic, and data types you want your website to manager/show/manipulate
> and describe them as objects in your mind.  What can a User do,
> (register, login, logout, view past orders, etc...)?  What can a Post
> do (create, edit, show most recent, etc...)?  What can a Download do
> (stream the content, share to facebook, etc...)?  These 'actions' that
> you can preform on an object will be your various functions.   Now
> that you've described all the objects in your application its now time
> to convert those objects into Models.  A model, in most cases, is a
> singular form of your object and is really in charge of handling all
> the data needed to describe that object (User, Post, Download).
> Controllers are the plural form of your objects, used to manage/
> combine/format groups of objects for various uses (Users, Posts,
> Downloads).
> 
> So, to answer your question, if you're describing something new, its
> best practice to create another model/controller pairing for the new
> object.  The beauty if CakePHP is the extreme ease it gives us to
> associate objects together.  This helps us make some really complex
> and intricate data structures from many smaller objects all put
> together.
> 
> I hope that helps,
> Nick
> 
> On Jul 13, 1:53 am, Tomfox Wiranata <tomfox.wiran...@gmail.com> wrote:
>> hi,
>> 
>> so far i used one controller/model for the whole user management
>> (login, logout, register, profile etc.).
>> 
>> now I am heading to a different milestone with my website, and the
>> user is not in focus anymore. so it makes sense to create a new
>> controller/model, right? but that seems more like a logical/
>> philosophical thing to me.
>> 
>> i guess technically it does not matter if i use 1 controller/model for
>> all or different ones. is that right? if not, when should i use
>> different ones?
>> 
>> thx :)
> 
> 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+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to