Welcome Guest, Not a member yet? Register   Sign In
Sharing between tightly coupled applications or maybe HMVC?
#1

[eluser]Unknown[/eluser]
I am new to OOP (I have written more assembly than OOP code), and I have chosen CI for my next big project (after having looked at a lot of other PHP frameworks, it was really obvious that CI was by far the best in a number of categories).

I've read some old posts about sharing resources between multiple applications. Though, with the arrival of CI 2.*, some things have changed which might make the techniques described previously obsolete, or inefficient.

Basically, I will have a central database ans single CI installation serving multiple applications. Each application can look very different from the others, and operate using virtually the same data as the others as well (with some application specific tables).

Each of these applications will share a number of models (as they are largely working on the same data), and all of them would be subordinate to the "master" authentication system (e.g. different users will have access to one or more applications, and each application will have its own set of application specific permissions, all of which is controlled by a custom authentication system library/application). The functionality of each application could be very similar or wildly different, so they will each have their own application specific controllers and any shared functionality will be handled according to CI convention using libraries & helpers.

Users of one application will act on the same data as the other applications, but those users don't ever have to even know that the other applications exist.

My central question is - how should I structure this?

My current thinking is that each applications would have its own application folder (following the CI 2.* convention, each application folder would be outside of the CI system folder).

But how would I go about making each application subordinate to the authentication library/system (which will have its own models and controllers) without having to duplicate code across all the applicaitons? And how could they share some models, while still using their own? Along with sharing other kinds of resources and maintaining their own as well?

I think what I basically have here is a single "system" with several different "modules" (interfaces). Or, rather, a single system with several sub-systems (or sub-domains).

Given that - what would be the best way of doing this? Is there a specific architecture or extension you would recommend? Maybe something like Modular Extensions - HMVC would work?

My goal is to reduce duplication so that I don't have, say, 6 duplicate "Product" models across all the applications.




Theme © iAndrew 2016 - Forum software by © MyBB