PHP Namespace Support Screencast

Posted by Jeffrey Rubinoff on Oct 26 2009, 07:22:35 PM CET

We've now finished a screencast demonstrating PHP 5.3 namespace support in NetBeans IDE 6.8. (See Code Completion for Namespaces part I). The screencast also shows code hints for assigning variables, namespace naming hints, and how to set the options for PHP code completion.


Category: News | Permalink | Comments [4]

Formatting and Indentation

Posted by Petr Pisl on Oct 19 2009, 02:41:25 PM CEST
I attended this weekend WebExpo 2009 in Prague. I had one session there about developing web applications in NetBeans. Originally I though that the presentation should be divided into two main parts. One part about PHP and second part about Java Web. Because the bulk of the audience were PHP developers, I spent  talking about PHP development in NetBeans almost whole session. After the session there was a long discussion (more than 1 hour) and some people complained about formatting.

As a result I have decided to look at this and to try to fix as many bugs as possible. Because there is not much time for NetBeans 6.8, I would like to ask you for help. I have created task in our Issuezilla, where you can put the cases, when formatting or indentation doesn't work correctly. If you don't have Issuezilla account and you don't want to create it, you can paste the cases here as a comment. A case should contain an example of the code before formatting / indentation and also the same code, but in the right form.

I can not promise that we can fix all these cases, but we will try as many as possible.

Thanks for your help.
Category: News | Permalink | Comments [16]

Sun GlassFish Web Stack video presentations

Posted by Jeffrey Rubinoff on Aug 07 2009, 05:52:26 PM CEST
Videos of CommunityOne presentations about the Sun GlassFish Web Stack, which includes a full PHP AMP stack integrated with NetBeans. Demonstrations include the NetBeans DTrace plugin.
[Read More]
Category: News | Permalink | Comments [10]

Community Contributed Docs

Posted by Jeffrey Rubinoff on Jul 30 2009, 01:09:17 PM CEST
We have a program for NetBeans users to submit their own tutorials, tips and tricks, and how-to docs. It's called Community Docs, and the portal is at http://wiki.netbeans.org/CommunityDocs. It's very popular. However, there have been no submissions from PHP developers! So, I was thinking, perhaps none of you know about it? If any of you have any cool examples of apps that would be the basis of a nice tutorial, or have tips for other users, please consider posting a full description over there. It's a big help to everyone.
Category: News | Permalink | Comments [4]

Frustrated by your PHP configuration?

Posted by Jeffrey Rubinoff on Mar 10 2009, 05:47:40 PM CET

There is now an alternative to setting up your own PHP environment. You can download a server-only OpenSolaris web stack and run it in
a virtual machine. XDebug, the PHP engine, Apache, and MySQL are preconfigured on the web stack. You can work on your PHP project in NetBeans IDE and use the FTP feature to deploy your PHP on the OpenSolaris web stack.

Follow these steps to use the OpenSolaris web stack:

  1. Download the OpenSolaris web stack image and create a virtual machine for it.
  2. Configure the network connection on the virtual machine.
  3. Configure port forwarding.
  4. Create an FTP connection in NetBeans for the web stack on the virtual machine.
See the tutorial Deploying PHP to a Server-only OpenSolaris Web Stack for detailed instructions for setting up the OpenSolaris web stack on Sun VirtualBox.

Category: News | Permalink | Comments [14]

Fwd: Code Completion for the Kohana & Code-igniter Frameworks

Posted by Radek Matous on Jan 29 2009, 10:54:07 AM CET

How to achieve PHP code completion in Netbeans for the CodeIgniter, Kohana frameworks? See following articles:


Category: News | Permalink | Comments [13]

Mac users: MAMP now recommended, not XAMPP

Posted by Jeffrey Rubinoff on Jan 28 2009, 06:09:41 PM CET

Dear Mac users,

There have been a number of issues with configuring XAMP on the Mac for use with NetBeans IDE, most significantly that XAMP sets the owners of MySQL databases to "nobody", blocking Apache access. Therefore I have changed the Mac OS setup tutorial to use MAMP instead of XAMP. In my opinion, the MAMP setup is more straightforward than the one for XAMP, anyway.

Category: News | Permalink | Comments [34]

Fwd: Model-based code insight and completion in NetBeans

Posted by Petr Pisl on Jan 21 2009, 09:46:40 AM CET

I noticed article about developing CakePHP in NetBeans. Although Symen describes, how to improve PHP Doc for Cake PHP classes to help NetBeans to find out a type of a class property, this principle can be used for every framework and for your classes as well. Thanks to Symen for this article.

Category: News | Permalink | Comments [13]

The first alpha version of Prado support

Posted by Petr Pisl on Jan 13 2009, 09:00:00 AM CET

When I published the entry with the first screenshots of Prado support, I promised to publish first alpha version soon. Unfortunately from that time I'm extremely busy and I wasn't able to work on the project to fix all problems. On Sunday I found a little time to work on this and there is the first alpha version.

