Welcome Guest, Not a member yet? Register   Sign In
Organitzation of a application
#1

[eluser]Isern Palaus[/eluser]
Hello,

I'm developing a electronic commerce system in CodeIgniter. I started it with the structure:

/application/controllers/admin/ <- admin controllers
/application/controllers/ <- basic controllers related with showing the products, processing the order...

At this moment, I would like to reformat it to make it more like a module. If I want to put it in a concrete website copy the directorys and make the changes. I've tried to make an another subfolder but CodeIgniter doesn't recognize it.

How can I make a better structure?

Thank in advance
Isern
#2

[eluser]Phil Sturgeon[/eluser]
Create an admin panel with CodeIgniter shows you some of the available methods, along with some pro's and con's.
#3

[eluser]Isern Palaus[/eluser]
[quote author="Phil Sturgeon" date="1259080002"]Create an admin panel with CodeIgniter shows you some of the available methods, along with some pro's and con's.[/quote]

Hello Phil,

This looks perfect! I'll try to fit my application using this structure! ;-)

Thanks!
Isern
#4

[eluser]Isern Palaus[/eluser]
My problem will be use the correct routes. Actually I'm using URI Language routing that I've found in the wiki. An active route looks like:

Code:
$route['admin/idiomas']                = "admin/idiomas";
$route['(\w{2})/admin/idiomas']                = "admin/idiomas";

With the structure you've posted on your blog, I assume that my application would be something like:

Code:
application/
    config/
    controllers/
    modules/
        commerce/
            controllers/
                admin/
                    categorias.php
                    fabricantes.php
                    idiomas.php
                    monedas.php
                    productos.php
                    imagenes.php
                    usuarios.php
                    pedidos.php
                    ...
                categorias.php  
                productos.php
                pedido.php
                usuarios.php
            models/
                admin/
                    categorias_model.php
                    datos_model.php
                    fabricantes_model.php
                    idiomas_model.php
                    monedas_model.php
                    productos_model.php
                    usuarios_model.php
                    pedidos_model.php
                categorias_model.php
                fabricantes_model.php
                tienda_model.php
                ...
            views/
                admin/
                    categorias/
                        ...
                    fabricantes/
                        ...
                    productos/
                        caracteristicas/
                            opciones/
                                ...
                            ...
                        ...
                    ...
                template.php

I know I'm using a lot of folders and subfolders but I've a lot of files (and more to come). Could you help me rerouting this?

Thank you in advance!
Isern




Theme © iAndrew 2016 - Forum software by © MyBB