Magento developer ToolBox

Magento developer toolbox

  • Sharebar

 

Why do you need to create your own Magento developer toolbox?

Essentially, if you work from a standard toolbox and use best practices you can, to a certain degree, expect a persistent level of quality out of each application that you develop. For instance, if you know what the php code smells are, you can ensure better code quality. But  what if the problem is not just the code, but how the application is set up?

A good point to consider when onboarding new developers, as knowing each tool required for the job will essentially train everyone on how to be more efficient at troubleshooting and resolving problems. More importantly, this will provide insights enabling them to enhance the applications to prevent these problems from happening.

I know every magento developer has its own toolbox and what they rely on to get the job done. I put extra emphasis to the debugging tools because I’m more of a performance junkie. I like to squeeze every ounce of performance out of the cpu, disk IO and memory from the system. I am also a fanatic of everything of the big 3PRE: preventing coding, preheating content and preloading code. More on this later.

I’m a Linux developer, so most of these tools are Unix based and focused but as you will see not all of them are OS dependent but instead Magento Bound.

Here are my top tools for every that in my opinion every magento developer toolbox should have:

Debugging Tools

New Relic

The best way to explain what New Relic does is by simply saying xdebug meets Google Analytics but way better.
New relic should be the #1 tool in every developer’s toolbox although that doesn’t mean we shouldn’t use xdebug as well!!!

Xdebug

Without a doubt the best tool for debugging php code, it has also taught me more about magento and the Zend Framework than any book or tutorial I have read. You should also learn how to use strace and firephp in case xdebug is not available say in a live enviroment but you want to find out what the problem is.

My favorite settings by far in the xdebug configuration are scream and show_exception_trace.

I like my code to talk to me… after all we spent about 80% of our development time reading code. So what if your code could tell you what’s wrong? That’s why I love xdebug scream, because it disables php’s @ (shutup) for errors, warnings and notices, basically saying If something is fishy come tell me about it.

The reason show_exception_trace is one of my favorites is simply because if your application throws an exception which is caught you won’t ever know about it, well xdebug when configured to have this setting on will let you know.

Try running a Magento application with these settings on. You will find out so many issues that could be potentially slowing down your application. As a side note, don’t enable profiling and tracing, just set them as auto trigger and call the required functions to get that functionality.

You should also read about xdebug trace and profile. Trace and profile helped me decide whether to have GeoIP functionality inside Magento or in Nginx. I discovered, because of how the Magento app are organized, you must have the GeoIP functionality directly in the index.php which can really destroy your store performance.

KCacheGrind

If you are going to use xdebug in your magento developer toolbox, then you must have KCacheGrind or a similar application as it will be impossible for you to use the profiling capabilities.

My favorite part by far is looking at the function call percentage and how magento is spending time in areas where it should not.

Magento Profiler

It’s one of the best ways to understand what is going on with every page, now just recently Fabrizio Branca realeased an improved version which you can find here: Magento Profiler and let me tell you I tried it already and don’t know how I could have lived without it up to this point.

Commerce Bug

Like the Magento Profiler but it takes it a step further… because it will let you know pretty much everything that is going on in every page from the loaded collections to the xml driving the page. Commerce bug is extremely useful specially when debugging pages and you don’t know where to start. Let me tell you every beginner should have this tool installed during development.

Productivity Tools

VIM

Any Magento developer toolbox will be empty without vim… hands down the best text editor (sorry emacs) and one of the few you will find installed in most hosting providers. Vim is by far the most customizable editor and one of the most powerful tools overall.

Modman

Developing extensions for software that doesn’t allow you to separate your files from core files, and keeping that extension under version control and making it easy to deploy is now much, much easier. Development of this script was inspired by Magento which forces you to mix your extension files all throughout the core code directories. With modman, you can specify in a text file where you want your directories and files to be mapped to, and it will maintain symlinks for you so that your code is easy to hack and deploy.

Vagrant

Vagrant lowers development environment setup time, maximizes dev/prod parity, and makes the “works on my machine” excuse a relic of the past.

Developers no longer need to worry about setting up complicated infrastructure components. Projects with conflicting dependencies can each get their own sandbox — keeping a developer’s workstation free of the hacks needed for multiple versions of software to coexist.

Operations engineers can no longer need to worry about developers having a different local setup from production. They can experiment and test their configuration management changes before going live.

GIT

I vote we have a Git and Magento certification.

