Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Joomla! 3 Extension Development

You're reading from   Learning Joomla! 3 Extension Development If you have ideas for additional Joomla 3! features, this book will allow you to realize them. It's a complete practical guide to building and extending plugins, modules, and components. Ideal for professional developers and enthusiasts.

Arrow left icon
Product type Paperback
Published in Jul 2013
Publisher Packt
ISBN-13 9781782168379
Length 458 pages
Edition 3rd Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Timothy John Plummer Timothy John Plummer
Author Profile Icon Timothy John Plummer
Timothy John Plummer
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Learning Joomla! 3 Extension Development
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
1. Before you Start 2. Getting Started with Plugin Development FREE CHAPTER 3. Getting Started with Module Development 4. Getting Started with Component Development 5. Backend Component Development – Part 1 6. Backend Component Development – Part 2 7. Frontend Component Development 8. Security – Avoiding Common Vulnerabilities 9. Packing Everything Together 10. Extending your Component with Plugins and Modules Index

Tools you need to develop the Joomla! extensions


Obviously you need a computer to develop Joomla! extensions, but the type of computer you choose is completely up to you. There are free open source software for all the major operating systems, but the most popular operating system in the Joomla! community from my observations at Joomla!Day events seems to be Mac, although personally I use Windows, and there are those that use Linux too. When it comes to Joomla! development, there is no advantage of one operating system over another; you should choose whatever you are most comfortable and familiar with.

You will need to set up a local development environment with a web server, PHP and MySQL, however there are many ways of achieving this. XAMPP is quite popular, and it will work on Windows, Mac, and Linux. There are also a lot of alternatives such as MAMP , WAMP , EasyPHP , and Webmatrix , just to name a few. For Joomla! 3, you should make sure that whichever you choose has PHP Version 5.3.1 or greater, and has MySQL Version 5.1 or greater. Apache webserver is most commonly included in these tools, but there is nothing stopping you from using an alternative webserver such as IIS. You could even set up PHP and MySQL manually if you prefer. You could have no local development environment and just work off a live webserver, but I would not recommend this as it's going to be much faster and more convenient for you to have the local environment, and there is no risk of breaking anything on a live site. Most of these software packages such as XAMPP also include a tool to manage your MySQL database called phpMyAdmin .

To test your code, you will need a web browser, and once again you have many to choose from. I personally like Firefox , but many people develop using Chrome , IE or Safari . I really like the Firebug plugin for Firefox which allows you to inspect elements to see what CSS code is being applied, which is really handy for development purposes. All the major browsers now have some kind of similar development tools, so what you choose to use is entirely up to you. Another great feature of Firefox is the error console, which will help you pinpoint JavaScript errors. You can see the Firebug plugin in the bottom-half part of the following screenshot:

When developing Joomla! extensions, you will need a text editor or an Integrated Development Environment (IDE) to edit the source code. If you are just starting out, try a simple text editor such as Notepad++ or Textedit . The main requirements are that the text editor should support the UTF-8 format and should display line numbers. If you plan to do a lot of development, then an IDE is definitely worth learning. The most popular in the Joomla! community are Eclipse and NetBeans . An IDE has some powerful features that make your life easier and can integrate with Subversion or Git to manage version control. They can also allow you to use a builder such as Phing or Ant to automatically create installable packages for your extensions and simultaneously copy the code to multiple development sites, and they can do file comparisons to see what has changed. Another big advantage of an IDE is that you are able to use a debugging tool such as XDebug to set up breakpoints to step through, and inspect code while it is running. I personally use Eclipse, which can be slow when used on older computers, but if you have a fast processor such as an i7, it works great.

The following screenshot demonstrates how to set Notepad++ preferences to use UTF-8 encoding:

The following screenshot shows where you can turn on line numbers in Notepad++.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime