Thursday, February 2, 2012

Re: Different frontend and backend controllers

Use plugins. In my projects I have an "admin" plugin, which works
wonderfully and I don't have to deal with prefixes, which I also
dislike.

On Feb 2, 10:05 am, Thaissa Mendes <thaissa.men...@gmail.com> wrote:
> Depends on how the app is built. I make backend and frontend
> separately, so backend would have list/add/edit/delete methods, and
> frontend only "show" and stuff like that. I have been working like
> that for a few years and never had to duplicate any code.
>
>
>
>
>
>
>
> On Thu, Feb 2, 2012 at 6:59 PM, euromark <dereurom...@googlemail.com> wrote:
> > most would argue that it helps to keep it DRY to have all prefixed
> > ones in the same controller
> > in many cases the action is pretty identical, anyway
> > or the views - or both
>
> > On 2 Feb., 18:49, Thaissa Mendes <thaissa.men...@gmail.com> wrote:
> >> It isn't a solution, but it's a start! Thanks!
>
> >> On Thu, Feb 2, 2012 at 6:07 PM, Tilen Majerle <tilen.maje...@gmail.com> wrote:
> >> > just simply extend pathy for controllers with App::build()
> >> > --
> >> > Lep pozdrav, Tilen Majerle
> >> >http://majerle.eu
>
> >> > 2012/2/2 Thaissa Mendes <thaissa.men...@gmail.com>
>
> >> >> Hi all,
>
> >> >> I've been using CakePHP for 3-4 years, and I just downloaded and
> >> >> started to check the 2.0 version.
>
> >> >> One thing that I didn't like about 1.x version, and apparently didn't
> >> >> change on 2.0, is the prefix routing. IMO, backend and frontend
> >> >> methods on the same controller isn't a good idea. So, on 1.x, I made
> >> >> some changes on the core, allowing me to have a different folder
> >> >> inside controllers directory, called "admin", containing the backend
> >> >> controllers. And all of them extending an "AdminController", where I
> >> >> created a lot of default methods (index, add, edit, etc), which made
> >> >> my life easier.
>
> >> >> Now, the question: is there any way I can keep using two different
> >> >> controllers, with the same name, but different folders, for frontend
> >> >> and backend, on 2.0, without changing Cake's core again?
>
> >> >> Thanks,
>
> >> >> Thaissa.
>
> >> >> --
> >> >> Our newest site for the community: CakePHP Video Tutorials
> >> >>http://tv.cakephp.org
> >> >> Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> >> >> others with their CakePHP related questions.
>
> >> >> To unsubscribe from this group, send email to
> >> >> cake-php+unsubscribe@googlegroups.com For more options, visit this group
> >> >> athttp://groups.google.com/group/cake-php
>
> >> > --
> >> > Our newest site for the community: CakePHP Video Tutorials
> >> >http://tv.cakephp.org
> >> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> >> > others with their CakePHP related questions.
>
> >> > 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
>
> > --
> > Our newest site for the community: CakePHP Video Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


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

No comments: