Posts Tagged ‘joomla’
Two weeks ago, I was in Kerkrade, Netherlands at J and Beyond giving a lightning talk about Joomla’s True Merit. Here’s the video of that talk, along with the text I originally prepared. My talk is the first one in the video (after Brian introduces me) and the other Lightning Talks follow. Enjoy!
A huge thank you goes out to Jeremy Wilken for organizing the video recordings at JAB and uploading them!
I started off this year in the Philippines doing a missions internship. I packed all of my things into my car, parked it at my parents house, flew halfway around the world, then spent ten weeks working with missionaries. And I loved it. It was a chance to step away from writing code and spend time living in another culture.
And while I was there, I learned something very important about missionary work. You don’t just show up in a country and start a business, school, hospital, orphanage, or church. You meet people, build relationships, and learn from the people around you. You learn how business is done, you learn the local language, and you learn cultural expectations.
Only then do you work alongside nationals. And as you work, you train people. You train people not only until they can run something on their own, but until they start training others. Then you step back and let them own the work.
In contrast, when you run in and do everything on your own, your efforts become merely a means to an end. You create a dependency on yourself. Nationals are robbed of their dignity, believing they can’t do the work themselves. When you’re gone, the work you’ve done is over and nobody continues it.
There’s a direct correlation to the way missionaries must work and the way we approach volunteering for the Joomla project. If we contribute code to Joomla without learning from others, we won’t know what the expectations are. We won’t know what problems others are facing and we won’t know how to direct our efforts.
Worse, if we don’t put an effort into teaching, we’ll eventually become tired and burnt out. Other people in the community will become dependent on us and will never learn how to contribute to Joomla themselves. And when we’re gone, Joomla will fade away.
But if we approach the project ready to learn from each other and train each other, we’ll never have a shortage of people who are ready to maintain Joomla. And we’ll be accomplishing something far greater than simply maintaining Joomla: we’ll be launching new programmers, new designers, new webmasters, and new trainers. And people won’t just learn about Joomla, they’ll learn all of the tools and technologies that go into it.
We’re not here to build perfect software. There will be bugs in the tracker when we release 1.7, 1.8, 2.0, and every version of Joomla that will ever be released. There will always be features missing from the core, and there will always be old parts to do away with. But if we learn from each other, we can stop bugs before they happen. And if we train each other, there will be people ready to fix the ones that do crop up.
Twenty years from now, we won’t care about the way we implemented the Model-View-Controller design pattern in the Joomla Framework. We won’t care about how Joomla was licensed, and we certainly won’t care about Joomla vs. Drupal vs. WordPress. But we will care about the people we worked with, trained, and learned from.
Because the relationships we build through learning and teaching are Joomla’s True Merit.
I’ve been in the United States for a couple of weeks now. The jet lag is over. A considerable amount of Mexican food has been consumed. Pennsylvania is in the middle of the “not quite winter, not quite spring” season. Facebook shows what all of my Filipino friends are doing, but it’s not the same as being there. And I’ve spent time reflecting on the internship as a whole.
Then one day, it hit me: this would have made the perfect reality TV series. We had team tasks every week, a host, a wide mix of people, and an unfamiliar environment. You could have rolled the cameras, added a few “honesty cam” interviews, and tied it all together with strategically placed music. Then we could have used royalties from the show to fund all of the missionaries!
Thankfully, the internship was not a reality TV series. Nobody was voted off Panay Island and nobody went home until the end. No one walked around with an attitude of “immunity.” Dave was not ranking us and deciding who would be eliminated next.
The entire point of the internship was for us to grow and learn by doing things as a team. You can’t effectively do all of those things when you try to perform, show off, and make yourself noticed. You have to listen to everyone and think of them as better than yourself. And you have to rely on God’s power working through you, not your own talents and strengths.
So while nobody made a reality series based on our internship, there were cameras around. Nomil not only made a movie out of our footage, he also made a trailer!
So, what’s next on the agenda? I’m never too far from the Joomla! community, so I’m returning to J! and Beyond for 2011. Then after three days of friends and geekery, I’m taking a side trip to pay a long overdue visit to Landon and Lacey in Kosovo!
So I’d like to explain why I came to this conclusion in the first place, the correct way of avoiding the problem, and a call to solve this centrally so that people don’t have six copies of jQuery loading on their websites.
The real issue
$document = JFactory::getDocument(); $document->addScript('path/to/jquery.js'); $document->addScriptDeclaration('jQuery.noConflict()');
This sometimes works. However, if (for instance) your module used jQuery and the next one used MooTools, you’d run into a conflict even though you had $document->addScriptDeclaration(‘jQuery.noConflict()’) in your code. The advice passed around by myself and the Joomla community was to do this in your code:
JHTML::_('behavior.mootools'); $document = JFactory::getDocument(); $document->addScript('path/to/jquery.js'); $document->addScriptDeclaration('jQuery.noConflict()');
This ensured that MooTools got loaded first and that the conflict would not happen. This also forced MooTools onto the page regardless of whether or not it was being used. It turns out this approach doesn’t really address the real problem: Joomla loads all of your external scripts first, then loads all of your script declarations. So for instance, the following code snippets result in the same script ordering as the previous sample:
$document = JFactory::getDocument(); $document->addScriptDeclaration('jQuery.noConflict()'); JHTML::_('behavior.mootools'); $document->addScript('path/to/jquery.js'); $document = JFactory::getDocument(); JHTML::_('behavior.mootools'); $document->addScriptDeclaration('jQuery.noConflict()'); $document->addScript('path/to/jquery.js');
$document = JFactory::getDocument(); $document->addScript('path/to/jquery.js'); $document->addScript('path/to/jquery.noconflict.js');
In this example, jquery.noconflict.js contains the following code:
By doing this, it’s guaranteed that jQuery.noConflict() will get called immediately after jQuery is loaded by the browser. To recap, the ordering of MooTools and jQuery does not matter if you make sure jQuery.noConflict() is called immediately after jQuery is loaded. After you send jQuery into noConflict mode, you still must either use jQuery() instead of $(), or use one of the referencing methods described here in your jQuery-powered code.
But wait, I still have a thousand extensions all loading jQuery!
Fortunately, there’s an effort underway to standardize and document the use of jQuery in Joomla. If you’re willing to help out, join our Joomla People Group jump into the discussion. We should be able to document a way for extension developers to bundle a jQuery plugin with their extensions, as well as avoid version conflicts. Ultimately, a copy of jQuery should be installed and updated as necessary without the intervention of site administrators.
Hard to believe that 2010 is already more than half over. I have three speaking engagements coming up where I’ll be presenting Joomla Development Tools and Tricks. It’s the presentation I originally gave at J! & Beyond as well as JoomlaDay New England.
First, I’ll be at OpenCamp in Dallas on August 27th – 29th (that’s next week!). OpenCamp is targeted at Joomla, Drupal, and WordPress users. There’s a huge lineup of speakers from the CMS community, as well as the general tech community at large. Tickets are still available, so grab them!
Next, JoomlaDay West will be held in San Jose, California October 1-3. They’re still accepting proposals for talks, so get yours in while there’s still time! This one features not only a regular conference and an unconference, but a “hackable” conference where you can either attend sessions or add your own. Sam Moffat and Andrew Eddie will be flying in from Australia, so what’s your excuse for not coming?
Finally, the first ever JoomlaDay DC will take place on October 16th. We have an early bird rate of $49.95 that expires on August 31st, so sign up today! We have speakers from our local NoVA JUG, as well as ones from the East Coast and beyond.
I finally published my HowToJoomla.net tutorial on using Git with Joomla!. I really struggled with trying to balance an introduction to version control, Git, and Joomla specific considerations, but I think the result was worth the time. One thing I would have liked to have covered would have been some of the GUIs that are available for Git, but that seemed to be a bit much for an intro article. By not covering the GUIs, I was able to focus on the core commands that everyone can use regardless of platform.
In any event, my hope is that this introduction will be useful not only to PHP developers, but also to template designers and site administrators. Any time you start writing even a single line of code is the right time to consider using version control as a part of your Joomla! workflow. It’s one of those tools you never knew to ask about; now you don’t have to.
And if you want to see some Git and Joomla in action, don’t miss my talk at OpenCamp. It’s the same one I gave at JoomlaDay New England as well as J! and Beyond, so now Texans will be ‘git’ting too
On the Joomla! Community Blog, Steve Burge is requesting ideas for better communication between the OSM board and the Joomla community. If you are in any way involved in the Joomla community, please take a few moments to share your ideas with the OSM board. I just sent in my ideas and what I wrote is below. While I’m not sure that my ideas are 100% practical, there definitely needs to be better communication of how much money OSM is needing and what the money will be spent on.
Which questions are important enough to undergo community consultation?
OSM should adopt and publish an annual budget at a set time of the year, detailing planned expenses and desired vs. expected revenue.
Any single purchase totaling more than 5% of the annual budget should be put before community review.
Any decisions that involve compensating members of the Joomla community for ongoing services (greater than one month) should also definitely undergo community review. I think there’s potential for favoritism (or at least the accusation of it) if people who are close to the Joomla community are compensated for tasks behind closed doors.
Financially, these policies should make it possible to pay for routine expenses quickly, while ensuring that “back room deals” do not occur. These policies should also appropriately set the expectations for how much OSM will spend and how much it needs to carry out its mission. “More” is not the answer to “how much?”
Any proposals to change the leadership or governing structure of OSM or the Joomla project should go under community review. There have been far too many times where a new structure is simply announced because “the old one was too burdensome.” While this may be true, a new structure may not necessarily be less burdensome.
Changes or adoptions of OSM policies concerning the rights or responsibilities of members of the Joomla community should undergo community review.
What steps should all these decisions go through?
Community review should be the following process:
- Creating a proposal
- Putting the proposal up for vote with the following options: approve, disapprove (no change), disapprove with suggestions for alternative.
- Voting open for one week.
- If the majority of voters approve, the change is made. If the majority of voters disapprove with no suggestions, the issue is dropped. If there is no majority, the suggestions should be considered, then a new proposal should be created.
Ideally, eligible voters should meet a predetermined criteria (n number of posts on the Joomla forms, etc…). In the absence of predetermined criteria, voting should be open to the public at large.
UPDATE 3/26/10: After the discussion below, I’ve been reminded and convinced that a binding vote is not such a good idea. The logistics are tough to sort out when it comes to who is eligible. More importantly, OSM board members are legally liable for their decisions, while members of the Joomla community do not have this liability. Still, I think that having a simple feedback mechanism (let people either “like” an idea or suggest alternatives) for a set period of time would help things.
UPDATE 3/27/10: OSM Treasurer Dave Huelsmann has posted OSM’s unaudited YTD financials. It appears as though this will now be done on a monthly basis. I believe this will go a long way towards communicating OSM’s financial position and needs so that people can assist and rumors can be dismantled. If you’re not familiar with the way balance sheets and P&L statements work, Dave has also posted some helpful links where you can learn about them.
Joomla conference registrations for 2010 are already filling up, are you going? I’m going to be speaking at several of them, so if you want to catch my talk, be sure to make plans to attend.
First, I’ll be at J and Beyond! in Wiesbaden, Germany from May 30th – June 1st. This conference is international in focus; it has already drawn speakers from North America, Europe, and even a remote video presentation from Australia. Check out the proposals and vote on the ones you’re most interested in! Tickets are €99 for the three day event, which is a total steal (even if you have to exchange from another currency ).
Before the end of the week, I’ll be traveling someplace a little closer to home: Vermont. Registrations for Joomla! Day New England (June 5th) just kicked off, so be sure to get your tickets. While I haven’t been to Marlboro, I have been to other places in Vermont and can attest to the state’s natural beauty Having met Elin, Mitch, Andy, Jen, and Barrie, I can confirm that this JoomlaDay is one not to miss!
Finally, preparations for the first JoomlaDay DC are underway. We’re still working out the venue and details, but we’re aiming to hold it on September 18th. Joomla is used in many Federal agencies as well as non-profits, which makes the Washington DC area the perfect place to hold a JoomlaDay. This will be a sponsored event, so email me at firstname.lastname@example.org if you’re interested in spreading the word about your business!
See you in Wiesbaden, Marlboro, or Washington DC!
I have another How To Joomla article up: How to debug our Joomla code with FirePHP. Just recently, I discovered a plugin that painlessly adds FirePHP to your Joomla site. After installing it and doing some tests, I decided to write an article. In the midst of writing the article, I went to the FirePHP wiki and found another FirePHP plugin for Joomla released by the Kunena team. This one is even better, with tighter integration into the Joomla environment. I see many possibilities for model debugging and exception handling down the road.
Drupal and WordPress also have FirePHP plugins, as do most of the major stand-alone PHP frameworks. Have a look to see if your favorite is listed before trying to hack FirePHP into your next project.
Earlier this week, I made my debut on HowToJoomla.net with an article on How to Fix Joomla Content Plugins. If you’ve used Joomla since the 1.0 days, you may recall that content plugins acted on both articles and Custom HTML modules. In 1.5, this behavior changed so that Content plugins only act on articles from the Article Manager. Fortunately, there are several options for regaining and controlling this functionality, which I outline in the post. Head over and let me know what you think!
When I originally received my copy of the Joomla! 1.5 Development Cookbook, I was in the middle of a large client project. The book sat over on my shelf for a few days waiting to be read. While working on my code, I came to a point where I wanted to add some custom markup to the portion of the HTML document. Although I usually whip out my Joomla Textmate bundle to pull up the right snippet, this wasn’t something I already had preprogrammed and ready to go.
If I learned something, you’ll learn something
I was about to do a Google search, but suddenly remembered that James’ book was in arm’s reach and might have the answer. After turning to the index and finding the topic, I quickly located the exact code I needed to move on. Despite having written a book on Joomla myself, this one came to my rescue at just the right time!
While it took me a while to read all 130 recipes (including time on airplanes, buses, and sitting in my living room), the practical tips and methods were worth it. James covers a wide breadth of Joomla programming topics, matched only by his Joomla Framework reference. Most passages are 2-3 pages long and include relevant information that’s quickly applicable to any Joomla project you’re working on.
Two chapters in this book really make it a must-purchase for any Joomla developer. The Multilingual Recipes chapter gives more in-depth information on internationalization and character encodings than any other Joomla reference I’ve seen. Even if you’re only creating a website in one language, it’s imperative that you understand how character encodings work. Current versions of PHP have some shortcomings with handling UTF-8 strings, but Joomla’s special libraries will help you handle them correctly.
Character encodings aside, Keeping it Extensible and Modular is the most useful chapter in the entire book. This chapter is devoted to helping you work with Joomla’s different extension types and getting around some of the shortcomings in 1.5. For instance, James shows you how to create installable libraries by creating a custom type of plugin.
Also, this chapter has a recipe for using the component installation process to install additional extensions. This method allows you to include your modules and plugins inside of your component package; installing multiple extensions in one click. I plan on using it as soon as I get a chance to work on the Podcast Suite!
While the content in this book is very strong, it does have a couple of drawbacks. While most of the recipes have readily usable code that’s straightforward, a few of them don’t make a strong case for why you would use the described method. For instance, there’s a recipe on creating and raising a custom error level. It goes into how you want to avoid conflicting with Joomla and PHP error codes, but it doesn’t explain why you would want to create a custom error level in the first place. Fortunately, most of the recipes have more context.
I’m willing to read more than two pages… seriously.
The biggest disappointment of this book is in the execution of the cookbook format. Having read other “programming cookbooks” in the past, I know that the goal of these kinds of books is to help you find relevant information on specific topics quickly. However, Packt seems to have decided that providing “quick information” means catering to readers with severe cases of attention deficit disorder.
If you try to read entire chapters of this book at a time, you’ll notice that some recipes are almost identical. In Chapter 7, there are individual recipes on setting the HTML document generator, description, and metadata. These add up to less than three pages, but all include the same introduction at the beginning of each. Additionally, all three of these include “See also” references to each other. These would have worked much better as a combined recipe, including a reasonable scenario where you would want to set these things. In its current form, almost half of your reading consists of headers and duplicated information.
Hidden Joomla treasures
Despite the sometimes choppy format, the Joomla! 1.5 Development Cookbook organizes a lot of how-tos missing from Joomla’s online documentation. Anyone coding anything more than the simplest module can benefit from the recipes in this book. James demonstrates expert programming knowledge and delivers it in a very accessible format. The time you’ll save by having this information at hand will offset the cost of purchasing it within the first week. If you’re writing code for Joomla, you need this book.
UPDATE: you can also read a PDF sample of Chapter 2 from Packt’s website.