Moving my PHP programming to the next level with a better editor

Hello!

I started my web programming adventures by using Dreamweaver to create a dynamic site. I’ve learned a bunch of PHP along the way and would like to start using a more professional editor that focuses on the PHP side of development. I feel comfortable with PHP and have pretty much done all of my coding without “help functions” such as automatically closing braces and code hints. At this point, I’d like to use an editor that will take care of braces, hints, and has good support for OOP, which is where I’m finally headed. Any thoughts about the different editors, especially the free ones, would be appreciated.

It’s not about the editor, its what your comfortable in. If you like Dreamweaver, stick with it. The only things you will get with a different editor would be code hints and a few other shortcuts for launching your code in debug mode. Check out Eclipse if you want to jump ship from Dreamweaver. Also, Netbeans has a nice built in view for Symphony and Zend Framework if you get into those.

But please, lets not turn this into another “what editor to use” conversation. There’s a ton of them out there and this thread will get shut down. If you do want do discuss why or why not another editor will help one “reach the next level”, that would be acceptable.

OK! Thanks…
And, I am in fact going to be using ZF2 so that I will at least take a look at Netbeans.

I don’t believe they have support for ZF2 yet, but 1.x is there (totally different framework)

I would highly recommend phpstorm. It’s a paid for editor, but it is absolutely superb. The code hinting and xdebug support are outstanding. It’s made me a better programmer. Highly recommended: http://www.jetbrains.com/phpstorm/

OK…thank you both for your input. And, out of respect for K. Wolfe, let’s close this thread.

Cheers!

He’s not exactly shutting off conversation. He’s just saying we get these threads a lot…

I’ve not gone into much detail about why I love phpstorm so much (you can check out the videos and features on their site). If you have any questions about it, fire away.

I personally believe using a decent IDE can actually make you a better programmer. I also believe Dreamweaver is not up to the task (it’s ok for designers I suppose, but it’s no good for serious coding). Netbeans is probably the best free ide I know of, but phpstorm is worth the money in my opinion.

OK! :slight_smile:

And, does it have ZF2 support?

I’m not sure it has official ZF2 support, but you can tell it to scan “external libraries” and include the path to ZF2, and it’ll work out all the code hinting for you there. I did the same thing for ZF1 within it, and the code hinting is spot on as a result.

It will also help you with objects, as it’s intelligent enough to read your own code and to understand the flow of things, so if you have a method that returns an array of objects for example, and then do a foreach loop, you’ll get code hinting on the items within the foreach loop itself (so it reads your code and works out the code hinting based on what you have).

It also has some great stuff built in for refactoring, and if you setup xdebug with it you can pause your code at any point and walk through the logic one line at a time, watching all the values of all objects and variables change in real time. It’s great :slight_smile:

Very helpful comments! Thank you for the additional info…

You can do this within any IDE, or really, should be set up in your PHP include path. What Netbeans offers really is just quick access to their zf.bat/zf.sh tools to create controllers, views etc… ZF2 doesnt have this tool yet so there’s no extra functionality to add in to netbeans at the moment.

There are definitely a lot of threads about IDEs, but I’ve also settled down with phpstorm for various reasons as well. Like you, I used to do all of my PHP programming without any real support from an IDE. No auto-hinting, no intellisense, no profiling, no debugging, little to no source control integration. I was more than capable of handling it all on my own. Then I got a .NET job and Visual Studio spoiled me. It did so much for you, assisted you endlessly, and just overall gave you an experience that is unfathomable. I needed that for PHP.

The biggest sell for me for phpstorm was cross operating system support (or specifically support for Linux). I needed that, and I needed a license that would let me use it on both systems. It has wonderful intellisense, auto-hinting, profiling, code analysis, source control integration, debugging ability, and much more that I haven’t even begun to tackle. There is room for improvement as well, but I find it to be a wonderful tool set that has allowed me to code big projects much faster and much easier. I no longer need to open 6 different files to figure out how I spelled that method, or what I named that class.

I’m sure you can get this experience with netbeans, eclipse, and so on, so try them all! Pick what fits you. I tried 6 before I choose phpstorm (and I also choose them because they answered my questions about the product within 24 hours before I was a customer!)

Love the product, and I love the company, but that is just my own impression. I think you will find a capable PHP IDE will serve you very well.

On a slight tangent - have you checked out phpstorm 6? It was only released a few days ago and I’m loving it. The rest client built in is great, and I love the new dark theme :slight_smile:

