LOGIC Library

This site is the Logic involvement in sharing expertise and skills acquired in daily work. The goal is to create a solid knowledge base and share best practices in software development and systems management.

More info about us can be found on logicsistemi.it.

Developing MVC components for Joomla! 2.5 - part 5

It 's time to put all the code at the right place and create the final missing piece of our component: the model. Starting from scratch the code to write would be a lot, but Joomla! helps us with the classes that already implement most of what we need.

To complete the example we abandon the words Hello, World!, in favor of data coming from a database table.

ASP.NET MVC - Entity Framework - C# - How to delete a record without loading data

Entity Framework offers a rapid way to delete a record (entity) from a table; the drawback is that it loads all the record data before deleting.

Developing MVC components for Joomla! 2.5 - Part 4

Our goal is to display, in an HTML table, all data coming from a database table.

To do this we will build the view with its template and, in the next post, the corresponding model. In the end we will see how the installation package of the component is also able to make the necessary changes to the database, both during installation and removal of the component.

Developing MVC components for Joomla! 2.5 - Part 3

The MVC development pattern is widely used in modern programming languages, as it has the undoubted advantage to clearly separate the management of data and their presentation to the user. This makes  particularly easy to maintain the code and provide alternate views of information, aspect that is becoming more important with the spread of devices with different characteristics.

You can find more detailed information on the operation of this pattern in the traditional bibliography or, to stay connected to our CMS, on the Joomla! official documentation site.

For our purposes I carry out a short explanation of the components of this pattern, with particular reference to the Joomla! implementation.

Developing MVC components for Joomla! 2.5 - Part 2

A Joomla! component is a special type of extension responsible for displaying the contents of an entire page.

The result produced by a component can, therefore, be seen by creating a menu item of one of the types exposed by the component itself. This mode, however, is related to the public part of the website and to implement it we need additional configurations that we will see later.

A component that is not yet associated to a menu item can be seen by calling the index.php page and passing it the option parameter with the name of the extension you want to view. When Joomla! receives this parameter:

  • look for the folder where you installed the requested extension (from now on I will call it component to not confuse it with the extension of files)
  • execute the php file with the same name of the component
  • apply the template to html content resulting

Let's clarify all this with a concrete example for a component that is called Registry and that will be the example that we achieve. The result will be the management of a list of people and of some additional data.

Developing MVC components for Joomla! 2.5 - Part 1

This post begins a series of small howtos that will create a component for Joomla! CMS realized following the MVC pattern.

The posts will be in the form of simple notes wrote down to clarify the concepts, particulary to myself, about a relatively complex argument, where existing documentation is pour and somethimes out of date.

Page 10 of 10