I have been creating various websites for hire the past few months.
Most have been basic logins, shopping carts, etc. And they have all
been using PHP and the SMARTY template system. I have been fuddling
around with CakePHP for about 10 hours already the past few days to
get a feel for it. I have a BASIC understanding things like ACL's and
using bake and various other shortcuts CakePHP offers. I understand
how the MVC works, etc.

I have taken up a project on my own and have decided to use CakePHP. I
have most of the bits and pieces figured out, however one thing I
cannot get past is how I will design it. Let me explain.

The site will funciton similar to topix.com but have a different goal
in mind. I plan on creating a cities database table and assigning it a
unique id for each city. Then a stories table and have each story use
a foreign key to link to an id for the city. Then I plan to have a
comments table where each comment id links to a story id. Each user
will be assigned a network_id that relates to the city they belong
to.

The views is what I am having trouble with. Should I create a default
template and use WHERE clauses to display the stories. For example,
create a where clause like "SELECT LAST 5 STORIES FROM stories WHERE
NETWORK_ID=USER_ID"?

Or should I have a view for each city, like a view for Los Angeles and
a view for Miami?

Again to restate the problem, I guess I am just confused about how I
want to do the views. I want every persons home page to look the same
with the same functionality, but just with stories in their area
only...

Any advice?

Thank you veryyyy much for any helpful tips.


P.S. I am using the ACL to allow write access to the stories of users
of the same city only. This should not be a problem.


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to