Search
Advertisement #3
http://www.salestraining.co.in
Salestraining offer sales training courses and sales training programs throughout India.
Account Login
| Stumbling onto Joomla |
|
|
|
| Blog - General |
|
Before two months ago (about the time I got laid off) I had never even heard of "Joomla". Very odd name... I stumbled onto the CMS (Content Management Software) from a friend of mine who wanted help with their website (http://www.sizzlencuisine.com). She had previously been working with other website designers and wasn't very happy with their progress/communication (what a shocker). I have now spent a few weeks working very diligently to learn what Joomla is about, how to develop a website with Joomla and even how to develop a custom Joomla component (which I now have available for sale on my website). It has, overall, been an intriguing and experience and one that I find worth sharing.
So, I decided to help her out given that I had a fair amount of free time anyways. At this point she had already spent almost $2,000 having these other website developers put the site together and she just need to finish it up so she could promote the site before her next big event. Her website focuses on gourmet food/beverage restaurants/shops in the inland north-west (Idaho area). The website is very content heavy and she needed a way to manage the content herself (write her own articles, upload images, manage newsletters, etc). Honestly, if you were to go to a website shop and ask them to design a website of this scale I believe they would likely come back with a multi-thousand dollar quote just for a bare minimum of what she needed. She, of course, had a laundry list of problems with what the previous developers had "finished" for her. Most of them were very stupid issues which in my mind shouldn't have ever even been seen by her - issues like not being able to see the login screen until you press login, but the login screen shows up in the header instead of the body. When I initially looked at her website it looked very cluttered. I couldn't tell the difference between contest and ads. I couldn't even figure out where to login... I have no idea what kind of reputation these other developers had, but to see this kind of work come from someone that considered themself to be professional astounded me. I suppose my thoughts on the degredation of the developer's good name are a separate subject though. When you initially look at the website's directory structure it can be a bit daunting. There are a great number of sub-directories and even more files. I found that starting out with the code was not a good approach to figuring out her problem. When I opened up the administrator section I found there was a rather nice (and fairly advanced) interface. The concept of joomla's modules, components and plugins was rather fuzzy to me. I am very familiar with those concepts in the C#/.Net and Java world but how it is that it applied to a website developed in PHP was stumbling me (at first). Eventually through playing with the modules long enough I figured out that it really wasn't very different from what I was used to: A modular chunk of code (typically a small chunk) that can be placed in many different locations on a page that provides a distinct function of the component it relates to. Quirks I found that joomla has some quirks. I will only list the more prominent ones that i found:
Making a Component So, there are TONS of components on Joomla's extensions directory. I have been able to accomplish 90% of what I have wanted to do with even just the free components available for Joomla. However, I found one case where a component (even to pay for) wasn't already made (at least not easily accessible). There are plenty of components that come relatively close to what I needed, but I generally found that with Joomla components you don't really want to make changes to them. Not only is it someone else's (generally) un-documented component and that can be time-consuming to make modifications to as you aren't familiar with the code - at least that's my experience. Even beyond that though, what happens when they provide an update to the component? You can't update to the latest version because you have changes in there that will get overridden... For the reasons stated previously I ended up developing my own component for Joomla - I also wanted to be able to say I can develop Joomla components if need be on a resume. Developing the component wasn't really all that bad. There was a bit of a learning curve but all-in-all it only took me three days (from Tuesday to EOD Thursday) to create a full working component that did exactly what I wanted it to do. I am confident now that I could develop the same component in a third of the time on top of it. The components are all driven by the MVC (Model-View-Controller) pattern where the controller determines what view should be used, the view class determines what data is accessible to the template, and the model provides the data to the view (interacts with the database). I had a very hard time initially conceptualizing this in the PHP world (but mainly because I had been unfamiliar with OO PHP). The biggest quirk that I found with the component development was that you had to watch how it is that you name your classes for the model, view and controller. For example, if in the controller you set the view to "listContestants", you have to name your class "EzDrawingViewListContestants" (format: "<<COMPONENT>>View<<VIEW_NAME>>"). If you don't, then it doesn't find the view and throws an error. Joomla automatically associates the model (if available) to the view so that when you are working with the view code you can call the model code simply by $this->get("Data") (for example). Joomla will automatically route that call to the associated modelClass->getData() method. In order for this automatic association to happen though, you have to have your model named in a similar format to the view: "<<COMPONENT>>Model<<VIEW_NAME>>". As an example, the model name I would use for the listContestants view would be: "EzDrawingModelListContestants". BUG: I ended up finding a bug in Joomla (which I never submitted, though I probably should). The bug is that you cannot have a view named "ViewXXXX". Even though I created my view class as "EzDrawingViewViewContestants" it threw errors saying that my template could not be found. As it turned out, it was building the paths for my template directory based on a sub string of my view name. In this case, it was only removing the word "view" because it performed a lastIndexOf() (equivilant) on the class name to generate the directory name. So, it took "EzDrawingViewViewConestants" and last indexed on "view" to come up with "Contestants". My directory was named "viewContestants", not "contestants" and all failed. Final Note Overall, I was fairly pleased with my experience with Joomla. Some of my buddies that are also in the PHP world may hate me for saying it, (as they are avid Joomla-haters) but never-the-less, I didn't mind it. I believe Joomla does a good job for your standard website. Using joomla I would likely be able to develop a full-blown website with most (if not all) of the functionality needed within a week. Now, I'm not saying I would use Joomla for custom web applications, but for most content-based websites, it's great! |
| Last Updated on Tuesday, 26 May 2009 14:06 |





