Developing a Model-View-Controller Component – Part 4 – Creating an Administrator Interface

This item was filled under [ joomla ]

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.
阅读更多…

Bookmark and Share

Developing a Model-View-Controller Component – Part 3 – Using the Database

This item was filled under [ joomla ]

Introduction

In the first two tutorials, we showed you how to build a simple model-view-controller component. We had one view which retrieved data from a model (which was created in the 2nd tutorial). In this tutorial, we will be working with the model. Instead of the data being hard coded in the model, the model will retrieve the data from a table in the database.

This tutorial will demonstrate how to use the JDatabase class to retrieve data from the database.
阅读更多…

Bookmark and Share

Developing a Model-View-Controller Component – Part 2 – Adding a Model

This item was filled under [ joomla ]

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.
阅读更多…

Bookmark and Share