Welcome Guest, Not a member yet? Register   Sign In
develop simple cms
#1

[eluser]Unknown[/eluser]
Hi there people!

I've been using CI for a while and i'm thinking on start a personal quest project (Big Grin), as you can see on the post subject.

I've been reading and surfing google searching what would be the best way to structure it, but now i have too much info xD

The idea is to make a wordpress like CMS, more simple of course... Now, what's the best option?

- Make some multiapp site with
-Application/
- FrontEnd
- Backend
- Install (deleteable)
The problem is that the three application share lots of resources (config, routes, models), almost all except controllers and views.

- Use HMVC with two modules (frontend and backend). I know there are multiple combinations among CI_Controllers and MX_controllers (used like widgets), two applications like upper point with modules, or something like that... i'm lost at this side.

- Simple CI project with controllers (controllers/admin/some_stuff and controllers/public/public_stuff) and views separated in folders (templates)...

Well, maybe i only needed to write a little for make clear some ideas, but i hope you can turn the light on, or at least, make a little lighter my darkness xD

Thanks in advice!!!

P.D.: Sorry if there is any kind of forum rule violation!
#2

[eluser]GrahamDj28[/eluser]
Hi,

I am also developing a "simple CMS". But a simple CMS just does not exist.
It will always take a lot of time to get where you want to go.

What does work for me is the HMVC pattern. But I do not use MX_Controller.
I have come up with my own system that utilizes the native functions of CI. Like loading resources, also resources located in my own applications. And applications are the secret in keeping my CMS simple. It also keeps my URL's nice and clean.

Every part of my CMS is divided into loose applications. And each application has a specific purpose. One application handles CMS users. Al this does is take care of creating, editing and deleting users. Another application handles pages that are created for the website. Another the content belonging to a page. Each application is built with it's own controller, model and views. But can also have it's own helpers, libraries or configuration files. As long as it's all related to the application. Resources that applications share are placed in the normal CI locations (helpers,libraries, configs) One shared resource is the form builder that I made. Another is the handling of assets like your CSS an JS files.
I also make use of a base Model that makes writing queries as easy as 1,2,3. Al models, no matter the location and or application it belongs to, they are always extended from the base Model. Applications are called from one of the main controllers I have. Frontend and Backend. And an application can load another application or a single resource of an application.

And handling the applications is only one thing. Setting up a system to handle the main framework of your CMS and frontend is just as important to get right. And with framework i mean every view/template/model/resource that needs loading on every page call.

I hope it is clear how my structure is setup. I'm not always that good in explaining my setup. But it works for me, and I seldom get lost in my own code. Even returning after months to the code of an application is no problem. And it's not always commented Tongue




Theme © iAndrew 2016 - Forum software by © MyBB