Beruflich Dokumente
Kultur Dokumente
06
Magazine PHP
PHP Magazine
Cutting-Edge Technologies for Web Professionals
International
International
Joomla! 1.5
Story
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.
Introduction
Last time I wrote for 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 afoot, with the impending release of Joomla! 1.5, and several new and exciting initiatives set to come from the IPM stable. This article will outline and demonstrate some of the most important improvements in Joomla!, from a developer perspective.
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 of the Mambo 4.5.2 series, with some goodies added for measure. I am not familiar with the team that presently works on Mambo, and do not track their progress. But it is safe to say that you have two completely independent projects, run by completely independent teams, and with decidedly different 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 significant changes in our evolution, but the new Mambo team has also progressed on their own path. If you were wondering when it was no longer possible to mix and match components written for Mambo/Joomla!, wonder no more now is that time.
First, an Update
Back in August there were some events that triggered the split, which of course we like to refer to as the rebranding of Mambo to Joomla!. It is beyond the scope of this article to outline the events that lead to this happening, but it is important for everyone to know who Joomla! is, and what happened to Mambo. The entire Mambo teams developers, documentation writers, forum 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 folks are not aware of the totality of that agreement, or that it was in complete unanimity that we decided to rebrand. It was the most peaceful option for us, and the entire crew agreed with the plan. So when you look at the low version numbers of
First Impressions
The new template is called rhuk_milkyway, and is brought to you by the same developer that produced the default for the 1.0.x series as well as the 4.5.x series when we were Mambo, Andy Miller. See Figure 1.
Gone is the venerable SolarFlare II template, replaced with a much more manageable layout that has more flexibility with module positions. There are other changes, but the most interesting I will save for the last.
Story
Fig 3: Screenshot of the Login Screen Fig 2: Screenshot of the Login Screen
We have brought out an entirely new set of icons as well, which is a welcome change of pace after looking at the previous icons for several years. We have also consolidated both the Control Panel choices, 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 for components, which is necessary for complex components otherwise you would have a simple menu that required many clicks to get where you needed for more sophisticated applications. We consolidated Content Items and Static Content Items to just one, which in this article are referred to as Articles. This is a test for now, however the final release may include this change in terminology. At the time of writing the debate was still in full swing, but for clarity I will continue to refer 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 of the content areas, also known as WYSIWYG (What You See Is What
You Get) areas. In 1.0.x there were two, one for the introductory text and another for the main body. As this was quite confusing for a lot of newcomers to Joomla!, we decided to simplify the whole content creation process by having one editor area and providing a button to create the Read More... link that signifies a separate page for 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 of the introductory text. We have also changed the code for insertion of images, from {mosimage} to just {image} for clarity, as well as getting away from the deprecated mos terminology which originally stood for Mambo Open Source. Also of note is the new styling of 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 platform to support a wider array of browsers and browser versions. See Figure 5.
Get your International PHP Magazine in just 4 Steps for as low as 3.50 per copy!
warm up... choose
confirm
content
International PHP Magazines new download center facility ensures you have access to the International PHP Magazine at all times. Please visit our subscription service to 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.
And now, for something completely different. Lets go back to the front end interface, login, and try to edit a content item. See Figure 8. Finally, some AJAX magic makes its way to the Joomla! Interface. Perhaps this is just a first step, but also paves the way for the front end content editor interface to be a lot more useful. Here is some dirty laundry from the old days: back in the Mambo universe, we were constantly hearing about how much everyone hated the front-end content editor interface. The problem is, none of us ever used it. The pain we felt to fix 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 front-end when you had so much more power and capability available from the back end interface. Well, quite a few of us started taking jobs developing and customizing sites that used Mambo. For every single one of us, the very first project we worked on was an absolute horror from the front end content editor perspective, that is and we all vowed that the interface needed some serious work. The 1.5 development team put that need into action, and provided a fantastic interface to the front 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 significant, as it takes an early, critical step in the process of us really rethinking how the front end interface should be used. Finally, folks that are restricted to the front end can rejoice!
Story
read developer blogs, articles about the technology from a developer perspective, and find links to other resources to help you be as productive as you can be. Additionally, you can have free hosting of your open source Joomla! extension at forge.joomla.org, where you have access to a tracker, subversion repository, file release system, and more. This topic deserves some more detail, which I hope explains how fantastic a resource this is to you. The JoomlaForge happens to be the biggest instance of 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 of applications including document management, discussion forums, photo galleries, additional WYSIWYG editors, you name it! Not only is there a veritable cornucopia of applications to choose from, you can also set up your own project for free. If you are itching to develop a Joomla! extension and release it under an open source license, you can use all the formidable features 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 for a photo gallery, it is targeted squarely at the developer who needs tools to collaborate with other developers working on a software project. So what can the non-developers do? We created our new software directory at http://extensions.joomla. org, where you can find a categorized list of available applications complete with reviews, links to the softwares home page, and more. This is where we like to send the users of the software to find additional functionality, in a non-techie presentation. This means that the SFEE interface remains focused solely on the needs of the developer, which is what SFEE is so good at.
Unlike the old forge (which I was the sole maintainer of for over a year), the new JoomlaForge is a feature rich, robust environment that really facilitates collaborative development.
Listing 2
Template Conditional Example 2
<jdoc:exists type=modules condition=left > <jdoc:include type=modules name=left style=-3 /> </jdoc:exists>
Most importantly, there are tutorials on templates on the developer portal and of course the default template provided with the 1.5 distribution has all of these examples and more. By studying this template and how it is done, you can easily get started with the new syntax.
The first format makes great sense to a PHP developer, but is problematic for HTML editors, to say the least. First off, your document will not validate and of course it is very difficult to know while you are working on your template if 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 feature is conditional logic, without the need for PHP. See the example in Listing 1.
Listing 1
Template Conditional Example 1
<jdoc:tmpl name=isRTL varscope=document type=condition conditionvar=LANG_ISRTL> <jdoc:sub condition=1> <link href=templates/{TEMPLATE}/css/ template_rtl.css rel=stylesheet type=text/css /> </jdoc:sub> </jdoc:tmpl>
Story
That is the next step. We are participating in the Google Summer of Code program, and hope that one of the projects will be researching and implementing a layer for Joomla! to generate SQL based on the driver, as opposed to hardcoding SQL statements everywhere in your code. There are already existing implementations for us to look at like ADOdb and Propel, and there is also plenty to learn from other languages such as java and python. It is my hopes that this layer is implemented in the next point release of Joomla!, so that you can choose the database platform that is right for you.
Conclusion
The 1.5 release of Joomla! includes some significant changes, as well as some welcome additions to functionality to ease the lives of third party developers for product development and custom work. Not only has the interface been simplified for the end user, the API has been rationalized for the developer. More importantly, this version is a lot more suited for complex applications and sophisticated requirements. This is an excellent platform for integrating systems, for example, and taking on other enterprise-scale challenges. With Joomla! 1.5 available, life as a web developer couldnt be any better!
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 of JamboWorks, 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.
Mitch Pirtle
www.phpmag.net
Daily News
Online Articles
Opinion Polls