Friday May 09, 2008

IMHO opinion the '08 Java One had many themes. The event took place right after the OpenSolaris launch and unlike last year when Sun introduced JavaFX, this year the conference had Java + You as its motto. My take is that Java is poised to become more of a consumer brand. It is not hard to see why. Java is part of every day life wether we realize or not. Phones, entertainment devices - PS3 (Blue-ray), desktops, web apps, etc. Basically all the "screen" with which we now interact leverage Java.

NetBeans has been focusing on dynamic languages, especially since there is an opportunity to run Ruby, Python, PHP on the JVM. It is likely for this trend to continue, since Sun is a position to offer optimized deployment for applications that use dynamic languages. This is true now more than ever since most of these languages leverage MySQL and Sun will do its best to tune the database on Sun systems.

The most entertaining session that I attended was Todd Fast's. That were I learned that 1.0 developers are an endangered species :-) Thanks God that I am now in management. I should also hedge my bets and become a casual developer. All I need is a 2.0 development environment and I ready to go.
 

Thursday May 01, 2008

NetBeans has momentum. The relentless innovation has been paying off.
While staying true to Java developers, recent innovations in NetBeans IDE broaden its support for dynamic languages including Ruby, JavaScript, and now PHP.
NetBeans is poised to be the IDE of choice for next-generation web developers.

What is on tap in this release? Lot's, here are some of the highlights:

  • JavaScript
    • Support makes NetBeans an even more compelling IDE for web development. Strengths include editor support, refactoring, and quick fixes/semantic checks.
    •  Makes use of the powerful infrastructure implemented for Ruby support that's been so well received by the community.
    • Debugger support will be available on update center as a preview.
  • Web Services
    • NetBeans makes it easily to create mashups and provides drag-and-drop code generation.
    • Supports web APIs such as Google, Facebook, Yahoo, and YouTube
    • 6.1 includes support for RESTful web services.
    • SOAP UI plug-in available at update center (for testing web services)
  • Databases
    • MySQL Support in Database Explorer makes it easy to create DBs and launch MySQL administrative tools.
    • JSF CRUD Generator lets you generate a CRUD application from a DB schema.
  • Ruby/JRuby
    • Continues to be a priority for NetBeans community.
    • Google “NetBeans Ruby” and take a look at the positive results (you can say that)
    • Enhancements in 6.1 include:
      • Ruby platform manager
      • Support for Rails 2.0
      • New hints and quick fixes in the editor
  • Performance Enhancements (making a fast IDE even faster)
    • Up to 40 percent faster startup
    • Smarter parsing so that code completion is faster.
    • Less memory consumption
  • Other highlights:
    • Sailfin v1 support (SIP application server based on project Glassfish - NetBeans 6.1 now bundles GlassFish v2 ur2)
    • WebSphere 6.0 and 6.1 now supported out of the box
    • Spring framework (version 2.5) now supported out of the box
    • Groovy and Grails plug-ins are now available on the update center
    • Hibernate framework plug-in (this blog has more details) is now available on the update center
    • Axis2 plug-in is now available on the update center
    • Clearcase plug-in now available on the update center

Thursday Apr 24, 2008

Early adopters of NetBeans have the option to point to the development update center and get additional plugins which are under development. The overwhelming # of users should *not* bother, since some of the modules are under active development and likely unstable. However if one wants to live on the bleeding edge, here is what you can do:

From the NetBeans IDE menu: Tools | Plugins | ... Settings | ... Add | 

http://deadlock.netbeans.org/hudson/job/javadoc-nbms/lastSuccessfulBuild/artifact/nbbuild/nbms/updates.xml.gz

 


 

 

Wednesday Apr 23, 2008

NetBeans is widely distributed nowadays. You can get it from java.sun.com as part of the Java SE or EE bundles, as well as from netbeans.org. Ubuntu makes it available in Universe (starting with Hardy) and the community contributed NetBeans to the Debian repositories (for more details on the Linux distributions that include NetBeans, take a look here).

The latest open source product that makes NetBeans (version 6.0.1) available is OpenSolaris (2008.05). I am in the process of kicking the tires of the RC2, that was recently produced in anticipation of the Community One event which takes place next month in San Francisco. I am still struggling with the OpenSolaris install, however I have an atypical configuration: MacBook Pro, partitioned with Boot Camp; I am trying to install in a partition where I previously installed Windows Vista.

