• The IDEs of March

    by  • March 15, 2012 • PHP, Tools • 2 Comments

    Last Year, Chris Shiflett started the “Ideas of March” movement, and Jon Tangerine quickly coined the “Ides of March” twist and some people followed him. This year, here we are again and while reading my twitter feed I saw Cal Evans’ post with Jon Tangerine’s line. Of course it was early and I read “IDEs”. Since last year I defended the Ideas of March with why you should blog, and I still believe the reasons stand, this year I’ll just make my own twist and talk about IDEs. Yes, its a shameless sorry attempt at a joke.

    “My IDEs of March is PHPStorm” — @rdohms

    This year I decided that NetBeans was just too heavy and when it started getting lost in my Symfony projects I decided it was time to shop around again. I asked a few people what their choice IDE was and then got into testing them. I wanted a full fledged IDE, I still use TextMate on the side for quick editing and for some HTML stuff, but I wanted the full deal: auto complete, debugging, profiling … .

    A huge group of people suggested PHPStorm, which is a paid IDE and that had turned me off the first time I saw it. This time I decided to go deeper and try it out, after all my IDE had gone completely bananas, so i gave it a full work day which i ended up spending more time tweaking then coding. I tweaked a bit of colors, settings and such and by the second day it actually felt very comfortable to work with, and most important faster and lighter then my previous IDEs.

    I had a few problems, sure, they were fixed in the next release, I decided to try out the Early Access version and was blown away. Day after day it felt more comfortable. A few tweaks to shortcuts, and I started looking at other features. And then, i fell in love. To sum up a few nice things:

    • Inspections: a series of inspections that can validate, code, phpDoc and little things like unused vars. The nice twist is it can generate a search-result like report, letting you go fix stuff file by file.
    • PHPUnit coverage plugin: this is cool, this plugin reads a clover.xml report and highlights the actual files in the IDE for code coverage. It also does that natively in the new version, but you must run tests inside the IDE.
    • Test folder highlight: you can tag test folders and test files have a slight color in the tabs, actually handy.
    • Support got {@inheritDoc}

    Those are a few topics, but it really feels nice, has not freaked out on me yet, cleans up memory use pretty well and is just fast and responsive. The company behind it is awesome as well, they are willing to give free licenses to OpenSource developers, which is a plus in my book.

    So, take this March the 15th and make it your IDEs of March day, and try out a new IDE.

    About

    Rafael Dohms is an experienced PHP Developer, Evangelist, Speaker and Contributor. During his years of experience he has become an active member of the community and founded 3 User Groups. He moved to the Netherlands to integrate the WEBclusive team and share his passion for code quality and innovation in the Crowd funding world. In his spare time he also helps manage the AmsterdamPHP User Group, amongst other projects.

    http://doh.ms

    2 Responses to The IDEs of March

    1. Jens
      March 16, 2012 at 8:57

      Are inspections something like those reports generated by phpcs or phpmd?

      In this case, you can use in nb too ;)

      • Rafael Dohms
        March 16, 2012 at 10:38

        They are similar but they go further, they can be for PHP, for JS for code quality, you can also run get info from PHPCS i think, but Inspections cover a few other topics, like phpDoc, so it alers you when your docblock is outdated and stuff.

        • Jens
          March 16, 2012 at 11:13

          Not sure, but i think phpcs can handle some js stuff too.
          Even if i’m a nb fan, i’ll try storm at this weekend :)
          @inheritDoc seems to be a very useful helper, some doc comments in nb are quite cool, they allow you to declare functions which are based on php magic, so you can use them for auto completion.

          example:
          /**
          * @method blocked()
          *
          */
          class User {}

          IDE knows blocked() as method in User. Can storm handle this magics too?

          • Rafael Dohms
            March 16, 2012 at 11:26

            I just tried it and yeah it handles that notation as well, it also handles variable definition, like:

            $variable = $this->magic();
            /** @var User $variable */

            I also updated the post with a picture of the inspections list.

    2. March 19, 2012 at 1:03

      I'm using PhpStorm for now one and a halv year and have bought one license (for the version 1.0 incl. upgrade to 2.0).

      Since then I was just using the EAP versions .. but I decided to buy an upgrade to 4.0 as soon it comes out.

      And JetBrains does also more. For example to generate Bookmarks to start/stop your php-debugger: http://www.jetbrains.com/phpstorm/marklets/

      I'd advice you to also take a look at the Roadmap :) http://confluence.jetbrains.net/pages/viewpage.ac

    3. Evandro Oliveira
      April 3, 2012 at 17:07

      Rafael, o que me fez escolher o PHPStorm, há 2 anos e meio atrás, foi o suporte FrontEnd dele. A possibilidade de mesclar linguagens num mesmo arquivo e ter a cobertura específica de cada linguagem em cada trecho, até hoje não vi IDE nenhum fazer melhor.

      Dentre uns truques, posso citar que, se for necessário escrever grandes blocos de outra linguagem, pode-se utilizar a sintaxe HEREDOC especificando como delimitador a linguagem em questão:

      $content = <<<HTML
      <!– todo o conteúdo aqui será processado como HTML puro –>
      HTML;

      Isso para inúmeras outras linguagens. Além das inspections, também temos as "intentions" que sugerem alternativas desde bizarrices como if ($var == true) até a mescla de condicionais encadeados ou avaliações segundo álgebra booleana.

      Não tinha conhecimento de builds quando utilizava NetBeans/Eclipse, então não tenho knowhow para fazer comparativos, mas posso assegurar que o sistema de build com PHPStorm + Phing também é fantástico.

    4. Lokisd
      July 8, 2013 at 6:31

      They are similar but they go further, they can be for PHP, for JS for code quality, you can also run get info from PHPCS i think, but Inspections cover a few other topics, like phpDoc, so it alers you when your docblock is outdated and stuff.
      A good point but I don't agree with that.. perfect-essays

    5. September 26, 2013 at 14:57

      I think Codelobster PHP Edition works smarter – http://www.codelobster.com

    Leave a Reply