X

An Oracle blog about NetBeans for PHP

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 ;)

Join the discussion

Comments ( 29 )
  • duckyflip Monday, May 17, 2010

    These improvements all sound very nice, but

    When will you be adding CakePHP support ?


  • MySchizoBuddy Monday, May 17, 2010

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


  • alex Monday, May 17, 2010

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


  • Tomas Mysik Monday, May 17, 2010

    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


  • Tomas Mysik Monday, May 17, 2010

    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.


  • kvz Monday, May 17, 2010

    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.


  • Michal Tatarynowicz Monday, May 17, 2010

    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.


  • Maghiel Dijksman Monday, May 17, 2010

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


  • Tomas Mysik Monday, May 17, 2010

    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).


  • MySchizoBuddy Monday, May 17, 2010

    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.


  • Tomas Mysik Monday, May 17, 2010

    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).


  • Edwin Sandoval Monday, May 17, 2010

    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.


  • nippur Monday, May 17, 2010

    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


  • Tomas Mysik Monday, May 17, 2010

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


  • Bush Wednesday, May 19, 2010

    Please, add to NetBeans Yii framework.


  • mdomba Tuesday, May 25, 2010

    +1 for Yii framework


  • nayif Saturday, May 29, 2010

    thanks for greate IDE.

    Please, add to NetBeans codeigniter framework.

    http://codeigniter.com/


  • Nicolas Monday, June 7, 2010

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


  • fooG Wednesday, June 9, 2010

    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?


  • patie Thursday, June 10, 2010

    please add CodeIgniter framework support. patie from Slovakia. THANKS


  • Said Bakr Monday, June 14, 2010

    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?


  • Timothy Tocci Wednesday, June 16, 2010

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


  • Scott Sunday, August 1, 2010

    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.


  • radek Wednesday, August 18, 2010

    To Scott:

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


  • MyBelovedPhp Tuesday, August 24, 2010
  • Programmer Tuesday, August 24, 2010
  • PHP Guestbook Tuesday, November 16, 2010

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


  • steve12 Tuesday, January 11, 2011

    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.


  • Lisseurs Cheveux Thursday, February 24, 2011

    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.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services