Here are some of the issues that I am running into:

<snip from installation log>
Set fdisk attrs
fdisk: fdisk -n -F failed. Could't create fdisk partition table on disk c5d0
Couldn't create fdisk partition table on disk
Could not create fdisk target
TI process completed unsuccessfully
 </snip from installation log> 

 

Monday Apr 21, 2008

I remember, while growing up and going through school, having to study for quizzes. Some were scheduled, others impromptu, but no matter what was the circumstance, I recall having a knot in my stomach in anticipation of the results. Most of the quizzes that I take nowadays have to do with testing my knowledge and the stakes don't seem that high. I look at the new quiz sponsored by the NetBeans team as an opportunity to keep in touch with the language that I came to love and challenge my technical skills.

It is worth mentioning that participating in this quiz can be rewarding in more ways than just stimulating your intelligence and helping you learn. Prizes are awarded weekly and you can win more than once. My only problem is that I am not a legal resident of India and hence I am not eligible to win :(

To take the quiz, just download NetBeans, use its update center to download the plugin (Tools | Plugins  from the main menu and then look the "quiz" under Avaliable Plugins) and you are ready to go. To re-launch the quiz, use Help | NetBeans Quiz.
 

Thursday Mar 27, 2008

On Tueday I attended the SNAP Summit 2.0 in San Francisco (thanks to Ryan) . The usual suspects (Facebook, MySpace, Bebo, RockYou, etc.) attended and either presented or were part of the panel discussions. There was a lot of focus on attracting new developers by making it easy for them to monetize their investment (software). So how does one make money? In a nutshell - facilitating adds in some form. All you have to do is build an application that becomes viral. That sounds simple enough, but how do you achieve the viral growth for that application? Here are some thoughts:

  • Viewer focus
  • Simplicity
  • Novelty
  • Universal Applicability

I heard one of the presenter say that virality is all about action. That thought resonated with me - an application, or feature has to "speak to me" in order to catch my attention.
There was a lot of guidance on how to build applications that are "personable" and have all the attributes that would make users adopt them and share them with others. What, I felt, was missing is guidance for choosing a development environment for building such applications.

On other news, it seems that Yahoo joined the Google's Open Social initiative. Perhaps this is an anti-Microsoft play, since Facebook has Microsoft's backing.

 

Monday Mar 24, 2008

If you want to do any AMP development on your Mac and have Leopard you'll be pleasantly surprised by the out of the box experience.

First of all you the system comes bundled with Apache 2.0 and PHP 5.2.5. To configure the stack is quite simple:

  • "Turn on" Apache - go to System Preferences | Sharing | Web Sharing and check this option
  • Test the installation the web server installation http://127.0.0.1/
  • Find the main configuration file of the Apache web server /private/etc/apache2/httpd.conf
  • Enable PHP - edit httpd.conf (remember to use sudo) and uncomment this line:
    • #LoadModule php5_module        libexec/apache2/libphp5.so
  • Test again by creating some file in the document root: /Library/WebServer/Documents and add the following code snippet
    • <?php phpinfo(); ?>
    • bring up the browser again and invoke the test file (http://127.0.0.1/somefilethatyoucreated.html - you should see a table that gives you the details of the php version that you are running

Blogs are all about sharing, opinion and participation in the new social media dynamic, where the news are made by random folks, and not only the journalism graduates.
The NetBeans blogging contest is just that - an attempt to get folks to evaluate the latest support for JavaScript and the Spring framework, that comes in the NetBeans 6.1 beta. If you are adventurous, try the NetBeans 6.1 nightly build, where you can get a preview of the new design for RESTful web services support and PHP. It is still work in progress, but worth while for the folks looking for the bleeding edge.

Thursday Mar 13, 2008

 

  • Red-eye flight from San Francisco to Logan on United; the airplane staff as in excellent spirits. That was not my case - I am still recovering from the party that Silvia put together last Fri
  • Rented a Monte Carlo - definitely not my favorite car
  • Love the architecture of the houses
  • Hate the weather
  • At the office, Mary just gave a funky looking t-shirt - it has a ... West Coast motif - you could call it Woodstock :-)

Monday Mar 10, 2008

I just tried the latest iteration of the VisualVM tool, which just released a beta. Very impressive, especially the GlassFish related capabilities. I wonder if there is comparable tooling for other application servers. Here is the functionality in a nutshell:

  • Monitoring and performance analysis for Java SE and EE
  • Integrates the features of several JDK tools
    • jps, jinfo, jstack, jmap, and more
  • Provides lightweight memory and CPU profiling
    • Designed for both development and production
  • Can observe JDK 1.4.2 or higher
  • Provides APIs for writing add-on plugins
Nota bene: If you want to monitor GlassFish apps you'll have to get the plugin from the tool's update center: Tools | Plugin and also some minimal GlassFish configuration is required: In the admin console go to Application Server | Monitor | Runtime | Configure Monitoring and set Web Container to "High". You can also try and use this http://localhost:4848/configuration/monitoringService.jsf?configName=server-config  to open the configuration

Wednesday Mar 05, 2008

NetBeans 6 just won the Jolt award for the best Development Environment.
This is excellent news for the NetBeans community, partners and engineering team.

If you've read my previous post on charting for web applications using jMaki, here is another installment on the Ajax capabilities of NetBeans. The 6.1 beta release (due to be released tomorrow 3/6/08) improves on the previous feature set and as far as JavaScript support is concerned, it kicks butt!

So what's on tap?

 

  • JavaScript support in the editor - if you make heavy use of JavaScript in your web apps, NetBeans 6.1 brings the language to life
  • Better support for MySQL - ability to register MySQL servers
  • Performance improvements - especially in startup and project open visual JavaServer Facess application development
  • Support for PHP is still experimental (available on the update center), so I suggest for folks to wait until early April to kick the tires of the PHP support
Check out this wiki page for some more details on the Ajax related functionality as well the new & noteworthy wiki on NetBeans 6.1 beta.

 

Monday Feb 25, 2008

You'll be surprised how easy is to build a web application that charts data using the jMaki framework and NetBeans 6. So let's assume that you want to plot the % of revenue an organization receives every month of an year. A pie chart would likely be your best bet:

So how does one build such a chart? These few steps should get you started:

  • First of all you'll need to get install the jMaki plugin from the NetBeans update center (Tools | Plugins | Available Plugins | jMaki Ajax support)
  • Next get the corresponding charting library - a java.net project and install it in NetBeans (Tools | Palette | Add jMaki Library)
  • Create a new web project and select the jMaki framework in the project wizards dialog
  • Drag and drop the "Google Pie"component from the palette (look for a section called - jmaki-charting-widget ...) after the <body> tag in the index.jsp default page of the project
  • Deploy the application and customize as needed

If you are not a Java guy and want to achieve the same results in a PHP project and application use the following code snippet to build the chart.

<?php
  addWidget( array(
                         "name" =>"jmaki.charting.plotkit.pie",
                         "args"=>"{colorScheme:2}",
                         "value"=>"{
                   xAxis : {
                   title : 'Months',
                   labels : [{ label : 'January'},
                             { label : 'February'},
                             { label : 'March'},
                             { label : 'April'},
                             { label : 'May'},
                             { label : 'June'},
                             { label : 'July'},
                             { label : 'August'},
                             { label : 'September'},
                             { label : 'October'},
                             { label : 'November'},
                             { label : 'December'}
                             ]
                             },
                             data : [
                  {label : 'Set 1', values : [25, 45, 25, 45, 50, 25, 35, 25, 25, 20, 35, 45] },



                  ]
              }";));
?>

Saturday Feb 23, 2008

The NetBeans team just released support for one of the most  popular version control systems (VCS) in the  enterprise - ClearCase. At this point the ClearCase plugin is only available in the current development version of NetBeans: 6.1. Since the support is still experimental, the plugin is available on the update center. In order to try this out, one would have to get a NetBeans dev build.

The details regarding the support for ClearCase can be found here. Rouman blog has even more details.

In my case, I gave NetBeans 6.1 a try for a completely different reason. It is the improved support  for JavaScript. In the previous versions of NetBeans, JavaScript was minimally supported.  Starting last week, I've noticed dramatic improvement. I'll keep a close watch on that and report back.

Sunday Feb 17, 2008

So how can you tell what server is being used to run a website? Here is a simple Java program that can help one figure out the kind of server that serves a particular website.

package whataretheyrunning;

import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author octav
 */
public class SnoopURL {

    String URLString = null;

    public SnoopURL(String URLString) {
        this.URLString = URLString;
    }

    public void snoop() {
        try {
            // build URL
            URL url = new URL(URLString);
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();

            conn.setRequestMethod("GET";);
            conn.setDoOutput(true);

            // start talking
            conn.connect();

            // int length = conn.getContentLength();
            // System.out.println(" **** the length of the content is " + length + " for URL " + URLString);

            System.out.println(" **** Server type is:  " + conn.getHeaderField("Server";) + "\n\n";);

            // get more information
            Map map = conn.getHeaderFields();
            for (int i = 0; i < map.size(); i++) {
                System.out.println(" **** " + conn.getHeaderField(i));
            }

            // cleanup
            conn.disconnect();
        } catch (MalformedURLException ex) {
            Logger.getLogger(SnoopURL.class.getName()).log(Level.SEVERE, null, ex);
        } catch (java.io.IOException ioe) {
            ioe.printStackTrace();
        } finally {
            // do whatever cleanup ...
        }
    }

    @Override
    protected void finalize() throws Throwable {
        super.finalize();
    }

    @Override
    public String toString() {
        return super.toString();
    }
}

The output of this program is something like this:

**** Server type is: Sun-Java-System-Web-Server/6.1

**** HTTP/1.1 200 OK
**** Sun-Java-System-Web-Server/6.1
**** Mon, 18 Feb 2008 04:46:48 GMT
**** text/html;charset=UTF-8
**** policyref="http://www.sun.com/p3p/Sun_P3P_Policy.xml", CP="CAO DSP COR CUR ADMa DEVa TAIa PSAa PSDa CONi TELi OUR SAMi PUBi IND PHY ONL PUR COM NAV INT DEM CNT STA POL PRE GOV"
**** Servlet/2.4,JSP/2.0
**** chunked
**** Starload=star-fep5; Path=/
 

Now let's look at some popular websites.

Sun's www.sun.com is using the old Web Enterprise server, version 6.1 (the same is true for java.sun.com). The site the publishes this blog: blogs.sun.com is powered by Sun-Java-System-Web-Server/7.0 (a newer version of the same web server). Google seems to use their own version: gws. Yahoo does not tell you (returns null). Microsoft eats their own dog food: Microsoft-IIS/7.0. Nice. IBM runs something called: IBM_HTTP_Server (I bet is Apache's web server).



 

Sunday Feb 10, 2008

I have not been doing any development on Windows for a while. I thought I'd give it a try and build some web application using different open source technologies to compare my productivity and think of where to invest in toolability. David Van Couvering, recently, mentioned to me the XAMPP bundle, so I decided to start with this Apache distribution containing MySQL, PHP and Perl.
 

[Read More]

Thursday Feb 07, 2008

Who would have thought that NetBeans will be building tooling for the Eclipse developer community? Runtime tooling that is. I'll explain shortly. The two communities have been engaged in a healthy competition for the hearts and minds of developers at large, however the focus has been the "design time". One could consider one of the new NetBeans projects as a play for a much broader audience, including developers that are still using Vi/Emacs for their development and are not currently using an IDE.
 

[Read More]

Monday Feb 04, 2008

In a previous blog I mentioned that I installed VMWare Fusion 1.1 and Linux (Ubuntu 7.10 - Gutsy). Solaris Express Developer Edition (SXDE) was the next OS that I looking to install (as I was looking to compare the respective SAMP and LAMP stacks). If all this worked out OK, I would get rid of my Parallels installation and stick with VMWare. This is not the first time I've experimented with SXDE, and was curious if the Solaris folks have made more progress.

The answer is yes, however there is more to be done, especially since Ubuntu sets the bar so high. Here are the details


[Read More]

Sunday Feb 03, 2008

Patriots 31 - Giants 21

Giants will be able to run the ball, however they won't be able to stop Brady. The game will likely be close until the 4th quarter.

I am all ready for the party. Time - check, HDTV receiver and TV - check, Snacks - check (thanks Silvia). Right after the game I have to leave to the airport and catch a flight to Munich (on my way to Prague). Kathrine assured me that I have a window seat (46K), but you never know... If I am to believe this seating map, this time we managed to get the absolute last row in the plane. Farther back, I'd have to play Superman :-)

I just wish my Raiders would be playing.
 

Saturday Feb 02, 2008

I gave VMWare Fusion a try. Smooth install, didn't have to consult the documentation. I also took the opportunity to get Ubuntu Gutsy. As always, the Ubuntu installation is sweet - it just works. I had Vista license, however someone decided to make it theirs :-) and I don't have the media any more.

Once Gutsy was installed, I started looking for development tools and add on packages. apt-get does the trick, but you need to know what's available. The easiest way is to use "Applications | Add/Remove" menu, however many packages are not in Universe and you'll have to look on the website for a list packages.

To my disappointment, NetBeans 6 is still not available for Gutsy and I had to settle for NetBeans 5.5. I'll have to see if this version will be good enough for what I am trying to do - look into database migration issues. I know that the NetBeans folks were shooting for Hardy. I'll have to double check with Honza.
 

Monday Jan 28, 2008

Sun's recent announcement to acquire MySQL, reminded me that I actually have a copy of MySQL installed on my Mac. I've done that a long time ago, when I was experimenting with Wordpress (the blogging software) and to easily deal with the compatibility issues of MySQL & PHP, I installed the MAMP software.

I knew that NetBeans bundles the Connector/J JDBC driver, so I wanted to find out how easy would it be to point NetBeans to the MySQL database used when I originally setup Wordpress.

In a nutshell, it was an easy process. I used the "New Connection" wizard on the "Services" (Database node) tab in the IDE and just used the custom port (8889) used by Wordpress, rather than the default one used by MySQL (3306). As it is always the case, a screen shot tells the story better.


I recently experimented with Ruby on Rails, using NetBeans 6. My previous attempt with RoR was about 9 month ago and I remember having to do a lot of curls and makes to get everything configured. Getting started with NetBeans has been very easy, since there is a distribution (19 MB download) for Ruby developers and the IDE also included the runtime.

Given that I know Tor, the main architect and implementor of Ruby/JRuby tooling in NetBeans and I recently googled his name and Ruby. I found this excellent video that got me up to speed in no time. It turns out that the video has been extremely successful - as of 1/28/08 it had more that 100K downloads. Very impressive.


 

Thursday Jan 10, 2008

As a developer using NetBeans you can get a variety of help in using the IDE or learning how to extend and build on the platform. Historically most of the users have been using the mailing list as a resource to get their questions answered. Developers involved in key projects that need enterprise level support and services  should be able to purchase professional support from Sun. Most recently, the support team has been publishing a blog where the NetBeans community members could go for tips on how to effectively use NetBeans and become more productive.

 

The NetBeans team just released another patch for NetBeans 6, to the community. The latest patch includes an update of the JavaServer Faces components library (codenamed - Woodstock). The update improves the runtime performance of the library.

If you want to nominate more bugs to be included in future patches, just take a look at the wiki page.

Thursday Jan 03, 2008

NetBeans sources will be moving shortly to a different version control system - Mercurial. The details of the migration are detailed here. Tonda is in charge, so send him feedback. If you are not familiar with distributed version control systems, take a look at this article. Here is how I configured my own instance of NetBeans 6 to use Mercurial and point to the new repository.

Nota bene: I am running on a Mac - Leopard + Java 1.5.0_13.

  • Get Mercurial (it will require Python)
  • Install the Mercurial plugin from the NetBeans update center (Tools | Plugins) and get familiar with the documentation.
  • Point NetBeans (assuming that you are using NetBeans to build and develop) to the repository (Versioning | Mercurial | Clone Other ...): http://hg.netbeans.org/main
  • If you are looking for instructions on how to clone a repository from the command line, I found this document to be useful
If you run into trouble, write to the team (nb-hg-migration@sun.com) to get support.

This blog copyright 2008 by octav