• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best way to project, plan and structure an app with CI


from which side do you start building and app?

I mean
given that you already know which the users areas and interactions are and also you already have structured the DB,

do you start with empty controllers and views setting up the navigation and routes?
Or what?

Thank you for sharing your approach


Hi, usually I start with weak (simple) entities from the database, creating its models and domain classes.

Then I start creating controllers with empty methods (future implementation) to build like a skeleton, in other words, what will be the controller responsibilities, or "actions".

Then views... HTML markup

Oh, along with these activities I'll certainly create some core files like MY_Controller, MY_Model and MY_Log, because I have own stuff inside these files.


That's a loaded question. There are so many approaches that can be taken. I like to have complete documentation/screen flow of how the whole application will function (including features) and work (this also includes the baseline database and all tables).

I'll try not to get to wordy...

One approach I take,
A. I create all the screens in html/js/css (I usually use a free bootstrap theme such as https://github.com/ColorlibHQ/gentelella )
- I then determine the default screens and how I can make useful reusable view parts (i.e. header and footer views).
B. I then determine the security approach and levels that will be used throughout the system (user/administrator access)
B. I then determine how I will create models. I prefer to create models to do specific things that can be reused throughout the system.
- for example...Userexist()
C. I then begin to code moving forward with the first screen and attaching all necessary code behind.

Likewise similar to php_rocs I use a top down approach working from the screens
back down into the app step by step defining the problems to be solved.

The screens can tell you a lot about the app for declaring variables etc;

These will also map into your models and controllers.

keep in mind KISS and DRY (Keep it simple stupid and do not repeat yourself).
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )



Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.