Book Image

Mastering Joomla! 1.5 Extension and Framework Development Second Edition

Book Image

Mastering Joomla! 1.5 Extension and Framework Development Second Edition

Overview of this book

Joomla! is one of the world’s top open source content management systems, which enables you to build websites and powerful online applications. Out of the box, Joomla! does a great job of managing the content needed to enhance the functionality of your website. But for many people, the true power of Joomla! lies in its application framework that makes it possible for thousands of developers around the world to create powerful add-ons and extensions. This book will guide you through the complexities of implementing add-ons, components, modules, and plugins in Joomla! 1.5. If you feel that you’ve mastered the basics of creating Joomla! extensions, then this book will take you to the next level. Packed with expert advice on all aspects of programming with Joomla!, this book is an invaluable reference guide you will turn to again and again for your Joomla! development tasks. The book starts by explaining the structure and design of the Joomla! Framework. Then we move on to extending and storing data in standard fields and dealing with multilingual requirements. Further, you will discover best practices, design, and coding methods for Joomla! components, modules, plugins, and other extensions. Along the way, you will actually design and create a component, module, and plugin that work together to add functionality to the Joomla! framework. You will also learn about customizing the page output using JavaScript effects, making use of Web Services from within Joomla! and ensuring that your code is secure and error-free. You will discover how to easily create sophisticated extensions that are robust, user-friendly, and professional by taking advantage of the many libraries and utilities provided by the Joomla! framework. A comprehensive, up-to-date reference to the Joomla! Framework API is also included in the book. Finally, we will discuss advanced methods for rendering your extensions more robust, secure, and professional.
Table of Contents (18 chapters)
Mastering Joomla! 1.5 Extension and Framework Development
Credits
About the Author
About the Reviewer
Preface

Extension types and their uses


A Joomla! extension is anything that extends Joomla!'s functionality beyond the core. There are three main types of extension: components, modules, and plugins.

There are also languages and templates, but these are solely designed to modify page output, irrespective of the data being displayed. Although we will discuss the use of translation files and templates, we will not explicitly cover these two extension types in this book.

Tools, sometimes referred to as extensions, are essentially any type of extension that does not fall into the extension-type categories just described. We will not be discussing how to create tools in this book.

Extensions are distributed in archive files, which include an XML manifest file that describes the extension. It is from the manifest file that Joomla! is able to determine what type the extension is, what it is called, what files are included, and what installation procedures are required.

Components

Components are undoubtedly the most fundamental Joomla! extensions. Whenever Joomla! is invoked, a component is always called upon. Unlike in other extensions, output created by a component is displayed in the main content area. Since components are the most fundamental extension, they are also generally the most complex.

One component of which all Joomla! administrators will be aware, is the content component. This component is used to display articles, content categories, and content sections.

In addition to outputting component data as part of an XHTML page, we can output component data as Feeds, PDF, and RAW documents.

Many components tend to include, and sometimes require, additional extensions in order for them to behave as expected. When we create our own components, it is generally good practice to add 'hooks' in our code, which will enable other extensions to easily enhance our component beyond its base functionality.

Modules

Modules are used to display small pieces of content, usually to the left, right, top, or bottom of a rendered page. There are a number of core modules with which we will be instantly familiar, for example the menu modules.

Plugins

There are various types of plugins, each of which can be used differently; however, most plugins are event driven. Plugins can attach listener functions and classes to specific events that Joomla! can throw using the global event dispatcher, for example, content filtering based on an event.

Languages

Joomla! has multilingual support, which enables us to present Joomla! in many different languages. Language extensions include files that define translated strings for different parts of Joomla!.

We will discuss how to create language files and how to use translations in Chapter 2, Getting Started and later in Chapter 9, Customizing the Page.

Templates

We use templates to modify the general appearance of Joomla!. There are two types of template extension: frontend site templates and backend administrator templates.

Most Joomla! sites use custom site templates to modify the appearance of the frontend (what the end-user sees). Admin templates modify the appearance of the backend (what the administrators see); these templates are less common.

There are many websites that offer free and commercial Joomla! templates, all of which are easy to locate using a search engine.

Tools

Tools, although referred to as extensions, are very different from components, modules, and plugins. The term 'tools' is used to describe any other type of extension that can be used in conjunction with Joomla!.

Tools are not installed within Joomla!; they are generally standalone scripts or applications, which may or may not require their own form of installation.

A good example of a Joomla! tool is JSAS (Joomla! Stand Alone Server). JSAS provides an easy way to set up Joomla! installations on a Windows-based system. To learn more about JSAS please refer to http://www.jsasonline.com..