• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
App Structure

#1
[eluser]Unknown[/eluser]
Hi,

Just a "common" contribution for you all out there starting CI and to anyone confused about how to make ur CI more little bit secure... this is how we do it, of course u might want to put it in more secure part in ur server.. CI allows u to do that.. u know, its just PHP u can hack in to if u need to..

Code:
<root>
|
|__ public/
     |
     |__ .htaccess
     |__ index.php
|
|__ assets/
     |
     |__ default
         |
         |__ css/
         |__ images/
     |
     |__ mod_sales_inventory/
         |
         |__ css/
         |__ images/
         |__ javascripts/
         |__ inc/
         |__ etc.
     |
     |__ mod_*/...
|
|__ ci/
     |
     |__ v1.6.3/ (system)
         |
         |__ /...
|
|__ app/
     |
     |__ v1.0/ (application / optional version'ing)
         |
         |__ /...
|
|__ modules/ ( HMVC? / Modular Extension ? )
     |
     |__ mod_sales_inventory/
         |
         |__ controllers/
         |__ views/
         |__ ...

=-==-=--==--= index.php -=-=-=-=-=-=-=-=

$system_folder = "../ci/v1.6.3/";
$application_folder = "../../v1.0/";

-=-==-=-=-==--=---==--=-=-=-==-=-=--=-=-

In order for you to get your assets/ u need
to make a symbolic link, if ur in windows, u
will need the so called "junction" from
microsoft kb pages, in vista or linux. or
you can use aliases if u have an access to your
web server, or else im sure google will help you,
also CI is an active community.

.."of course u need some of the MS tools in
development, and im sure you'll host it on
a linux machine.." right?

support: irc.freenode.com ~ #codeigniter

-=-==--=-==-=--==--=-==-=--==-=-=-=-=-=-=

About HMVC, u can use to map your modules
dynamically, so u can just drop modules and
it will work by :

http://mypage.com/si_system/

u can route it, or same w/ http://mypage.com/
mods/si_system where mods is the controller that
will check it and print what mods u specify..im
sure u can figure a logic for that...

-==-=--=-==-=-=--==================-=-=-=-

By the way, above folder structure is just
"basic"ally what im doing.. you can have your own
way of doing it..




God Bless you all.. Happy Coding..


Nivekt,
CI Down-to-Earth Web Developer

#2
[eluser]wiredesignz[/eluser]
Welcome to CI forums Nivek.

Thanks for this, I'm sure it will help someone.

Nice to see you include Modular Extensions too. Wink

#3
[eluser]xwero[/eluser]
The only case where i put assets above the public directory is when they are shared between several apps.

And i still don't understand why people are so reluctant to add files/directories to the system directory. In this case the modules directory. As i see it the system directory is nothing more than a grouping directory for shared files/directories for multiple applications.

#4
[eluser]Unknown[/eluser]
Hi wiredesignz, thank you for the welcome, u know bro, i really like your Modular Extension ;-) More developer in the world are in to CI, some are just reluctant or should i say, wont say anything about what framework they use "it's like secret to others" IMO. But i like CI so much..

And for my post above, and for other people's concern, all are different, brain logic is/are different but the output are same. Coding must be fun, and its what you want, and don't let "them" make you a code monkey, there are much more important in life than creating software. ;-)

Take Care All, Have a good day always.

#5
[eluser]xwero[/eluser]
Nivek it wasn't meant to criticize your way of arranging the files. I (mis)used your post as a vehicle to make some comments.

You could have defended your file structure by saying the modules are CI version independent Wink


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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