php mag - joomla 1.5
TRANSCRIPT
-
8/3/2019 PHP Mag - Joomla 1.5
1/9
6.06International
PHPPHPMagazine
P
HP
P
HPMagazine
Cutting-Edge Technologies for Web Professionals
Knocking at Your Doo
Getting a Grip on the Next Releas
Joomla! 1.5Joomla! 1.5
-
8/3/2019 PHP Mag - Joomla 1.5
2/9
Joomla! 1.5 Knocking At Your Door Cover Story
I n t e r n a t i o n a l P H P M a g a z i n e 0 6 . 2 0 0 6 2
Introduction
Last time I wrote or the International PHP Magazine (IPM),
we (IPM) were still in print, and we (Joomla!) were still called
Mambo. How things have changed! Even more change is aoot,
with the impending release o Joomla! 1.5, and several new
and exciting initiatives set to come rom the IPM stable. This
article will outline and demonstrate some o the most important
improvements in Joomla!, rom a developer perspective.
First, an Update
Back in August there were some events that triggered the
split, which o course we like to reer to as the rebranding
o Mambo to Joomla!. It is beyond the scope o this article to
outline the events that lead to this happening, but it is important
or everyone to know who Joomla! is, and what happened to
Mambo.
The entire Mambo teams developers, documentation writers,
orum moderators, system administrators, PR and advocacy
teams, and language translators decided in unison that this
switch was required to protect the relationship between the
developers and the community, and ensure that there would
be no more commercial attempts to manipulate the project. So
most olks are not aware o the totality o that agreement, or
that it was in complete unanimity that we decided to rebrand.
It was the most peaceul option or us, and the entire crew agreed
with the plan. So when you look at the low version numbers o
Joomla!, please remember that this is the same award winning
team that made Mambo so special. Joomla! 1.0.0 was essentially
the next maintenance release o the Mambo 4.5.2 series, with
some goodies added or measure.
I am not amiliar with the team that presently works on Mambo,
and do not track their progress. But it is sae to say that you
have two completely independent projects, run by completely
independent teams, and with decidedly dierent roadmaps and
philosophies. With the 1.5 release, all compatibility attempts
with Joomla! and Mambo come to an end, as not only have we
made signifcant changes in our evolution, but the new Mambo
team has also progressed on their own path.
I you were wondering when it was no longer possible to mix
and match components written or Mambo/Joomla!, wonder no
more now is that time.
The International Community Speaks
Back at the Joomla! Core Developer Summit in October, it
was brought to our attention, in a rather painul ashion, that
international support in Joomla! was a critical shortcoming;
and i we wanted our sotware to be internationally viable
we needed to ocus all our eorts to supporting a more multi-
lingual audience. We shelved our grand plans (more on that later)
or the next release, and ocused instead on meeting the
communitys needs.
The frst step was to implement UTF-8 characterset support
throughout the core. UTF-8 is also known as unicode, and
Joomla! 1.5 Knocking At Your Door
by Mitchell Pirtle
Let Joomla! core developer Mitch Pirtle take you through a quick
tour of the advancements in the latest update to the award winning
content management system. You will see the new front end editing
interface, as well as the much-needed changes to the back end
administrator interface.
Getting a Grip on the Next Release
-
8/3/2019 PHP Mag - Joomla 1.5
3/9
Cover Story Joomla! 1.5 Knocking At Your Door
3 I n t e r n a t i o n a l P H P M a g a z i n e 0 6 . 2 0 0 6
supports multibyte charactersets, right-to-let languages, and
others. With an aggressive schedule, we set out to implement
UTF-8 support as quickly as possible. Our expected delivery
date was within a ew weeks, in November.
This eort was rustrating when we learned that not only was
the UTF-8 support going to require a lot o reactoring o the
existing core, but that there were two major issues: supporting
both PHP4 and PHP5 required totally dierent approaches, and
the reliance on third-party libraries that Joomla! depended on
were also unable to support UTF-8. Some libraries had to be
completely removed, and we recreated them rom scratch, just
so we could support this requirement; and other libraries were
replaced with still other libraries as well.
Once the groundwork or this eort was underway, there was
a period where the localization teams were winding throughthe dierent translations to make sure that new API calls were
supported with their language fles. While this was happening,
the developers decided to reactor some areas that badly needed
it as the UTF-8 requirement orced them to reactor the
core anyway, it was logical to take care o some architectural
shortcomings o the existing core.
The Tipping Point
It was at this moment that some very important decisions were
made that ultimately aected the delivery o 1.5 which back then
was just called 1.1, as it was not considered a major eort. The frst
big decision was to reactor the colossal and bloated joomla.php.
This bloated fle was one monolithic pile o procedural PHP that
was parsed or each and every single page that was delivered to the
browser. This exercise started out innocently enough, with signifcant
time spent just breaking out the code into separate classes, and using
many OO patterns to simpliy the rendering process o content. The
intent was to make it easier on developers, but the added bonus was
perormance enhancements. The eect was due to Joomla! no longer
parsing all that code or each request, and only loading classes that
were needed or that particular view.
The second big decision was to rationalize the API, as there were clear
issues with the existing one that had evolved over time. By comingup with a solid, common philosophy we were able to reactor the
API with a much more logical approach, urther simpliying eorts
or developers.
The third, and most signifcant decision was to approach Joomla!
as more than a content management system, and ocus on bringing
a more ramework-oriented approach to the architecture. This had
a really proound impact on Joomla! in general, and also urther
necessitated core reactoring to break out the classes so that
developers had the exibility to do just what they wanted, instead
o banging on a bunch o procedural code to make one site behave
the way they wanted, in a very manual and error-prone ashion that
made upgrades nearly impossible.
It is completely true that you could say the Joomla! content
management system was created with the Joomla! Framework. But
enough history lessons already! Lets get to the new Joomla!
First Impressions
The new template is called rhuk_milkyway, and is brought to you
by the same developer that produced the deault or the 1.0.x series
as well as the 4.5.x series when we were Mambo, Andy Miller. See
Figure 1.
Fig 1: Screenshot of Default Front End Interface
Gone is the venerable SolarFlare II template, replaced with a much
more manageable layout that has more exibility with module
positions. There are other changes, but the most interesting I will
save or the last.
Life on the Backside
So how does the administrator interace look? This is one o the
most visible changes to the end user, as the entire administrator
interace has been completely revamped. Immediately apparent is
the new template colorscheme, as evidenced by the login screen.
See Figure 2.
The new look is driven rom a totally new admin template, which
also showcases the ability o Joomla! to allow or distinctly
dierent looks on the administrator interace, not just the ront end.
Perhaps most telling is the main page, also called the Control Panel.
See Figure 3.
-
8/3/2019 PHP Mag - Joomla 1.5
4/9
Joomla! 1.5 Knocking At Your Door Cover Story
I n t e r n a t i o n a l P H P M a g a z i n e 0 6 . 2 0 0 6 4
Fig 2: Screenshot of the Login Screen
Fig 3: Screenshot of the Login Screen
We have brought out an entirely new set o icons as well, which
is a welcome change o pace ater looking at the previous icons
or several years. We have also consolidated both the Control Panelchoices, as well as the menu items. Gone are the multiple-nested
menus, replaced with simple, logical menus that are typically only
one level deep. The lone exception is or components, which is
necessary or complex components otherwise you would have a
simple menu that required many clicks to get where you needed or
more sophisticated applications.
We consolidated Content Items and Static Content Items to
just one, which in this article are reerred to as Articles. This is a
test or now, however the fnal release may include this change in
terminology. At the time o writing the debate was still in ull swing,
but or clarity I will continue to reer to them as Content Items in
this article, until the change is made permanent. See Figure 4.
The biggest change to the content editor is the consolidation o the
content areas, also known as WYSIWYG (What You See Is What
You Get) areas. In 1.0.x there were two, one or the introductory
text and another or the main body.
As this was quite conusing or a lot o newcomers to Joomla!, we
decided to simpliy the whole content creation process by havingone editor area and providing a button to create the Read More...
link that signifes a separate page or lengthy text.
You can see in the screenshot the text {readmore} that tells Joomla!
you want to make that separation between introductory text and
main text. For aggregate listings such as blog lists, this inserts a
Read More... link at the end o the introductory text.
We have also changed the code or insertion o images, rom
{mosimage} to just {image} or clarity, as well as getting away
rom the deprecated mos terminology which originally stood or
Mambo Open Source.
Also o note is the new styling o the images tab and related tabs,
which are not layered anymore as tabs but rendered much more
cleanly with expanding divs. This is a lot easier on slower machines
and also is more cross platorm to support a wider array o browsers
and browser versions. See Figure 5.
Fig 4: Screenshot of the Content Manager Fig 5: Screenshot of the Content Detail Page
-
8/3/2019 PHP Mag - Joomla 1.5
5/9
Get yourInternational PHP Magazine
in just4 Steps for as low as 3.50 per copy!
warm up... choose
Step 1: Login with your Username and Passwordat http://www.entwickler.com/ssl/pdf/
Step 2: Choose a subscription type:Single Issue/Annual
confirm
content
Step 3: Confirm your payment details Step 4: Download your Issue
International PHP Magazines new download center facility ensures you have access to the
International PHP Magazine at all times. Please visit oursubscription serviceto order your
copy of the magazine for as low as 3.50 per copy. Whats more, you can use your access
details to log into our download center any time, from anywhere, to access and download all
issues you have subscribed to.
http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/http://www.entwickler.com/ssl/pdf/ -
8/3/2019 PHP Mag - Joomla 1.5
6/9
Cover Story Joomla! 1.5 Knocking At Your Door
6 I n t e r n a t i o n a l P H P M a g a z i n e 0 6 . 2 0 0 6
Fig 6: Screenshot of the Global Configuration
Fig 7: Screenshot of the Media Manager
Fig 8: Screenshot of Front End Editor
The Global Confguration screen also gets some revamping, with the
dierent confguration directives consolidated to just our tabs. This
makes things a lot easier as well as quicker as we learned that having
a confguration screen with ten or more tabs was just unmanageable.
Also the top-level tabs are much more logical and intuitive,
making it more likely or the newcomers to Joomla! to jump to the
intended screen to make the changes that they desire. See Figure 6.
The new Media Manager interace is a much-needed
improvement over the old one; and is also a source o pride and
joy o the happy parent (that would be developer Louis Landry).
The tree on the let makes it so much more convenient
to jump rom older to older, which was a common
interace complaint rom the 1.0.x userbase. See Figure 7.
And now, or something completely dierent. Lets go back to the
ront end interace, login, and try to edit a content item. See Figure 8.
Finally, some AJAX magic makes its way to the Joomla!
Interace. Perhaps this is just a frst step, but also paves the way
or the ront end content editor interace to be a lot more useul.
Here is some dirty laundry rom the old days: back in the Mambo
universe, we were constantly hearing about how much everyone
hated the ront-end content editor interace. The problem is, none o
us ever used it. The pain we elt to fx that just wasnt there. We never
understood why it was such a big deal, or why everyone wanted us
to spend so much time on the ront-end when you had so much
more power and capability available rom the back end interace.
Well, quite a ew o us started taking jobs developing and
customizing sites that used Mambo. For every single one
o us, the very frst project we worked on was an absolute
horror rom the ront end content editor perspective, that is
and we all vowed that the interace needed some serious work.
The 1.5 development team put that need into action, and provided
a antastic interace to the ront end that provides virtually the
same power and capability as the one provided by the back end,
but without giving back end access to your content writers. This
is signifcant, as it takes an early, critical step in the process ous really rethinking how the ront end interace should be used.
Finally, olks that are restricted to the ront end can rejoice!
Developer Resources Everywhere
Speaking o developers, you can get a ull reerence o the new
API at http://api.joomla.org/, and there is a developer portal at
http://dev.joomla.org/. The portal is a great resource, as you can
http://api.joomla.org/http://api.joomla.org/http://api.joomla.org/http://dev.joomla.org/http://dev.joomla.org/http://dev.joomla.org/http://api.joomla.org/ -
8/3/2019 PHP Mag - Joomla 1.5
7/9
Joomla! 1.5 Knocking At Your Door Cover Story
I n t e r n a t i o n a l P H P M a g a z i n e 0 6 . 2 0 0 6 7
read developer blogs, articles about the technology rom a developer
perspective, and fnd links to other resources to help you be as
productive as you can be.
Additionally, you can have ree hosting o your open source Joomla!
extension atorge.joomla.org, where you have access to a tracker,
subversion repository, fle release system, and more. This topic
deserves some more detail, which I hope explains how antastic a
resource this is to you.
The JoomlaForge happens to be the biggest instance o SourceForge
Enterprise Edition (SFEE), in the world. We have over 25,000
registered developers working on more than 1,000 projects, spanning
a huge variety o applications including document management,
discussion orums, photo galleries, additional WYSIWYG editors,
you name it! Not only is there a veritable cornucopia o applications
to choose rom, you can also set up your own project or ree.
I you are itching to develop a Joomla! extension and release it
under an open source license, you can use all the ormidable eatures
provided by SFEE. As well you will have your project hosted in
a Joomla!-centric environment, where you will always have the
communitys interest.
However, SFEE is not targeted at the non-technical end user
that is looking or a photo gallery, it is targeted squarely at the
developer who needs tools to collaborate with other developers
working on a sotware project. So what can the non-developers do?
We created our new sotware directory athttp://extensions.joomla.org, where you can fnd a categorized list o available applications
complete with reviews, links to the sotwares home page, and
more. This is where we like to send the users o the sotware
to fnd additional unctionality, in a non-techie presentation.
This means that the SFEE interace remains ocused solely on
the needs o the developer, which is what SFEE is so good at.
Unlike the old orge (which I was the sole maintainer o or over a
year), the new JoomlaForge is a eature rich, robust environment
that really acilitates collaborative development.
But Wait, Theres More
There is one more screenshot that needs to be shown, which is the
administrator interace or managing plugins, ormerly known as
mambots. See Figure 9.
Plugins have had a complete and dramatic redesign that
provides a real wealth o capabilities. You will see in this list o
deault plugins a new type o plugin or authentication. We have
provided three authentication plugins or reerence: the standard
Joomla! authentication plugin that uses the stock Joomla! tables,
a native LDAP plugin to authenticate rom remote directory
sources such as OpenLDAP, Netware or Microsots Active
Directory, and a little proo o concept authentication plugin
that lets you login with your Google Mail accounts credentials.
We have also included a stub or use with the XStandard WYSIWYG
editor, which has an interesting implementation. Basically you
install the editor locally on your machine (sorry, Windows is
required at this point, were working on it); and when you wish
to edit content, you dont have to wait or all that JavaScript to
download to your browser locally beore rendering the editor
area. This makes editing content eel much more responsible, like
a desktop application instead o a web-based content editor. Nice!
Also you will see another new class o plugins, ocused on
unctionality provided by XML-RPC capabilities. There isone plugin that lets you use a at client blogging application (in
this case, w.bloggar) to post content to your Joomla! web site.
Not to leave it at that, we have also provided our own Joomla!
XML-RPC interace, which will provide the means or at client
applications to interact with your web site like a web service. There
is already a Java-based client called J!Explorer that is more than
just a working prototype, to be ound at www.joomlatools.org .
The plugin installer has really gone through the upgrade
process, where you no longer have to use a component
installer, module installer and so on you can now just use
the installer. Another much-needed addition is the capabilityto install rom a URL, instead o constantly downloading to
your client machine, and then uploading to the web server.
Speaking the International Language
One important topic not covered yet is the concept o language
packs. This allows third-party developers to provide dierent
language packs or their applications, not just at the Joomla! level
but also at an application level.Fig 9: Screenshot of Plugin Manager Interface
http://www.forge.joomla.org/http://www.forge.joomla.org/http://www.forge.joomla.org/http://extensions.joomla.org/http://extensions.joomla.org/http://extensions.joomla.org/http://extensions.joomla.org/http://server/d/Editorial/Projects/Int_PHP%20Magazine/IPM_Magazine/IPM_06.06/Blues/Free%20copy/www.joomlatools.orghttp://server/d/Editorial/Projects/Int_PHP%20Magazine/IPM_Magazine/IPM_06.06/Blues/Free%20copy/www.joomlatools.orghttp://server/d/Editorial/Projects/Int_PHP%20Magazine/IPM_Magazine/IPM_06.06/Blues/Free%20copy/www.joomlatools.orghttp://server/d/Editorial/Projects/Int_PHP%20Magazine/IPM_Magazine/IPM_06.06/Blues/Free%20copy/www.joomlatools.orghttp://extensions.joomla.org/http://extensions.joomla.org/http://www.forge.joomla.org/ -
8/3/2019 PHP Mag - Joomla 1.5
8/9
Cover Story Joomla! 1.5 Knocking At Your Door
8 I n t e r n a t i o n a l P H P M a g a z i n e 0 6 . 2 0 0 6
Listing 1
Template Conditional Example 1
This code tells Joomla! to check and see i the language in use is a
right-to-let language; and i so, to load an additional stylesheet or
the template.
There are also ways to test to see i there are modules published in a
particular position. So or example i you wanted to render HTML
or the let module position, but only i there are published modules
there, you can use the code shown in Listing 2.
Listing 2
Template Conditional Example 2
Most importantly, there are tutorials on templates on the developer
portal and o course the deault template provided with the 1.5
distribution has all o these examples and more. By studying this
template and how it is done, you can easily get started with the new
syntax.
Its All in the Packaging
Another important point about the reactoring o Joomla! is that
this has resulted in a much more ramework-oriented package. It is
actually correct to say that the Joomla! CMS was created with the
Joomla! Framework.
For example, the JApplication class allows you to create a
standalone script that does not require the CMS, but has access to
all the acilities as i the script was being rendered, and as i it was
being delivered by the CMS.
I you look in the distribution, you will see the libraries older. This
is actually the ramework, and what we used to create the CMS.
We are investigating what it would take to release the ramework
as a standalone package, and hopeully under the LGPL license to
promote inclusion in other applications.
Planning for the Future
I saved my avorite part or last. In the libraries older, you will
see the joomla older containing the database older. Here you see
the oundation or making Joomla! capable o using a variety o
dierent database platorms, allowing you to use not only MySQL
but PostgreSQL, but some commercial database platorms as well.
The frst step is already done, and you can create your own database
driver by using the existing mysql and mysqli ones as a reerence
point. But what about all that SQL littering the codebase?
For example, say you wrote a component that provided a calendar
or events, like GigCalendar atwww.gigcalendar.net. What happens
i someone downloads your application and they are speaking
Spanish? Your component is still rendering the language you
provided, which (in the case o GigCalendar) is English.
By being able to provide a language pack or your component, it
is now possible or someone using Joomla! in Spanish to also have
GigCalendar, also in Spanish. It sounds much easier than it really is,
and it is a wonderul capability or the international, multilingual
community.
Sometimes Looks ARE Everything
So what happens to templates, you ask? We have changed the way
templates are done, with a strict ocus on making the template
fles as easy to edit as possible. One change is the move rom PHP
snippets in the HTML which rustrated and conounded many
editors and proved a common source o syntax errors with a more
XML-riendly ormat.
For example, to include a module position in your template or the
1.0.x series, you would use:
With 1.5 you would instead use:
The frst ormat makes great sense to a PHP developer, but isproblematic or HTML editors, to say the least. First o, your
document will not validate and o course it is very difcult to
know while you are working on your template i it validates or not,
without actually viewing (and validating) your output as rendered
by Joomla! There are many reasons that this is undesirable.
Another template eature is conditional logic, without the need or
PHP. See the example in Listing 1.
http://www.gigcalendar.net/http://www.gigcalendar.net/http://www.gigcalendar.net/http://www.gigcalendar.net/http://www.gigcalendar.net/ -
8/3/2019 PHP Mag - Joomla 1.5
9/9
Joomla! 1.5 Knocking At Your Door Cover Story
I n t e r n a t i o n a l P H P M a g a z i n e 0 6 2 0 0 6 9
That is the next step. We are participating in the Google Summer o
Code program, and hope that one o the projects will be researching
and implementing a layer or Joomla! to generate SQL based on
the driver, as opposed to hardcoding SQL statements everywhere
in your code.
There are already existing implementations or us to look at like
ADOdb and Propel, and there is also plenty to learn rom other
languages such as java and python. It is my hopes that this layer is
implemented in the next point release o Joomla!, so that you can
choose the database platorm that is right or you.
We All Could Use A Little Change
And now a little bit or those o you that have already written
applications to the 1.0.x API, and are worrying about the time youare going to spend moving to the 1.5 API.
This was a very hot topic, and the lead developer on the 1.5 eort,
Johan Janssens, has made a blog post [1] about migrating a very
popular application called FacileForms that makes it easy to create
orms and process the posted results.
In a nutshell, Johan spent about an hour playing around with
FacileForms to get what he wanted working in 1.5. That doesnt
mean that it was ully ported, nor does it mean that all applications
will be as easy, but it should be a great reerence to those o you that
are preparing or the migration o existing applications.
Mitch Pirtle is a core developer on the
Joomla! content management team and focuses
on database technologies and evangelism of the
platform for application development, as well
as being a champion of open source software.
He is also a founder ofJamboWorks, providing
business and enterprise services and products
based on the Joomla! application platform. There he works on training
and client relationships, as well as business development. Mitch is
also an active member of New York PHP, vocal booster of PHP and
PostgreSQL. He can be found with his wife and children loitering
somewhere in the parks of Manhattan with his PowerBook and a cigar.
Questions & Comments PHP Magazine Forum
Conclusion
The 1.5 release o Joomla! includes some signifcant changes, as well
as some welcome additions to unctionality to ease the lives o thirdparty developers or product development and custom work. Not
only has the interace been simplifed or the end user, the API has
been rationalized or the developer.
More importantly, this version is a lot more suited or complex
applications and sophisticated requirements. This is an excellent
platorm or integrating systems, or example, and taking on other
enterprise-scale challenges.
With Joomla! 1.5 available, lie as a web developer couldnt be any
better!
Dive into the World of PHPDive into the World of PHP
www.phpmag.n
aily News Online Artic les Opinion Polls Book Club Selections
http://www.phpmag.net/http://www.phpmag.net/http://www.phpmag.net/http://www.joomla.org/http://www.joomla.org/http://www.jamboworks.com/http://www.jamboworks.com/http://www.jamboworks.com/http://www.phpmag.net/http://www.phpmag.net/http://www.phpmag.net/http://www.phpmag.net/http://www.phpmag.net/http://www.phpmag.net/http://www.phpmag.net/http://www.phpmag.net/http://www.phpmag.net/http://www.phpmag.net/http://www.jamboworks.com/http://www.joomla.org/