On The Web by Ircmaxell
GNU/GPL PageCache Joomla! APC php5 Lighttpd! Redhat
Home arrow Articles arrow Joomla Articles arrow How To Make A Successful Extension
Friday, 25 July 2008
 
 
Featured Site
Main Menu
Home
Articles
Services
Portfolio
Version Information
Bug Tracker
F.A.Q.
Downloads
Forum
Contact Us
Text Link Ads
Latest Version
Feed Icon Page Cache 1.0.8 stable
Release Date: 2007-06-11
Donate!
Login
Syndicate
How To Make A Successful Extension
User Rating: / 1
PoorBest 
Written by ircmaxell   
Sunday, 13 May 2007
       Joomla's extension repository currently has over 1,600 extensions listed.  While this number seems like a lot, it is actually growing quite rapidly.  The reason for this growth, is that there is still a demand for quality extensions in Joomla.  The question is, how to create an extension which will be popular and worthwhile.  If you follow these 8 steps outlined in this article, you should be able to create a decent and usable extension.

Step 1 - The Idea

        The very first step in developing an extension, is creating the idea behind it.  This is either the easiest step (you have a specific need that you need created), or the hardest.  A good way to find an idea for a project is to brows the extension repository maintained by Joomla.  Look for categories with few extensions.  When you find a category, make sure there aren't any good (highly rated) extensions already listed.  If you can't find any, then chances are there is a demand for that kind of application.  Another good place to look is in the forums (many people will ask for an extension that does "x").  Once you have your idea, on to step 2...

Step 2 - Plan, Plan, Plan

        This is the most under performed task involved with extension development.   Once you have the idea, you need to first think about how it is going to function.  There are a bunch of things that you must decide before you ever begin programing.  How is the extension going to interface with Joomla?  Do any core files need to be hacked?  What database tables (and fields) will you need?  What are your "competitors" doing wrong that you can avoid?  What are your "competitors" doing right, that you need to do as well?  What are the common tasks that you will need (aka, what should be places inside of a class file)?  Is there a need for other supporting extensions (modules/mambots)?  Is there a need for a plugin interface?  With the plan all set, now you need to code...

Step 3 - Write The Front End

       Now that you have an idea, and a plan on how to make that idea work, it's time to start writing the code.  There are a few things to keep in mind here, most important of which is compatibility.  Joomla is hosted on anything from Windows to Linux to Unix and beyond, not to mention php3, php4, php5, mysql3, mysql4, mysql4.1, mysql5, apache, lighttpd, thttpd, etc.  What all of this means, is that you should avoid any code that is platform dependent or version dependent (to a certain extent).  A fair compromise between performance and compatibility is to only use functions in php4.3.3 and up, and queries in MySQL 4 and up.  Notice that the heading says "Write the Front End".  What I mean here, is write the functionality of your extension first.  Leave the administration for later.  You'll want to test the functionality and give yourself the framework you need to integrate the administration section.

Step 4 - Write The Back End (And finish it off)

        Now, with the extension working and functional, it's time to write the administration section.  Something you want to consider is whether  you'll use menus or a main page for administration.  Personally, I prefer menus, but some extensions are too big to fit within the menu system (My Page Cache component is bordering on this limit as it is).  Once you have the administration finished, you'll want to go over everything once more.  Does it perform properly?  Is it displaying correctly? Do the administration pages work properly?  If the answer to all three questions is "Yes", than congradulations, you're officially in Beta stage.

Step 5 - TEST, TEST, TEST

        Now that the functionality is all there, you'll need to test the extension.  And when I say test, I do mean test.  Try to break it.  Try it on different servers with different versions of PHP/MySQL.  If you cannot find any more errors, then go to the public.  Offer it to people to Beta test it.  Wait for their replies (Keep testing, but listen up).   This will take a while to do properly, and will not get 100% of the bugs, but it NEEDS to be done.

Step 6 - Package And Release!

        Now is the fun time.  Package up your extension, and prepare for release.  Create a logo, and a name.  Next, decide on a license to release it under (I strongly recommend GNU/GPL).  Once you have these things setup, then you can release the extension.   Add it to the Extensions repository hosted by Joomla.  Once it's approved, wait for the fun to start.

Step 7 - SUPPORT, SUPPORT, SUPPORT

        No matter how well you Beta test, people are going to have issues.  Make sure there is a good place for them to ask questions, AND view other's questions (like a forum, hint hint hint).  Be prepared for A LOT of questions, especially if your extension is popular (I was receiving over 300 e-mails per day on my Page Caching component for the first 3 weeks of release).  If you find a bug, fix it, but don't release the fix immediately (otherwise you'd be issuing a new release 3 times a day).   Once this action dies down, you can start planning the next project.  

Step 8 - SUPPORT, SUPPORT, SUPPORT

        No, that was not a typo, support is THAT important.   Good support separates a well designed extension from a GOOD extension.  Be willing to work with people who do not know about programing.  Also be willing to work with people who think they know more about programing then they actually do.  Of course, there will people who DO know what they are talking about, and these are the best to work with (a lot of times they will find the problem before you can).  Be prepared.

Trackback(0)
Comments (3)Add Comment
Checking into it
written by ircmaxell, May 17, 2007
I see that the RSS and trackback feeds are not working. I'm working on that. As for the component design, it's easy. When you define the menu in com_whatever.xml, the first item is the default action (act='') so

Com_Whatever

Will send you to admin.whatever.php with task (or act) = ''. Simply use that as your default. From there, you can create the main page with links to the rest of the admin functions...
parsing error on rss subscribe...
written by Royce, May 17, 2007
I get the following error when clicking on the rss subscribe for this comment:
XML Parsing Error: no element found
Location: http://www.ircmaxell.com/index...om_content
Line Number 1, Column 1:
menu vs.main page administration
written by Royce, May 17, 2007
Hi there, thanks for the articles. I've written one component for a client and it worked fine, but I was stumped trying to figure out how to specify menu admin vs. main page admin. I wanted a main page admin just because thats how most components seem to be set up, but I could never get it to work. Somehow I ended up with the components parameters in both the menu and main page, but only the menu parameters were passed to the component at run time.

Needless to say, its very confusing to have duplicate parameters and only one set working.

Any tips for how to either specify that the parameters are either menu or main page, and also, did I miss something in setting up the main page parameters?

Hope this makes sense.

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley

security code
Write the displayed characters


busy
Last Updated ( Sunday, 13 May 2007 )
 
< Prev   Next >
Loans - Mortgages - Car Insurance - Internet Marketing
 
Top! Top!
Generated in 0.45396590232849 Seconds