On Fri, Jul 10, 2009 at 5:43 AM, Netik<[email protected]> wrote:
>
> Hi everyone
> I'm pretty new to cakephp or the model view controller and oop
> programming in general.
>
> However, i see the big advantages of cakephp and i really like it, it
> just makes fun.
> Howevery, i still have some questions about cakephp or MVC in general:
>
> If i want to make a website...let's say, it contains a welcome page, a
> blog, some news and a section with details about other websites/
> products of me. And some of the common pages like a contact form.
>
> How many controllers would you create?
>
> -NewsController
> -BlogController
> -ProductsController
> -WebsitesController
>
> I mean, is ridiculous to create a contactController just for an index
> and sendEmail action and a welcomeController for showing 1 page, isn't
> it?

Why would it be ridiculous?  Controllers should be sparse, and since
you're using controllers for everything else, the next person (or you,
in 12 months, after you've added a 10 more controllers), doesn't have
to guess where you put the contact actions.

If you're referring to the homepage of your site, just create
\app\views\pages\home.ctp

> And the other question is about an admin section/backend. I have seen
> the nice function "admin_routing".
> So i could make an admin_add/delete/edit/index function for my news,
> blog, products and website controllers. Howevery, i would like to have
> a "default" or "home/welcome" page in the adminpanel that shows some
> general information like "all the blog posts/websites/products/news i
> posted in the last week" and how many users are actually on the page.

If you're thinking about doing a dashboard, take a look at this:
http://teknoid.wordpress.com/2008/12/16/how-to-build-a-dashboard-for-your-application-in-cakephp/

(^^^ great blog, btw)

> PS. Sorry for my english, if you can speak german i would prefer :)

Your post was fine; no worries.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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