Welcome Guest, Not a member yet? Register   Sign In
Pros and cons using two applications

Hello world!

I am currently developing a CMS in CodeIgniter and I have a small dilemma:

Should I use two application folders(for admin and client) or just one application folder and organize controllers, models and views in subfolders?

Thank you!

To be honest, this is a preference. There's nothing wrong with using two application folders.

I see... Thank you!

I just create an admin dir in:

I don't see admin as a separate application. Just a different level of the same one.

Okay, but if I use two applications it affects the performance or it has some downsides? Because the way I see it, the admin is an "island" with stuff on it and the client side is another "island" with stuff on it; and there are bridges between them. I mean, I think that using two applications the whole CMS is better organized for future developers.


Do you know a way how to implement your site with two applications? Can you do it?

I haven't used 2 separate application folders, but it seems they wouldn't be able to share any models/libraries/etc with each other since each has it's own separate structure and the only code they share is the base system dir. The docs mention each application would have it's own bootstrap file (index.php) and within that you define which "application" directory to use. I use some of the same models/libraries on both the frontend and backend, so want to use the same codebase for both and not separate them. Maybe your requirements are different, but you mentioned "bridges between them" which doesn't seem possible unless you want to duplicate some code in both applications.

If you are in application A and do $this->load->library('some_library'), it's going to load it from /application/a/libraries.
If you are in application B and do $this->load->library('some_library'), it's going to load it from /application/b/libraries.

Anything in application/blah/admin dir is enough separation for our design team which works on a fairly large complex national real estate site.

If you choose to go the separate application route, let us know how it goes. I'm curious how it would work and whether or not they can share models/libraries/etc between them.

I always used two applications on websites with administrator like this in the root folder: admin/application and application; it worked just fine, no problems; I also worked on websites that have the structure you talked about; but I was thinking what could it be the best and efficient choice for an open source cms on which developers should learn fast the structure and use it easily.

By "bridges" mainly I meant to databases. Because basically the admin panel manipulates the content for the front-end side.

I also plan on having themes and modules, and for themes I thought in view I should have only folders with themes for front-end. For modules, also there is a part for admin and a part for front-end and maybe that will make a mess to put all of them in one application.

Maybe when the website is small and simple, things aren't messy if there are in one application, but when you have a big website, with modularity, themes and other possible features it's a bit tricky...




thank you for the link! I'll keep that in mind

Theme © iAndrew 2016 - Forum software by © MyBB