Video: IDE Autocompletion with Propel

Propel has always claimed to be IDE-friendly. But have you ever witnessed it? If, like me, you prefer to use a text editor rather than an IDE, you may ignore how much autocompletion (also named "intellisense") and auto-documentation can improve your workflow.

Here is a brief screencast recording a 3 minutes coding session on runtime code, using the NetBeans IDE:

As you can see, autocompletion works for generated queries (it autocompletes "filterBy()" methods), ActiveRecord objects, and even collections. And you don't even need to tell your IDE the class of the variables you're dealing with: the return types for "findOne()" and "find()" are enough for NetBeans to figure out what $book and $books are.

Propel helps to reduce the time you spend using Model objects, so that you can focus on more important things - like designing and improving this very model.

Posted by Francois Zaninotto 

4 comments

Oct 31, 2010
IcyT said...
Can netbeans also autocomplete the methods of "Book" if you add a foreach-loop in this example? I mean if you want to access these methods while looping the collection.
This doesn't work with Propel 1.5.4 in Eclipse with PDT.
Oct 31, 2010
@lcyT: Nope. The only way to do that would be to generate Collection classes for each model, I'm not sure it makes any sense.
Oct 31, 2010
xplo said...
hi,
autocompletion is awesome => less synthax error and faster to type. Netbeans autocompletion seems a little faster/better than eclipse but i didnt try any new pdt release since 2.2.
IcyT, /* @var $book Book */ inside your foreach loop will wok with eclipse and netbeans
Nov 01, 2010
IcyT said...
Hi explo, this is great, thanks a lot! Just what I needed.

Leave a comment...