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

[eluser]yoX64[/eluser]
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!
#2

[eluser]xtremer360[/eluser]
To be honest, this is a preference. There's nothing wrong with using two application folders.
#3

[eluser]yoX64[/eluser]
I see... Thank you!
#4

[eluser]CroNiX[/eluser]
I just create an admin dir in:
/controllers/admin/
/views/admin/
/models/admin/

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

[eluser]yoX64[/eluser]
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.
#6

[eluser]ivantcholakov[/eluser]
@yoX64

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

[eluser]CroNiX[/eluser]
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.
#8

[eluser]yoX64[/eluser]
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...
#9

[eluser]ivantcholakov[/eluser]
@yoX64

http://ellislab.com/forums/viewthread/242762/
#10

[eluser]yoX64[/eluser]
@ivantcholakov

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




Theme © iAndrew 2016 - Forum software by © MyBB