It's Friday, so it seems like a good opportunity for a discussion post. Today we'll be talking about helpers - basically, any kind of tool that makes your life easier as a developer.
As the name suggests, helpers can be quite helpful. Apparently, developers are lazy, so anything that makes life easier for us is good. Right?
Well, maybe not for everyone. Let's look at a few examples.
You've just finished coding for the day (or for the time being). You've got a great idea for a post on your blog. Do you really want to worry about coding the post by hand? Wouldn't it be simpler to use the WYSIWYG editor?
WordPress contains TinyMCE as its standard post editor. I think it's a great editor. Honestly, I miss it when writing posts for ReadWriteHack, which uses MovableType. The post editor here isn't as good as TinyMCE.
I much prefer using a WYSIWYG editor than writing out the code by hand. It's hard to believe I used to code HTML pages by hand and link them together one by one. This was pre-PHP, pre-CMS. Back then, it took a long time to update my site. Now, I can write posts for multiple blogs with ease.
Roll Your Own
Build your own CMS! Build your own framework! You'll have complete control over every aspect of the code, you'll understand how it all works, and you'll learn a lot in the process.
These are all good points, but they fail to grasp a fairly critical point: building your own framework and/or CMS is no small task. Also, reinventing the wheel is fairly pointless when you can start with a framework such as Zend and build your application on top of that..
Building your own applications is great - but don't spend forever rolling your own framework when you could be doing the fun stuff. There's almost certainly a framework that will meet your needs.
Learn First, Cheat Later
Have you ever read a book on HTML that tells you not to use a WYSIWYG editor before you've learned how to write the code yourself? This probably applies more to Dreamweaver than a blog post editor, but the same justification applies to both: it's a lot easier to edit the code later if you learn it first.
If this seems really obvious, consider that not everyone writes HTML particularly well. It may seem like an "easy" language - but do you validate your code? Also, are you a back-end or a front-end developer? Many back-end developers do not write a lot of HTML.
Templates and Tools
Would you rather write your code by hand, or learn a shorthand technique such as zen-coding?
Do you copy existing templates and modify them for your own needs? Or do you create your own templates?
Also, are you still using FTP to put your files live? This might be handy for deploying quick fixes to a remote server, but you might find it easier to use a deployment tool such as Phing.
What do you think? Do you use helpers - templates, tools and frameworks - in your application? Which ones do you prefer? Are there any we should cover in an upcoming post? Share your thoughts in the comments below.
Photo by Dimitri N.