There are many ways in which the MVC design pattern can be
implemented; this chapter is specifically interested in Joomla!'s MVC implementation.
Setting up a Sandbox
When we start building a new component, it is imperative that we have a sandbox;
somewhere we can test the code. Ideally, we should have more than one system so
we can test our components on different server setups.
The quick and easy way to set up a component sandbox is to create the component
folders in the frontend and backend. This technique has some major drawbacks,
unless we hack the #__components table, and will prevent us from testing all aspects
of our code.
A more comprehensive approach is to create a basic installer, which sets up a blank
component. The XML displayed can be used to create a blank component called
'My Extension':
My Extension
MonthName Year
Author's Name
Author's Email
Component Design
[ 66 ]
Author's Website
Copyright Notice
Component License Agreement
Component Version
Component Description
To use this create a new XML manifest file, using UTF-8 encoding, and save the code
into it.
Pages:
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100