[Solar-talk] page controller organization

Leo Chiao leo.chiao at gmail.com
Mon Jan 28 06:53:25 CST 2008


James,
I guess my only concern with this setup is the potential for code
duplication. In my scenario where I would want an admin "module" and
front-end "module", I wouldn't want to create separate Models for both.

For example, say I have a controller named Products, for the admin area I
would want the standard CRUD whereas the front-end version of the Products
controller would just handle the display with different views and templates.

I originally sent this question accidentally to the svn list and Rodrigo
mentioned that there had been generic solutions to this where you extend the
front controller to handle this situation.


On Jan 28, 2008 6:37 AM, Kilbride, James P. <James.Kilbride at gd-ais.com>
wrote:

>  Leo,
>
> What I do for all of my controllers is 'Vendor' becomes 'Application'. So
> we have two different applications they are really their own 'vendors'. This
> means that I have
>
> Group1/
>     App/
>         Controller1.Group1/
>          Controller2.Group1/
>     Models/
> Group2/
>     App/
>          Controller1.Group2/
>          Controller2.Group2/
>     Models/
>
> Now I can deploy them seperately, they don't have to overlap, and I can
> control their URL's independently with different config files in different
> directories in the htdocs area.
>
> James Kilbride
>
>  ------------------------------
> *From:* solar-talk-bounces at lists.solarphp.com [mailto:
> solar-talk-bounces at lists.solarphp.com] *On Behalf Of *Leo Chiao
> *Sent:* Saturday, January 26, 2008 7:15 PM
> *To:* solar-talk at lists.solarphp.com
> *Subject:* [Solar-talk] page controller organization
>
> Hello all,
> First time posting to this list and had a basic question about Solar's
> directory structure.  I've recently built a simple site using Zend Framework
> and they have a notion of "modules" where related controllers are grouped
> together.  Is there support for this type of directory structure built-in to
> Solar?
>
> I couldn't find any mention of it in the docs.  The use case would be a
> scenario where you are building a site with a front-end url
> domain.com/controller/action  and an admin url with
> domain.com/admin/controller/action   With Zend, there is a "default"
> module which would work for the front-end and you would then create an
> "admin" module so you could have two controllers with the same name, but
> segregated into their own directory.
>
> As far as I can tell, the page controllers are just expected to be right
> underneath the App directory of your Vendor directory and there is no module
> organization so to speak.  Is there a recommended way of organizing the
> directory structure for what I am describing? Thanks.
>
> _______________________________________________
> Solar-talk mailing list
> Solar-talk at lists.solarphp.com
> http://mailman-mail3.webfaction.com/listinfo/solar-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman-mail3.webfaction.com/pipermail/solar-talk/attachments/20080128/5615e084/attachment.html


More information about the Solar-talk mailing list