Whether configuring and theming a new Magento site or developing new functionality to package as an extension, your development environment has a big impact on how much you can get done. You may be able to get away with notepad (or vim for our Linux friends) to edit files for smaller projects, but Magento is a sprawling system and you’ll need more firepower to work with it. In this article we’ll take a look at the essential tools you’ll need to do just that.
Every developer has favorite tools and a workflow that’s unique from other developers, so I won’t dictate which specific pieces of software you should use. Instead, for each piece of your development environment, review some choices if you don’t already have a favorite, and try one on for size. You’ll quickly discover which tools work for you and which don’t.
Editor / IDE
Easily the most important choice for your development environment is your code editor. Editors range from simple code-highlighters to complex commercial IDEs with remote debuggers and integration for source control. For working with Magento, look for an editor which will let you browse large file trees quickly, and which supports highlighting for all the languages you’ll be working with. Code completion is also great, especially if the editor will read your current project and automatically finish class names for you. Other features can be nice, but don’t get caught without at least these few.
As for specific editors, there’s a dizzying array of choices – even among free options – but there are a few editors I’ve seen stand out for work with Magento. Those are: Komodo Edit, Eclipse, NetBeans, and Zend Studio. All of these have the features you’ll need to develop Magento sites, and some are even free. Once you’ve decided on an editor you’re comfortable with, stick with it and learn all the keyboard shortcuts it offers. This will be a pain at first, but once you’ve learned them well you’ll work much more efficiently.
Browser
Since we’re working with PHP, you’ll need a browser to test and debug your Magento work. The standard choice here is Firefox with the venerable Firebug extension. Firebug includes some powerful debugging tools, so it’s always a good choice. Google Chrome has also introduced some fine developer tools, and is worth a look. If you are a big fan of Internet Explorer, it has some tools available, but they may be a little too simplistic to get you through development.
If you’re working with the Magento frontend, you’ll want additional browsers for compatibility testing. Download at least the following: Firefox, Chrome, Internet Explorer 8 and IETester. That last one will let you test your site in IE6 (which still controls more than 10% of the browser market, unfortunately). If you want, you can also download Safari and Opera, but if your site looks good in the rest of the browsers, you won’t get much variation out of them.
Finally, if you’re on an operating system other than Windows, don’t skip testing in Internet Explorer. They own too much market share to ignore. Use software like VMWare to emulate a Windows environment for testing.
Operating System
Let’s be honest, you aren’t going to change your operating system just to develop Magento. Windows, Mac and Linux are all capable of running Magento and letting you plumb around in the program’s internals. As with your editor, learn everything you can about your operating system. For instance, if you use Linux you have no excuse for not being familiar with grep, find and tail.
MySQL Explorer
It’s often useful to find out what Magento is doing to the database, so you need a tool to query MySQL directly. If this is built into your editor, move along. If you’re a big fan of text (I am), use the command-line mysql client. Otherwise, you’ll need a SQL browser. PHPMyAdmin is a proven choice, and MySQL itself has a Workbench worth looking at.
Source Control Program
We’ll cover why you can’t work without source control in a later post, so take me at my word for now. I’m going to break my word from the top of this post and say that – unless you have a good reason – you should just use SVN here. It’s simple, help is readily available, and it will do everything you need in this case. Ignore the flame wars and the purists and let’s move on.
There are many GUI SVN clients for Linux and Mac, but if you’re on Windows you’ll be using TortoiseSVN. For extra control, learn to use SVN from the command line.
Scripting Language
What the heck? Why is a programming language on the list of software to install? Well, as a developer you don’t want to waste time, and knowledge of a scripting language is one of the tools you use to make your life easier and get things done. In other posts, we’ll write scripts to automate some common tasks so we don’t have to deal with them anymore, so get familiar with a language now.
Python and Ruby are popular choices, and they’ll make you a better programmer too! If you’re really lazy, fake it and use PHP as a command line scripting language.
Once you’ve chosen your software, install everything and take some time to get comfortable. If you make configuration changes, make sure you back them up somewhere. Someday you’ll have to change computers, and once you’ve become well acquainted with your environment you don’t want to have to spend time rebuilding your settings from scratch.
You should now be set with all the basic software you’ll need. If you have any questions or if I’ve missed something critical, feel free to post in the comments. Good luck!
The post The Perfect Magento Development Environment appeared first on Coding Basics.