Netbeans

I will never deny my love/hate relationship with netbeans but all other IDEs are  the wrong shape for my toolbox. Netbeans is slow and lacks some simple functionality like quick open files and its Git integration is mediocre at best. It doesn’t integrate with GitHub or Beanstalk either.

However Netbeans is awesome with mysql, phpdepend, mess detector and phpcp not to mention with php unit, zend framework and symphony. It is fantastic to customize and even develop modules for. I should remember that this is a Java IDE with a php addon. Other good options are PhpStorm, kdevelop, eclipse and vim.

Honorable mentions to:

Testing Tools

Percona Toolkit

If you don’t have Percona Toolkit in your magento developer toolbox I have to say that you don’t know much about your database server. You should invest some time into it.

Watir

I know Magento uses Selenium and it has TAF but try watir and you will know why it is so awesome. Watir made my magento developer toolbox way at the very beginning when I was learning ruby and wanted to do some automated real load testing…

PHP Unit

Any magento developer toolbox must have phpunit and php benchmark well tuned.
There is a great tutorial here to integrate PHP unit and Magento.

Security Tools

The only security tool in that list is rats… but I like to think that detecting messy code and doing code reviews as security measures, you know keeping good standards and the human eye in the developers logic or you can just simply use Bastian Ike as your security advisor.

Honorable mentions to:

  • Nginx
  • Memcache
  • APC
  • Varnish
  • Solr
  • htop
  • mytop
  • siege
  • jmeter

Yup, I consider the first 5 tools and not simply software I can use.

So what are yours?

Part 2 can be found here

VN:F [1.9.22_1171]
Rating: 9.5/10 (6 votes cast)
VN:F [1.9.22_1171]
Rating: +5 (from 5 votes)
Magento developer toolbox, 9.5 out of 10 based on 6 ratings
 Magento developer toolbox

About Luis Tineo

Husband, Father, performance improvement junkie, biker and video gamer, Linux user and in my day job I'm a Systems Architect at Blue Acorn.

Tags: ,

  • milali

    I go with Eclipse and Wampp, I have a local lampp setup but I could never get the xdebug breakpoints to work. :( I find developing in wamp painless for source control as Tortise SVN is super easy to use. The only downside wamp is INCREDIBLY slow :(

    Is there a free or affordable windows development environments which works well?

    Or does anyone have a good linux setup which actually works with breakpoints?

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • letas

      I have netbeans with LAMP in Ubuntu Precise (12.04) – I installed it using tasksel and xdebug with breakpoints works fine. I also have nginx installed as well as percona and solr and everything works fine. If you install php-fpm you must change the default port for either xdebug or php-fpm as both try to use 9000. I simply changed the one for xdebug to 9001 and updated netbeans. I believe wamp was the sole reason why I moved to Linux and never looked back :-D

      VA:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
      VA:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • edannenberg

    Nice collection, bookmarked. :) As you use netbeans, maven and the magento plugin might be worth a look. http://mavento.bbe-consulting.de/

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • http://www.kingletas.com letas

      Looking into it as soon as a get a computer. I’ve been wanting to look into Maven for the longest time now and this is the perfect opportunity. Thanks for the tip.

      VN:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
    • letas

      Thanks Edannenberg… I am currently getting my head around Maven now, you don’t know what pandora box you just opened!

      VA:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
      VA:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Pingback: Caching is not performance optimization

  • fbrnc

    Replace Netbeans by PHPStorm and this list is perfect :) (Well it still is, with Netbeans on it.) Also thanks, for mentioning the Magento Profiler!

    Your blog posts and the selection of topics (Magento, Varnish, Performance,…) made your blog to one of my favorite blogs to read! Keep up the good work!

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • letas

      LOL – Believe me at the office I am one of the few that still uses netbeans :-)

      Thanks or the encouragement :-D is really well received and appreciate it

      VA:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
      VA:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • http://www.facebook.com/Euklid Nils Boe Eriksen

    phpstorm simply needs to go into your list. – and dig into the phpstorm plugin http://magicento.com/

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • letas

      This is the one topic I don’t practice what I preach… I have most of my coworkers working with PHPstorm and Magicento, one of them actually fixed a bug in the initial release :P

      VA:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
      VA:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Russel adword

    I agree with fbrnc you should replace Netbeans with PHPStorm and your list will get its perfection. :)

    http://www.cloudways.com/en/managed-cloud.php

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)