Welcome Guest, Not a member yet? Register   Sign In
Seeking CI Dev Recommendations
#1

[eluser]rherriman[/eluser]
Greetings all. I have a bit of a code structuring/deployment issue that I'm hoping to get some direction on.

First, some background information. I've been the sole developer for an eCommerce platform for more than a year now, and as you can probably infer from my presence here, it was built using CodeIgniter. Smile It's been absolutely fantastic, and made developing in PHP far more bearable than I imagined was possible. In fact, it was pretty rewarding! Kudos.

However, the intention was always for this application to power the sites of multiple clients. At the time of this writing, we have three clients on board; one has already launched. As you no doubt know, different clients have different needs. This is reflected throughout my codebase. I've kept it flexible, but always had in mind that certain files would inevitably need to be modified to suit the client (views and configs). Clients may also need additional functionality that OTHER clients will never need, but of course these cases can be remedied by additional controllers, models, and so forth.

For sanity's sake, and the obvious practical benefit, I would rather do nearly all of my development in a "core" repository, devoid of any client branding, special controllers, etc. The best way I can think of to do this, is to add a third "layer" in addition to system and application. That way, Loader (et al) would look for the client-specific version of a file first, the core-application version second, and finally the built-in CI version last. This should work for models, views, controllers, libraries, config files... whatever.

That way, if a feature needs to be implemented or a bug needs to be fixed in the core application, I can fix it in one location, and simply pull the changes to the various client sites/repos when the time comes to upgrade them. Every client stays in sync with core.

But what is the best way to accomplish this? When last I looked into this issue months ago, it looked like packages were the answer. After digging a little deeper though, it became obvious that they were not quite what I expected. And judging by issue #170 at github (https://github.com/EllisLab/CodeIgniter/issues/170) and some recommendations at UserVoice, it appears that the situation is unchanged.

If I cannot implement the core application as a package, how would you suggest that I go about accomplishing these goals?

Thanks!

- ryan




Theme © iAndrew 2016 - Forum software by © MyBB