Model-View-Controller Component - Part 2 - Adding a Model Introduction In the first tutorial of this series, creating a simple view-controller component using the Joomla! 1.5 CMS framework was demonstrated. In the first tutorial, the greeting was hardcoded into the view. This doesn’t follow the MVC pattern exactly because the view is intended to only display the data, and not contain it. In this second part of the tutorial we will demonstrate how to move this out of the view and into a model. In future tutorials we will demonstrate the power and flexibility that this design pattern provides. Creating the Model The concept of model gets its name because this class is intended to represent (or ‘model’) some entity. In our case, our first model will represent a ‘hello’, or a greeting. This is in line with our design thus far, because we have one view (’hello’), which is a view of our greeting. The naming convention for models in the Joomla! framework is that the class name starts with the...
an Administrator Interface Introduction In the first three tutorials, we have developed a MVC component that retrieves its data from a table in the database. Currently, there is no way to add data to the database except to do it manually using another tool. In this tutorial, we will develop an administrator section for our component which will make it possible to manage the entries in the database. Creating the Basic Framework The basic framework of the administrator panel is very similar to the site portion. The main entry point for the administrator section of the component is admin.hello.php. This file is identical to the hello.php file that was used in the site portion except the name of the controller it loads will be changed to HellosController. The default controller is also called controller.php and this file is identical to the default controller in the site portion, with the exception that the controller is named HellosController instead of HelloController. This difference is...
Based on Brad Neuberg's "Really Simple History". See: <a href="http://code.google.com/p/reallysimplehistory/" target="new">his page</a> for details This plugin makes it possible to handle the browsers backbutton functionality and provides a simple bookmarking management. It works with IE and FF and with the new RSH Version also with Opera and even Safari. <h2>xajax 0.5 Beta4 - Really Simple History 0.6</h2><b>Last changed: 2007-12-03</b> The package contains the following files: <table border="1"> <tbody><tr><th>file</th><th>folder</th><th>comment</th></tr> <tr><td colspan="3"><b>plugin files</b></td></tr> <tr><td>dhtmlHistory.inc.php</td><td>./xajax/xajax_plugins/response</td><td>the xajax plugin</td></tr> <tr><td>rsh.compr...
Nhận xét
Đăng nhận xét