Framework support improvements

Hi all, today we will have a look at the latest improvements that can be found in NetBeans PHP Frameworks area. We believe that the most important feature is that code completion in view (or template) files now offers variables from controller (or action) files - this works for both, Symfony and Zend Frameworks. So, let's have for example this controller:

Symfony controller

One can see that we pass a pager variable to our view template so now, we can see it in code completion in view file:

Symfony view

Please notice that the $pager variable is not only listed in code completion items but that NetBeans also knows its type and the file where it is defined. That means that Go To Declaration (CTRL + click) works as well and of course, we can find all the public methods and fields in code completion for the $pager variable itself:

Another Symfony View Sample

Other minor improvements can be found in navigating and running framework commands - now, one can use just one shortcut for navigating from action to view and vice versa and NetBeans automatically calls the correct framework support. The same applies for running framework commands - no need to specify two shortcuts, one for Symfony and one for Zend. These shortcuts can be changed in Tools > Options > Keymap (the default for Run Framework Command is ALT + SHIFT + R).

That's all for today, as always, please test it and report all the issues or enhancements you find in NetBeans Bugzilla (component php, subcomponent Symfony or Zend). Please notice that if you write a comment here but do not report a bug or enhancement, nothing will probably happen ;)

Comments:

These improvements all sound very nice, but
When will you be adding CakePHP support ?

Posted by duckyflip on May 17, 2010 at 04:58 AM CEST #

Can I use them in the newer Symfony 2.0. I know it's in development but still.

Posted by MySchizoBuddy on May 17, 2010 at 05:14 AM CEST #

i thought about this feature yesterday morning and found this implemented today :). very nice. good job.

Posted by alex on May 17, 2010 at 05:27 AM CEST #

To MySchizoBuddy: Sorry, Symfony 2.0 is still in development and so it is not supported so the NetBeans support won't probably work.

Tomas

Posted by Tomas Mysik on May 17, 2010 at 05:29 AM CEST #

To duckyflip: Framework support in NetBeans is not only about NetBeans itself, it is about some minimum requirements that need to be met so we can implement it.

Posted by Tomas Mysik on May 17, 2010 at 05:32 AM CEST #

I'd like to see CakePHP support more than anything.
That'd make Netbeans better than perfect for me.
Anyway. Keep up the good work guys.

Posted by kvz on May 17, 2010 at 05:46 AM CEST #

I hope that what you're actually working on is the generalized PHP framework support, not just support for particular frameworks.

The role of NetBeans as I see it is to create a way for framework developers to easily create and offer for download files that add support for the particular framework to NetBeans.

Posted by Michal Tatarynowicz on May 17, 2010 at 05:46 AM CEST #

Thanks a lot! I've been waiting for completion in views for so long! :)

Posted by Maghiel Dijksman on May 17, 2010 at 05:47 AM CEST #

To Michal Tatarynowicz: Well, it is already done so - it means that some general support exists and each framework implements only its own part (can be easily verified in NB sources). The only limitation now is that this API is not public yet but everyone can use it even today (as an implementation dependency) but of course, there can be some incompatible changes in future versions of NetBeans (but we are trying to be as compatible as possible).

Posted by Tomas Mysik on May 17, 2010 at 05:58 AM CEST #

To Tomas: so netbeans wil be defining a minimum design criteria that all frameworks can implement and they will start working out of the box.

Posted by MySchizoBuddy on May 17, 2010 at 06:02 AM CEST #

To MySchizoBuddy: I meant that currently we need to easily get 2 things:
- list of supported commands (if framework supports them)
- list of default variables available in view files

