Saturday, September 27, 2008

Re: organise application structure for new project in cake

In answer to your questions...

1. Often I start by thinking about the urls I want in my app, since
I'm usually pretty picky about those things. That usually defines my
controllers and hence my models.
2. Once I have the controllers from step 1, I then know the routes
I'll have to use to get my dearly loved urls.
3. All depends on how you wish to implement... look at Cake's
components and helpers to see if they fit the bill. If not, you can
create your own.

4. You should use cake's db methods, they will make your life MUCH
easier.

It's possible to do what you want pretty quickly, but for me there was
a bit of a learning curve, and I spent more time debugging, googling,
reading documentation and scouring through the cake source code, than
I did actually developing my first project.

I suggest you start out by baking your models, controllers and views,
and just start editing the generated files.

Also, make sure you check out the Containable behavior for your
models.

Cheers,
Adam

On Sep 28, 2:39 am, "Markus Muschol" <devbluescr...@googlemail.com>
wrote:
> Hey CakePhp Friends,
>
> its my first post on the list but i really need help on creating this
> project.
>
> Ok here is the Situation:
> I have to programm a Web Application for publishing Events, Parties and some
> Photos.
> I created a database in Mysql and want to write this Application with the
> CakePHP Framework because i want to extend it later on.
> First i need a application structure for this "Thinking" Schema:
>
> Template Layout
> Breadcrump Navigation
> Left Menu
> Content
>
> Home
> Gallery
>  Latest Galleries
>  Picturelist with Pagination
>  Picture Detail View with Ajax Interface to scroll through the pictures
> (done in jquery)
> Events
>  Search
>  by Date
>  by City
>  by Capitalletter
>  Resultlist with Pagination
>  Show Latest
>  Today
>  Yesterday
>  Last Week
>  Last 4 Week
>  Last 2 Month
> Locations
>  List with Filter
>  by Category
>   Discos
>   Restaurants
>   Bars
>   etc.
>  by Letter
>  by City
>  Detail View
>  With Comments
> Some Static Pages
> Admin View with Login and some CRUD Actions
> Locations, Events, Galleries
>  add, edit, delete
>
> Ok thats it. Seems to be a little bit more complex than the samle blog
> sample isnt it ;)
>
> First Question: Is Cake the right framework to do this job ? I experimented
> a bit with the Zend Framework but this was far more complex than i thougt.
> I know php5 very well but thats not what i think a framework is about. I
> would have to write many components and helpers myself.
> I only want so set up the database and the helpers and then only use the
> framework components for the business logic.
> And i don't want to use other CMS Systems because i want control and
> overview about the whole logic of my application and because known CMS
> Systems often get exploited.
>
> Ok here we go.
> 1 How can i divide this Schema into modules, controllers and actions for
> cake?
> 2 What would be the best way to route such a application?
> 3 Which Cake components, helpers, etc. do i need to realize this?
> 3 Which components are given and which do i have to write myself ?
>
> Ok to the Database Setup.
> I have some relations between the tables. For example Gallery: Picture,
> Locations.
> Should i use the internal system of cake for relation modelling or should i
> use normal mysql statements with joins? Isnt this too slow ?
>
> A friend of mine made some templates and layouts for the site so i don't
> have to worry about the views.
>
> I want to realize this project in 2 Weeks. Is this realistic ?
>
> Regards
> Markus
--~--~---------~--~----~------------~-------~--~----~
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: