Welcome Guest, Not a member yet? Register   Sign In
Splitting CI into two different apps
#1

[eluser]codeboy[/eluser]
We have developed an eLearning application using CI that has both customer facing and internal (admin and other) modules (basically different controllers). There are some library and helper files that are common between the two modules.

We now want to split these two modules into their own CI applications (with different URL's), while they share the same common database, and for the two apps to talk to each other using web services. The reasoning for the split is so that we could outsource the development and maintenance of the customer facing modules while we do some parallel development of the internal modules.

I am looking for some feedback or suggestions on what the right architecture should be (mainly around the common files and helpers that are shared between the two apps).

Any help is highly appreciated.

Thanks!
#2

[eluser]GChester[/eluser]
We have a similar need.. Subscribing...
#3

[eluser]Aken[/eluser]
How do you intend on accessing the two applications? Are they going to share the same domain, but different access points (such as example.com, and example.com/admin) or do you want to separate the domains entirely?
#4

[eluser]codeboy[/eluser]
One of them is going to be a sub-domain. So our main domain would be www.domain.com and the other would be a subdomain as in admin.domain.com, which essentially means they are two different CI applications.

Thanks Aken!
#5

[eluser]Patrick Reck[/eluser]
Either separate them into two different CodeIgniter installations, or use the HMVC patterns to create independent modules
#6

[eluser]xerobytez[/eluser]
There are several ways to go about this but since your admin panel and frontend share resources I would simply create 2 directories in /application/controllers/. One for the admin and one for the frontend. Then use .htaccess to route everything where it needs to go.

The other option would be to create 2 different application directories and 2 different index.php bootstraps pointing to their respective application directory. The plus side is both applications could run off of the same core but you would either have to have 2 copies of the shared files in each application directory or place them in the /system/helpers and /system/libraries directories where they can be access by both applications.

Good luck with the project
#7

[eluser]codeboy[/eluser]
[quote author="xerobytez" date="1358992612"]

The other option would be to create 2 different application directories and 2 different index.php bootstraps pointing to their respective application directory. The plus side is both applications could run off of the same core but you would either have to have 2 copies of the shared files in each application directory or place them in the /system/helpers and /system/libraries directories where they can be access by both applications.

Good luck with the project[/quote]

@patrick Reck - I wanted to stay away from the two different codeigniter installs. I liked the idea of HMVC, but it still did not let me outsource one part of the app without going through hoops! (or atleast that is how I understood it Smile)

@xerobytez - Thanks! That is what I ended up doing. I also followed Phil Sturgeon's advice of putting all the common files in a shared application package and loading them from both of my apps.




Theme © iAndrew 2016 - Forum software by © MyBB