plus ideally one more thing - stability (it is important for us to rely that there won't be huge changes between particular framework versions).

Posted by Tomas Mysik on May 17, 2010 at 06:13 AM CEST #

Missing Cakephp Support !

Great job with the integration of zend and Symfony framework but I would like to ask you that help us with Cakephp support actually the Cakephp framework is the framework number one around the internet for php language.

Greeting from Chihuahua, México.

Posted by Edwin Sandoval on May 17, 2010 at 10:13 AM CEST #

hola, perdonen si no entiendo. estas características están en netbeans 6.8, se lo puede actualizar?? gracias.

Hi, sorry if you do not understand. these features are in NetBeans 6.8, you can update it? thanks

Posted by nippur on May 17, 2010 at 03:02 PM CEST #

To nippur: Sorry, that is not possible, please use a dev build (URL can be found in the blog post).

Posted by Tomas Mysik on May 17, 2010 at 03:45 PM CEST #

Please, add to NetBeans Yii framework.

Posted by Bush on May 20, 2010 at 01:10 AM CEST #

+1 for Yii framework

Posted by mdomba on May 25, 2010 at 07:03 AM CEST #

thanks for greate IDE.

Please, add to NetBeans codeigniter framework.
http://codeigniter.com/

Posted by nayif on May 29, 2010 at 02:45 AM CEST #

Yes, http://codeigniter.com/ support would be really great!

Posted by Nicolas on June 08, 2010 at 12:00 AM CEST #

If I have a home-grown framework, what can I do myself to add support to netbeans for my framework?

Is there not some way to define attributes of my framework and how they might map to equivalents in the zend framework and have your zend features work with my code?

Posted by fooG on June 09, 2010 at 09:56 AM CEST #

please add CodeIgniter framework support. patie from Slovakia. THANKS

Posted by patie on June 10, 2010 at 04:08 AM CEST #

Hi,
I heard about CakePHP support in 6.9 version. However, I don't find the support of CakePHP in RC2 features. Does it possible to add CakePHP support to the final release of 6.9?

Posted by Said Bakr on June 14, 2010 at 04:34 PM CEST #

Please add CodeIgniter support - http://codeigniter.com/

Posted by Timothy Tocci on June 17, 2010 at 01:39 AM CEST #

This does not work very well in Zend Framework. Variables from the controller (action) have to be referenced as $this->variable within the view script, not $variable. So this code completion doesn't work in my Zend Framework projects because it won't see any of the variables within the $this object.

Posted by Scott on August 01, 2010 at 08:51 PM CEST #

To Scott:
was fixed according to your comment and is reachable since build #2197 http://bertram.netbeans.org/hudson/job/PHP-build/

Posted by radek on August 18, 2010 at 04:20 AM CEST #

Read here how to add completion support for codeigniter:
http://www.mybelovedphp.com/2009/01/27/netbeans-revisited-code-completion-for-code-igniter-ii/

Posted by MyBelovedPhp on August 24, 2010 at 11:54 AM CEST #

Read here how to add completion support for codeigniter:
http://www.mybelovedphp.com/2009/01/27/netbeans-revisited-code-completion-for-code-igniter-ii/

Posted by Programmer on August 24, 2010 at 11:55 AM CEST #

The same applies for running framework commands - no need to specify two shortcuts, one for Symfony and one for Zend.

Posted by PHP Guestbook on November 16, 2010 at 03:04 AM CET #

This does not work very well in Zend Framework. Variables from the controller (action) have to be referenced as $this->variable within the view script, not $variable. So this code completion doesn't work in my Zend Framework projects because it won't see any of the variables within the $this object. http://www.wonshoes.com
http://www.areshop.com/Watches-Omega.html
tks.

Posted by steve12 on January 11, 2011 at 08:42 PM CET #

Vous pouvez également curl luxuriante, des vagues et flip alors lisseur de cheveux vente est super pratique, car il a fait beaucoup, alors vous donner brillant lisse fers GHD dressage! Chaleur étonnamment vite, vite de nombreux professionnels d'autres top à ce moment-là, j'ai essayé toute unité la moins chère Ghd cheveux fers à défriser.

Posted by Lisseurs Cheveux on February 25, 2011 at 12:54 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blogs is written by NetBeans developers who contribute to the PHP support mainly.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today