Thanks for adding the specifics. I do think that for newbie programmers (like I was), it’s good to go old-school to start, much in the same way that it’s good to learn how to spell before using a word processor that can spell for you. However, there comes a point in a programmer’s life where the shift should be to more conceptual issues of programming, and it sounds like having a good IDE will facilitate this transition, as it takes care of some of the more mundane details.

Yeah. A great tip for you - get xdebug up and running. There are a few IDES that will work with it, not just phpstorm, and it’ll change your life. Put some time and effort into getting that running and it’ll become your best friend in no time.

Off Topic:

Yes, I have. I went through the entire EAP of it too and although there are a few issues with the default dark theme, I’ve easily corrected those scenarios for me by customizing some of the font colors or background highlights (could be a linux only issue, but I had a hard time reading some text based on the default settings).

Yes, I agree with that statement entirely.

I’m a coder, not a designer. I teamed up with a designer who was not a coder. He used DreamWeaver on Windows. I use BBEdit on a Mac. We were both happy.* :wink:

php support is not great in BBEdit, at least not in the very old version I still use (8.7.2) but it has facilities like Text Factory and Clippings that let you create your own support stuff. I believe the best way to code php is to have one’s own framework (I have been developing mine for close to ten years). From this perspective I prefer a text editor that does less, not one that does more and gets in my way. BTW, I cut my HTML teeth on Claris HomePage 3.0.

If you were to ask me how BBEdit compares to other choices mentioned in this thread i have to say very honestly: “I don’t know.” I haven’t tried them and I seen reason to do so.

  • I use the past tense because, unfortunately, my designer buddy passed away. Once I asked him his favorite font for writing code. He replied: “Code? What’s that?” :lol:

Wry smile.

Ditto here - well probably abt 7 years… but that is only for one particular channel I target now.

When I dev on my framework out comes vim, but anything else now I’ll tend to use Netbeans, esp if I’m depending on other libraries, for all the reasons stated above. Interesting comments on Storm though.

Things do move on – so it is interesting to have these IDE threads from time to time.

I woke up this morning and thought, I really should provide a more personal account of why I switched other than, I was spoiled by my C# development (using Visual Studio).

Both of those sound like me about a year ago. The problem I was facing, is my PHP work is in a very targeted market that usually requires me to write up a new framework/API to tackle a specific task. Using vim, kate, nano, pico, whatever was fine for syntax highlighting but it failed to allow me to easily remember all of the classes and their respective public methods for me to quickly write the implementation of the API I just built (or portions of the API that may need to invoke lower level classes/methods to perform a task). I found myself using screen so I could have multiple windows/screens open that I had to flip through.

For several years, it was fine, but then I got tired of it. Felt like I was being dragged back to PHP instead of enjoying it (after using C# for 6 years everyday). So my hunt for a nice IDE kicked in and I can’t go back (even as I still only do custom frameworks/APIs). My last API took me a little over 2 weeks to develop (keep in mind, that is 2 weeks working maybe 2 hours a night, 4 hours a weekend – 14-18 hours total a week), that included unit tests, implementing the API, generating documentation (and cleaning it up), etc. Prior to a good IDE, I would have likely spent 4 weeks and most of my 2 hours a night and 4 hours a weekend would have been figuring out what I called that class and its methods (even if they were named well and were guessable, I’m the kind of guy that doesn’t want to guess, be wrong, and then have to go track it down, so I got in the habit of tracking it down up front).

That was by far the best feature every good IDE will handle for you via auto-hinting and intellisense. The hidden cost benefit features of xDebug, profiler, and code analysis each played tremendously in allowing me to get the system built and proven in a short time frame as well. They weren’t used daily (well code analysis was), but any time I had a problem, it was nice pressing a keyboard shortcut and seeing the debugger attach automatically or the profiler start to track the code execution I was wanting to watch. Code Analysis was a “I fell into it” feature. phpStorm runs a code inspection/analysis every time you perform a checkin to your source control. It was through that, where it caught me doing a few bad practices and warned me to change it. The first time I saw it, I went “Wow! Good catch. I could definitely improve upon that.” followed by “I didn’t even realize phpStorm did this automatically…” (however, it does get some things wrong, or goes nuts when you have two classes named them same (one for your tests and the other for the actual API).

Just my story of why I switched and how it helped me write my frameworks/APIs faster. I believe every developer will be at a different cross road as to when a good IDE will help them versus get in their way (I know a lot of developers much stronger than I that still use VIM or something similar over an IDE, so there is personal preference there too – albeit one of them is starting to seriously consider moving to an IDE).

If I could create a plugin for Netbeans that slapped me in the face every time I type :w, I’d probably get more work done. :wink: