Sunday, July 6, 2008

JOOMLA EXTENSION (2nd POST)

Topic Overview
This book will cover the following topics regarding developing extensions
for Joomla!.
Creating Toolbars and List Screens
Joomla! has a standard set of toolbar buttons used throughout the back end. These
keep a consistent appearance across components, so users quickly become familiar
with the corresponding functions. When necessary, the labeling and functions of
these buttons can be changed and new buttons can also be added.
Like the standard toolbars, Joomla! has a certain look for screens that list a set of
records from the database. These lists usually have links to edit screens for the
individual records and have toggles that change the publishing status of the record.
Automatic pagination is also available for lists.
Maintaining a Consistent Look and Reducing
Repetitive Code Using HTML Functions

Several standard CSS class names are used to format content and HTML elements
within your extensions. This makes it easy for your extensions to seamlessly blend in
with the rest of the website. Additionally, Joomla! includes many functions to automate
the generation of checkboxes, dropdowns, select lists, and other common elements.
Accessing the Database and Managing
Records

A common database object is used in Joomla! so that only one connection is made
during every page request. This object also provides a set of functions to make
queries and retrieve results. These functions are database independent and are
designed in such a way that you can install multiple copies of Joomla! into the same
database when desired.
Besides a common database object, Joomla! has a standard database table class.
Records can be created, read, updated, and deleted using the core functions. Logic
can also be added so that child records in other tables are deleted when the parent
is removed.
Security and the Preferred Way of Getting
Request Variables
Since Joomla! is a web application deployed within public reach, it is necessary
to protect it against security vulnerabilities. Joomla! employs a common
method of making sure scripts are only called within the framework and not
randomly executed.
Besides unintended script behavior, maliciously submitted data can be used by
hackers to gain access to your database. Joomla! provides functionalities that prevent
attacks of this kind.
Menu Item Control
A noteworthy feature of Joomla! is that navigation is separated from content.
However, if a component is not built to take this into account, it is possible that
website administrators will lose their template and module selections. To take
advantage of the system, it is necessary to use the intended menu item ID number in
generated links.
Also, it is possible to give administrators multiple options for linking to your
component. This will allow the choice of different display options for the front end
without the need to construct long, confusing URLs by hand. These options can
additionally offer admins some simple configuration controls.

No comments: