On Jul 10, 2006, at 4:44 PM, [EMAIL PROTECTED] wrote:

>
> I doing research for a new framework for my project, I came across the
> concept of the Hierarchical Model View Controler pattern.  I've only
> found one php framework that claims to support this (Claw).  It  
> makes a
> whole lot of sense to me and I was wondering if Cake supported this  
> (or
> could it be extended easily if I needed to).
>
> If this is unfamiliar concept, it means basicaly that you can easily
> embed MVC "components" inside one another.  Part of what makes this
> work is a method for chaining them together and allowing you to  
> specify
> on the URL arguments for multiple components.
>
> So if you had a page that contained an MVC component for "Lead" and  
> one
> for "Notes", you could do things like this:
> http://domain.com/view.php/lead/id.123/notes/page.2 which would give
> you the lead of id 123 with the second page of notes.
>
> Does that make any sense?

Not to me, at least. :)

> The other concern I have is with how Cake interfaces to the database.
> I've always thought it didnt make a lot of sense to directly map
> objects to the database -- they just arent the same thing, after all.
> After reading some articles on it, I realize I am not the only one to
> think this.

I've always thought of database tables as objects that relate to an  
application. Some tables arent (like join tables), but for the most  
part, a table should reflect an object or domain in your application.

That's why they call them RDBMS's after all, but everyone looks at  
things differently.

> I figure for 90% of my project, the typical Object Relational Mapping
> method would probably work fine, to create the CRUD type pages needed.
> But that last 10% would be a total bitch to create.  This is the same
> problem I have with Codecharge Studio.

What sort of things are happening in the 10%?

> It seems to me that the best method would be not to try and make
> everything in teh database into an object, and maybe use a combination
> of objects and list processing (after all, database tables are just
> lists/sets of data, not objects).

Well, Cake actually returns results in array form right now.

> So for example, in cake, is it goign to create an object for every row
> I fetch from the database?

No. It will create an object that fetches data from your store, though.

>   How easy is it to customize if I want to
> have my object for a table but internaly it manages the rows as an
> array?

You can always override (or extend) methods or write your own model  
methods if you want to. Its all OOP. Besides, I think Cake returns  
data how you'd like. Have you used it yet?

> Can cake create "smart" SQL queries that will pull all the data needed
> in one query that ends up as several objects?

Not sure what you mean by "smart", but models can be associated in  
Cake. So if I tell it my Supervisor hasMany Peons, bringing up a  
Supervisor record could automagically bring up its associated Peon  
records as well.

-- J

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to