Welcome Guest, Not a member yet? Register   Sign In
codeigniter as compared to Joomla framework
#1

[eluser]elmne[/eluser]
I have a question. Codeigniter is a framework, and Joomla is also a framework on which teh CMS is built.


JOOMLA

Joomla has the following

Template
- with position tags

URL
- Urls are based on menus
The template is attached to a menu or is specified as default
- Modules show up wherever the position is on a template (unless resticted by menu in module settings)
- Component displays component's content based on level within the structure (homepage, section, category, item)
- Navigation to structure level is aided by the menu

Controller
- Modules, Components have controlle rthat validates data, receives input, calls model objects, passes output to specified tags in code

Model
- Modules, Components have models that contains functions which process the data and perform given tasks



CODEIGNITER

For codeigniter, there is similarity with the model and controller.


The difference seems to be that with Codeigniter, URLs are determined by Controlllers.

My question would be, how does one create what are like modules in Codeigniter so that data is displayed in a given page position and can be configured?

At the moment, the Controller not only determines teh URL, but also the tags that correspond to the Viewer to which data will be passed.


Is there a way to have
- a template that defines positions.
- Then each controller working as a module (as a module can have one or more functions) and being assigned to be displayed on a template in a given position
- The viewer for the module is the one that loads up for a given position
- And then one controller that manages URLs, such as the menu controller


Or how can a similar functionality be achieved?
#2

[eluser]WanWizard[/eluser]
Depends on your definition of "framework".

Imho CodeIgniter is een application development framework. It provides you with the basic toolkit to quickly develop web applications. Joomla is a content management framework, which allows you to incorporate your own modules. These are different beasts.

Our efforts in ExiteCMS intend to bridge the gap, by extending CI with much of the items of your shopping list, without being forced into a CMS framework. A lot of development time has been spend developing Joomla, and for ExiteCMS we estimate about 3 manyears of work before the first public (non-beta) release. Not something you build on a rainy sunday afternoon...
#3

[eluser]pbreit[/eluser]
Joomla compares to Expression Engine (they are both CMSs) but I'm not sure it does to CodeIgniter. Joomla and EE come with a *lot* of content management and other application functionality out-of-the-box.
#4

[eluser]elmne[/eluser]
[quote author="pbreit" date="1281672372"]Joomla compares to Expression Engine (they are both CMSs) but I'm not sure it does to CodeIgniter. Joomla and EE come with a *lot* of content management and other application functionality out-of-the-box.[/quote]

The reason i was comparing is because Joomla is classified as an MVC framework. That is, the platform on which Joomla is built is an MVC framework, and the components and modules are built using an MVC approach.

I suppose my challenge is figuring out how different content can be displayed on a page, as i will illustrate in the diagram below

LINE 1 - Positions in the template

LINE 2 - viewers with data loaded into above positions

LINE 3 - Functions in the controller that get data and load it to the viewer above

LINE 4 - The controller that holds the function(s)

Code:
PAGE TEMPLATE(that has the positions that controllers pass data to)

POSITION1(header)  POSITION 2(left)  POSITION3(center) POSITION4(right)  POSITION5(footer)

        |                 |                 |               |                   |
   logo, top menu       Main menu       Content Area       Login window       bottom menu

        |                 |                 |                |                   |

logo function       Menu function     content function   login function     menu function
topmenu function                                         featured function  

        |                  |                 |                |                   |

     Controller1        Controller2      Contoller3        Controller4         Controller5

How can this be achieved in Codeigniter, as any web application will require a layout of some form like this. With a header, center area, possibly left and right areas and the footer.

Tags exist in these areas as positions in which content from the controller is passed on to the viewer.

Each function requires a viewer to display its information. For instance, login window requires a login viewer, menu requires a menu viewer.
These are then all enacase within a main viewer which can constitute the template that the application uses.

The problem then becomes how to get the different controllers to work together. Because each of them can be used to specify a URL. How then can i get the controllers to be called to output their data to one template via the viewer, while having one controller that controls navigation on the template?


Beacause at the moment, to achieve this process, i have to use one controller that has all the functions which will return data to be displayed on the viewer.

But this becaome impractical after a while as it means one controller has to hold each and every function to be used
Header function
main menu function
content are function
login function
footer function
featured function
etc

and also this often means multiple functions, not just one. For instance for one step,
- receiveing submitted form
- validation
- passing validated data to a method
- generating confirmation page and loading it to the viewer


Is there a way that a controller can be called within a controller so that each separate process, such as main menu, content, login, etc, can be split into its own controller, yet get the system to work as one?

Or could someone advice how best to achieve the above functionality in Codeigniter ?
#5

[eluser]Joom[/eluser]
[quote author="elmne" date="1281798602"][quote author="pbreit" date="1281672372"]Joomla compares to Expression Engine (they are both CMSs) but I'm not sure it does to CodeIgniter. Joomla and EE come with a *lot* of content management and other application functionality out-of-the-box.[/quote]

The reason i was comparing is because Joomla is classified as an MVC framework. That is, the platform on which Joomla is built is an MVC framework, and the components and modules are built using an MVC approach.

I suppose my challenge is figuring out how different content can be displayed on a page, as i will illustrate in the diagram below

LINE 1 - Positions in the template

LINE 2 - viewers with data loaded into above positions

LINE 3 - Functions in the controller that get data and load it to the viewer above

LINE 4 - The controller that holds the function(s)

Code:
PAGE TEMPLATE(that has the positions that controllers pass data to)

POSITION1(header)  POSITION 2(left)  POSITION3(center) POSITION4(right)  POSITION5(footer)

        |                 |                 |               |                   |
   logo, top menu       Main menu       Content Area       Login window       bottom menu

        |                 |                 |                |                   |

logo function       Menu function     content function   login function     menu function
topmenu function                                         featured function  

        |                  |                 |                |                   |

     Controller1        Controller2      Contoller3        Controller4         Controller5

How can this be achieved in Codeigniter, as any web application will require a layout of some form like this. With a header, center area, possibly left and right areas and the footer.

Tags exist in these areas as positions in which content from the controller is passed on to the viewer.

Each function requires a viewer to display its information. For instance, login window requires a login viewer, menu requires a menu viewer.
These are then all enacase within a main viewer which can constitute the template that the application uses.

The problem then becomes how to get the different controllers to work together. Because each of them can be used to specify a URL. How then can i get the controllers to be called to output their data to one template via the viewer, while having one controller that controls navigation on the template?


Beacause at the moment, to achieve this process, i have to use one controller that has all the functions which will return data to be displayed on the viewer.

But this becaome impractical after a while as it means one controller has to hold each and every function to be used
Header function
main menu function
content are function
login function
footer function
featured function
etc

and also this often means multiple functions, not just one. For instance for one step,
- receiveing submitted form
- validation
- passing validated data to a method
- generating confirmation page and loading it to the viewer


Is there a way that a controller can be called within a controller so that each separate process, such as main menu, content, login, etc, can be split into its own controller, yet get the system to work as one?

Or could someone advice how best to achieve the above functionality in Codeigniter ?[/quote]

Very nice explain, thanks
#6

[eluser]gowrav vishwakarma[/eluser]
Now Develop for Joomla in CodeIgniter, xCIDeveloper 0.6 released. installs in Joomla 1.5, 1.6 and 1.7 in same way and components developed in xCI works same in any of joomla version. http://www.xavoc.com/
#7

[eluser]elmne[/eluser]
Thanks, i will check it out




Theme © iAndrew 2016 - Forum software by © MyBB