[Agavi-Users] agavi, developing different versions of app

11 views
Skip to first unread message

Kacper Stasik

unread,
Mar 14, 2012, 4:55:47 PM3/14/12
to us...@lists.agavi.org
Hello,

Today I have faced difficult problem. I have been developing application based on agavi for couple of years and regularly more people are interested to use it. Of course everybody wants to change something, add some adjustments and some features are specific for selected people. Right now file structure of my app looks like this (in terms of agavi i have created two apps):

+ backend
----- config.php
----- agavi stuff...
+ frontend
----- config.php
----- agavi stuff...
+ public_html
----- index.php (dispach frontend)
----- admin/index.php (dispatch backend)

I don't know if problem is strictly connected with agavi but I want to be able to have the same base code for each interested person and be able to change only selected files (if it is possible to extend classes) like in kohana framework or magento.

The perfect solution for me would be if i could create git repository for each person and install my app as two submodules[git] (frontend, backend) that would include phing build file, list of sql migrations, tests etc. I would like to be able to add two folders (for example "local-backend", "local-frontend") to this repository where i could overwrite/extend selected files.

Is it possible to create such project using agavi? Do you have any ideas how to solve this problem? I would appreciate any help.
_______________________________________________
users mailing list
us...@lists.agavi.org
http://lists.agavi.org/mailman/listinfo/users

David Zülke

unread,
Mar 15, 2012, 12:02:06 PM3/15/12
to Agavi Users Mailing List
Hello Kacper,

that indeed is a relatively complex problem and not something Agavi is designed for. The biggest problem is the module directory allowing just one module since there isn't a registry of modules or something like that.

You should be able to override a couple of methods in AgaviController, like initializeModule() and so forth, but of course that's not really what you're looking for.

What's easier is custom configuration files, templates and so forth, since you can do includes or lookup orders there. Have a look at these commits (in order, the last one fixes the first two):

https://github.com/digitarald/redracer/commit/961c6ac0528f148b75ae2a02de39a573b82678f3
https://github.com/digitarald/redracer/commit/a56e49396f8f6189d6b5ec252ab5e6ca3f7e2438
https://github.com/digitarald/redracer/commit/30cd893d6c2cbcda8f34be59dd723bf6e5c83d97

Maybe that's a start. For custom modules, without modifying Agavi itself, I'm afraid I can't offer a solution (although it's definitely doable).

Hope that helps at least a little,

David

Reply all
Reply to author
Forward
0 new messages