Welcome Guest, Not a member yet? Register   Sign In
Best Approche to Web Application
#6

@mubahmohamed

By default CodeIgniter supports a single-application skeleton. It provides two possible choices:

- two complete separate sites for the front-end and the administration panel. I don't prefer such a way, because it leads to code duplication and maintenance issues as a result.
- one application that could use a separate directory for the administration part. If you use HMVC, every module could have an administration-specific controller-class and its corresponding views to be placed within admin/ subdirectories - like the old PyroCMC did. Some hacks are needed, for example how separate error404 pages to be shown for the front-end and for the administration to be shown. I used this way in the past, but I abandoned it because of two reasons: the designer has difficulties on orientation within the file structure; not convenient for multi-language sites (a long explanation).

Years ago I saw a multi-site skeleton for CodeIgniter which I liked: Codeigniter Cross Modular Extensions - XHMVC, https://bitbucket.org/xperez/codeigniter...ions-xhmvc, http://www.4amics.com/x.perez/2013/06/xh...xtensions/ The idea is to have a way two sites to share partially common code. For example, most of the models, libraries, helpers, could be accessible in the front-end and administration panel without duplication.

The mentioned solution is old, but I grabbed the idea and implemented it within my starter application https://github.com/ivantcholakov/starter...-edition-4
It has "front" and "admin" applications, under the directory platform/common you will find everything that is shared between the applications - configuration and code. The directory vendor/ (created by Composer) is used by both of the applications too.
Reply


Messages In This Thread
RE: Best Approche to Web Application - by PaulD - 11-27-2016, 10:28 AM
RE: Best Approche to Web Application - by alenn - 02-06-2017, 01:27 AM
RE: Best Approche to Web Application - by PaulD - 02-06-2017, 12:08 PM
RE: Best Approche to Web Application - by ivantcholakov - 02-06-2017, 07:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB