Which PHP IDE? / What do you use to code?

I'm a Coda fan myself :)

OP: For the mac we've not got as many options as the Windows users but here's a little rundown:

Textmate
Dreamweaver (EWW!!!!)
Coda (My personal choice)
Espresso (Only got a copy last week - looks pretty good!)
Eclipse
BBEdit

There are more but I cant think of them at the mo!
 
Since this is about eclipse pdt.. I am trying to get it going. I got it to import as a project. But how do I get it so that when I see a class being referenced somewhere that I can rightclick it and go to definition?

I assume eclipse can handle that?
You may either right click any variable or class name and select Open Declaration from the dropdown menu or click on var or class and press F3.
 
I've coded many pieces of software, apps and mods using Notepad++, and I've never even touched an IDE. I expect that to continue during my time coding for XenForo once I get my head around the formatting. I'm too fixed into the IP.Board methods, which I love working with.

Personally, I believe it is the talent of the coder, not the power of their tools that makes a great app.
 
I've merged the 2 separate threads so all related discussion is in one place.
 
I've coded many pieces of software, apps and mods using Notepad++, and I've never even touched an IDE. I expect that to continue during my time coding for XenForo once I get my head around the formatting. I'm too fixed into the IP.Board methods, which I love working with.

Personally, I believe it is the talent of the coder, not the power of their tools that makes a great app.
The greatness of an app has nothing to do with the tools that are used to create it, in that respect you are right.

However, you are massively wasting your time if you are messing about with Notepad++ or any other non-intelligent editor when working with systems like IPB and XenForo. Programming with an IDE is faster, less error-prone and more intuitive. My productivity doubled when I switched over to Eclipse, simply because things are there to make your life easier - not to do the job for you, but to assist you.

Don't be a notepad snob, use decent tools to save you time and do a better job.
 
To put the IDE to the test, how does your IDE behave in the following case:

PHP:
[INDENT=1]<?php[/INDENT]
[INDENT=1]class bla extends XenForo_Model {[/INDENT]
[INDENT=1]    public function blubb() {[/INDENT]
[INDENT=1]        $beer = $this->_getPostModel()->getPostsByIds($test, array());[/INDENT]
[INDENT=1]    }[/INDENT]
[INDENT=1]    protected function _getPostModel() {[/INDENT]
[INDENT=1]        return $this->getModelFromCache('XenForo_Model_Post');[/INDENT]
[INDENT=1]    }[/INDENT]
[INDENT=1]}[/INDENT]

PhpStorm marks getPostByIds() as an undefined method. How about the IDE you are using?
 
To put the IDE to the test, how does your IDE behave in the following case:


<?php​
class bla extends XenForo_Model {​
public function blubb() {​
$beer = $this->_getPostModel()->getPostsByIds($test, array());​
}​
protected function _getPostModel() {​
return $this->getModelFromCache('XenForo_Model_Post');​
}​
}​


PhpStorm marks getPostByIds() as an undefined method. How about the IDE you are using?
Almost every IDE out there would need hinting to resolve that code and identify getPostsByIds(). Try this instead:
PHP:
<?php
class bla extends XenForo_Model {
	public function blubb() {
		$beer = $this->_getPostModel()->getPostsByIds($test, array());
	}

	/**
	 * @return XenForo_Model_Post
	 */
	protected function _getPostModel() {
		return $this->getModelFromCache('XenForo_Model_Post');
	}
}
 
Don't be a notepad snob, use decent tools to save you time and do a better job.

I'll second that!

Personally I run two IDE's, Komodo and Eclipse. I love Eclipse, but it's a love hate relationship! When it works, it's the best thing since sliced bread, "insanely great" personified. But when it breaks, it breaks hard, and I just can't afford to be down for a day banging my head on the desk trying to solve the latest bizarre problem (like right now, Ant has just decided to quit working). So I keep Komodo handy, which although not quite as extensible as Eclipse is just as good for PHP work, and is 100% rock solid.

My other strong recommendation is take the extra time to set up xdebug. Worth it's weight in gold. I've learned more about how XF works in the last 12 hours by just stepping through the code watching how XF does it's stuff than I could have in a week of studying static code or API docs (hint hint).

-- hugh
 
I'm actually trying Coda.
Should it be supposed to have auto complete for the XenForo or Zend classes to?
Or just eclipse do that?
 
Why an ide instead of a simple editor?
There might be 10 PHP files driving a single page you're looking at.

Then when you write a plugin, that's at least 2 more PHP files.

Trying to read 12 separate PHP files and suss out the relationships between the files and how the code links together sounds scary to me.
 
There might be 20 PHP files driving a single page you're looking at.

Then when you write a plugin, that's at least 2 more PHP files.

You'd rather view 22 separate PHP files and have to constantly read through them to understand the relationships between the files and how the code links together?
In fact i understood quite nothing up to now!
 
Since this is about eclipse pdt.. I am trying to get it going. I got it to import as a project. But how do I get it so that when I see a class being referenced somewhere that I can rightclick it and go to definition?

I assume eclipse can handle that?

Yes. If you've imported your entire forum root as a project, once DLTK indexing and validation are complete, you'll just automatically start getting the usual popup tips for PHP documenter stuff (method description and arg list), and (in most cases, if PDT can work out the parent class) "open definition" will work.

-- hugh
 
Top Bottom