The bits are compiled against NetBeans development version. You can dawnload the latest nightly builds from NetBeans site. If you want to try it I suggest these steps:

  • Download the nbm with the Prado support. 
  • Download the latest nightly build. Download the OS independent zip file.
  • Unzip the zip file somewhere.
  • Open a console window and go to the folder, where you unziped NetBeans.
  • Go to the netbeans/bin folder.
  • Start NetBeans with --userdir switch:
    • Unix machines:
      ./netbeans --userdir /path/to/test/userdir/folder
    • Win machines:
      netbeans.exe --userdir X:\path\to\test\userdir\folder 
    The main advantage of this approach is that you can run more instances of NetBeans on your machine and one instance doesn't influence others. I wrote more here.
  • In NetBeans invoke Plugin Manager (Tools -> Plugins).
  • In Download tab click on the Add Plugins... button. 
  • Browse the downloaded nbm.
  • Click on the Install button and follow instruction. 
  • You have to restart the IDE.

I created the nbm against the development version, because it was for me much easier to fix certain problems. I have tested just little bit due to luck of time, but I don't expect that everything will work and not everything is implemented. I have noticed that the Prado code completion doesn't have to work in page files at the first time. In such case open the appropriate php file and go back to the page file.

When you will play with this, don't forgot to put Prado framework into the include path of the project.


Category: News | Permalink | Comments [32]

Merry Christmas and Happy New Year

Posted by Petr Pisl on Dec 23 2008, 09:27:09 AM CET

I would like to wish everyone a Merry Christmas and Happy New Year.


Category: News | Permalink | Comments [10]

Patch for NetBeans 6.5 was released last week

Posted by Petr Pisl on Dec 15 2008, 09:26:56 AM CET

On 10th December the first patch for NetBeans 6.5 was published. You can download the fixes through the IDE's Plugins Manager. The list of fixed issues is available here.


Category: News | Permalink | Comments [2]

Evaluating of Symfony support

Posted by Petr Pisl on Nov 26 2008, 09:57:18 AM CET

I have started to work on the Symfony support. In this time I'm evaluating, what we will be able to implement, how the support should be done, and what will offer to the developers. 

Question for Symfony developers: Which productivity features should be a part of such support? I need to know the usecase, when you need a feature, understand the workflow etc. I hope that information from you help me to design useful support.

Is there any tool which support developing PHP applications based on Symfony framework?

Category: News | Permalink | Comments [46]

NetBeans IDE 6.5 is available

Posted by Petr Pisl on Nov 19 2008, 12:00:11 PM CET

Today NetBeans 6.5 has been released. The main page at NetBeans.org site was changed and point out that the new release can be downloaded. I have mentioned many times that NetBeans 6.5 is the first release of NetBeans which supports the PHP development.

Although the support for developing PHP applications is new and young, I hope that it will be useful for many PHP developers and for the PHP community too. I would like to say thanks to all people who contribute to this release and also thanks to you, who provides any feedback here or on the users@php.netbeans.org mailing list.

We did the first step. In front of us there is long way to fit as much as possible, what you need as a PHP developer. This first version was influeced by your requests and suggestions and I hope that we will continue in this cooperation and that the community around this PHP support will grow. Thanks.

Category: News | Permalink | Comments [16]

Building a Flickr slideshow with PHP

Posted by Petr Pisl on Nov 14 2008, 09:57:34 AM CET

A new screencast  is now available on NetBeans TV: Building a Flickr slideshow with PHP. This demo shows off the new PHP features of NetBeans 6.5 by walking through building a simple application to access Flickr.  You will then see how to turn your Flickr images into a simple slideshow using JavaScript and CSS.

Thanks to Justin Bolter for this screencast.

Category: News | Permalink | Comments [0]

How many files does your project have?

Posted by Petr Pisl on Nov 07 2008, 12:41:06 PM CET

I have played again with performance of the NetBeans PHP IDE. For this purpose I have created "PHP code generator" that generates php files with classes, which create large class structure. Still it's somehow artificial, but for testing purposes the generated sources are good and valid.

I did some measurements on Core 2 Duo 2 GHZ machine. I generated php files for four projects as you can see from the result table. I have switch off the Task list window and measured the time of the creating project with the initial indexing of the php files in the project. The initial indexing parses all files in the project and store information about the files in a cache. Basically the features like code completion, navigation etc. don't work directly with the files, but with the information from the cache. The time of the initial indexing is in the second column in result table. It can be increased when you allow to NetBeans to use more memory than is the default value. In such case the garbage collector doesn't have to run so often. For example when I have increased the memory for NetBeans to  512MB then the indexing of the project with 15 000 files was about one minute shorter.

Number of PHP files
Initial project indexing
Opening indexed project
Responsiveness
 2 500  34 s
 2 s
 OK
 5 000  75 s
 3 s
 OK
 10 000  258 s
 4 s
 sluggish
 15 000
 395 s
 5 s
slow

The third column contains times that the IDE needs for opening a project. Because the cache is stored on HDD, the IDE check during opening project, whether the files were not changed externally to keep informations in the cache up-to-date.  As you can see the times are very small.

The last column contains my feeling, when I tried to add a method into a class and navigate through the sources. Working with project with 5 000 files was OK and the slowdown of responsiveness wasn't significant. When I work with the project with 10 000 files, then the IDE was slow sometimes during opening files and I had to wait a while (1 - 3 seconds) for code completion in the top level context. Working with this project wasn't so comfortable like with the project with 5 000 files. Similar situation was, when I try to work with the project that has 15 000 php files. The hyperlink functionality still works great, but using code completion in the top level context needs some patience.

I was evaluating why the IDE is slower with big projects and I  think that there is chance for improvements. If you work with such big project, I recommend to switch off the Task window, which can slow the parsing and opening projects.

I have one question for you. How many php files do you have in your projects? I would like to know, how big are the real projects.

Category: News | Permalink | Comments [21]