Welcome Guest, Not a member yet? Register   Sign In
Backend Structure?
#1

[eluser]AlphaGirl[/eluser]
Hi,
i’m about to build the backend of a CI site and i’m bit confused about how to structure it.
It is not a huge site but it could expand in the future..
Would advise me to keep the 2 separate applications, like:
app/
front/
controllers/
models/
views/
etc…
back/
controllers/
models/
views/
etc…
system/
index.php

OR MAYBE IS BEST:

app/
controllers/
front/
back/
views/
front/
back/
keeping the same models, librarys etc..

Well, if you can give me your point of view i’d be glad.

Thanks a Lot!
#2

[eluser]tomcode[/eluser]
I'd work with two applications, for shared stuff You can use a common package.

For stuff not covered by the package link to the other application via symlinks or pseudo files :

filename : a_shared_file.php

inside

require path/to/the/original/application/a_shared_file.php
#3

[eluser]Aken[/eluser]
Both your suggested solutions are valid options. It's really up to you how much you want to separate the two.

For the first option, you'd need a second index.php file, renamed to something like backend.php, to point to your "back" application. CI cannot use two application folders with a single index.php file without modification.
#4

[eluser]AlphaGirl[/eluser]
Hi,
so i'll follow your way,
is it correct?
All under root folder:
application_front/
application_back/
images/
css/
js/
system/
index (php file pointing to application_front)
admin (php file pointing to application_back)

Thanks in advance.




Theme © iAndrew 2016 - Forum software by © MyBB