[Solar-talk] help with apps
Jeff Surgeson
solar at 3hex.com
Thu Aug 10 08:13:47 PDT 2006
On Thursday 10 August 2006 16:17, Antti Holvikari wrote:
> On 8/10/06, Rodrigo Moraes <rodrigo.moraes at gmail.com> wrote:
> > On 8/10/06, Jeff Surgeson wrote:
> > > Hi Rodrigo, thanks for that however accessing the protected methods is
> > > not realy the issue, what I am battleing to get my head around is
> > > creating mutiple apps (user, news, product etc etc) and then "glueing"
> > > them together.
> >
> > I'm also interested to hear other people's approaches on this subject,
> > and I think this is a common dilemma after you have some apps. For
> > example, you have a controller to deal with products (fetch data,
> > build views), and then another one to build a store? It seems better
> > than put everything in one place and you can make the same store to
> > deal with different kinds of products without bloating it.
> >
> > The solution to tie them is something we have to think about: the
> > separated controllers need to "talk" to the main controller using a
> > public interface, and better after some tries is to find common names
> > for the API so all controllers use the same convention. The view
> > object must be the same for all controllers however, and this is the
> > part that most confuses me.
>
> I'm not sure what you're after. I think a gave an example of something
> like this for Jeff a while ago
> (http://lists.solarphp.com/pipermail/solar-talk/2006-July/000982.html).
Sorry was unable to follow any of that!
> If things start to get messy I think you should just extend some base
> app and instantiate your models there and use them in every app.
>
> Could you give a better or a more precise example of your "problem" :-).
Thanks I will try explain a bit better!
Basicly I have the following apps
User app: all this does is allow (list/edit/add) of the username/password
details used in Solar_Auth
News app:
Product app:
I then create a site app which sets up the solar.config.php and a index.php
file that sorts out include paths etc and starts solar sets up mysql db. The
site app has any static help/terms/contact forms pages etc.
I then using action links to include if needed a news, user, and product app.
Each app when called sets up and defines its own $_layout $layout_style etc
and I am able to overide the default style and layout of each app with
whatever the site app layout and style is automaticaly.
I just thought now in hind site that having each app as a standalone is not
nessasary as they are unlikely to be used on there own and realy only work as
part of a web site.
So either I have one huge app that handles all parts (not good) or I wanted a
way to have a base site app which then includes "module" apps for lack of
better word.
Also these module apps need to be extendable, for example a base user class
that handles the auth login stuff needed by all apps/sites and just include
that if thats all thats needed or extend it based on specific site needs,
additional user info, shipping info, banking details etc and then include the
extended user app which inherits the base user stuff.
Not any clearer is it? :-(
--
Jeff Surgeson / South Africa
More information about the solar-talk
mailing list