Thursday Nov 20, 2008

Another scripting language supported by NetBeans

 It has been a couple of years since NetBeans has been focusing on supporting scripting languages. The 6.5 release continues to deliver on this trend. The PHP IDE that was launched earlier this year (at JavaOne) has now been formalized and new support for Python has also been added. Scripting languages are very popular and well suited for web application development. In many cases developers use scripting on the client side and Java on the server side. PHP is practically the lingua franca of the presentation layer for MySQL. There is a lot of content out there that helps developer write database driven web applications using PHP & JavaScript. NetBeans does a superb job of supporting this usecase.

Looking ahead, there will be an additional options for web application developers. A new extension of the Java platform, JavaFX, will be released and huge opportunities will now be available for developers who are lookign to embed media, graphics and animation in web applications. In a couple of weeks, the NetBeans community will also release a distribution that supports the JavaFX scripting language.

Wednesday Nov 12, 2008

Message to developers

Here is a demonstration of the power of the JavaFX platform. We are still fixing some issues, so the clip will only play if you are within Sun's internal network an it will only play on the Mac since the clip is encoded as mp4. 

Media player - written in JavaFX Script

<script src="http://jfx.sfbay.sun.com/hudson/job/javafx1.0/label=macosx-universal/776/artifact/build/macosx-universal/release/javaws/dtfx.js"></script> <script> javafx( { archive: "http://blogs.sun.com/octav/resource/SimpleVideoPlayer.jar", width: 530, height: 305, code: "simplevideoplayer.Main", name: "SimpleVideoPlayer" } ); </script> Below is the code of the JavaFX applet that creates the video player. This sample is bundled with NetBeans 6.5, the upcoming  distribution that  has support for JavaFX Script.
package simplevideoplayer;

import javafx.stage.Stage;
import javafx.scene.Scene;
import com.sun.fxmediacomponent.\*;
import javafx.scene.Group;

def mediaUrl:String =
    "http://sun.edgeboss.net/download/sun/09b01806/09b01806_00.mp4";
println("using mediaUrl = {mediaUrl}");
var vidWidth = 512;
var vidHeight = 288;
var fullWidth = 700;
var fullHeight = 400;

var mediaBox:MediaComponent = MediaComponent {
    
    // set the media and make the component visible
    mediaSourceURL : bind mediaUrl
    visible:true

    // the position and size of the media on screen
    mediaX: (fullWidth-vidWidth)/2 // center
    mediaY: (fullHeight-vidHeight)/2 // center
    mediaViewWidth : vidWidth
    mediaViewHeight: vidHeight
    mediaVisible: true

    // determines if the control bar is visible at all
    controlBarVisible: true

    // determines if the control bar is below the media or on top 
    staticControlBar: false
    
    // the position of the scroll bar.
    //leave as the defaults to have it be below the media
    //controlBarX: -1
    //controlBarY: -1

    // set the size for full screen.
    fullScreenWidth: fullWidth
    fullScreenHeight: fullHeight
    
    // make the movie play as soon as it's loaded
    mediaPlayerAutoPlay: true

    // set the volume
    volume: 0.5
};

Stage {
   title: "Simple Media Player"
   scene: Scene{
       width: fullWidth
       height: fullHeight
       content: mediaBox
   }
}

Tuesday Oct 28, 2008

HelloWorld JavaFX

I tried writing a Hello World applications assisted by the latest night build of NetBeans 6.5 that has the built in support for JavaFX Script. I was very pleasantly surprised to see that the IDE generates some sample code by default to help one get started.

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;

Stage{
    width: 250
    height: 80
    scene: Scene{
        content: Text {
            x: 10, y: 30
            content: "Hello world"
        }
    }
}
A quick glance at a couple of other features that I was expecting, shown that the debugger works and one could change the deployment options (use the context menu on the project to choose "Set Configurations | Customize" and deploy the application as an applet, desktop application, mobile emulator, etc. When I have more time, I'll try to play with the media support in JavaFX.

Epic battle

I just won an epic battle :-) getting wireless to work on my MacBook Pro, running Vista. I finally found this blog, which has info that solved my problem. I've been using Vista on my Mac for a while, mostly to test JavaFX & NetBeans 6.5 which includes the mobile emulator. Early adopters may have to wait a little for the NetBeans distributions that supports JavaFX Script, however the team is doing an awesome job, so it won't be long until we ship.

Thursday Aug 07, 2008

Generation z

Generation z (as in zembly).

I am not going to attempt to define demographically what generation z is, however you should think of folks 16 to 22 who think that email is something their fathers do. Technology is their lingua franca. Many of them are also casual developers. Since most of the gen z folks are highly connected at all times one can easily assume that they'll be looking for a hosted development environment, a place where a browser is both the tool and the platform on which they express their creativity. They will also care about ease of use and virality. Just as the Open Source is the place for most talented hard core developers to earn bragging rights and the respect of their peers, Facebook and the other social networking sites are stages on which gen z technological creativity is on display.

I suspect that many of the gen z casual technologists will use a site as zembly to rapidly and collaboratively build a widget or Facebook app. Moreover, they'll have at their finger tips "handles" to web scale web services (e.g. Flickr, Google, Amazon, etc.) that they could duct tape together. The opportunities seem endless.

Thursday Jul 31, 2008

NetBeans helps you get started with JavaFX

I've been waiting since Java One for the release of the JavaFX SDK. This morning, I was finally able to download the bits and to my pleasant surprise the tooling accompanied the release. I installed a distribution of NetBeans 6.1 that includes support for JavaFX script. ~30MB later and a straight forward install I was ready to go. NetBeans bundles a few samples which are useful when you want to learn by modifying someone else's code.


In a nutshell, for a preview the bits fared well and I was able kick the tires of the new language. Of course the availability of the debugging capabilities that I got with NetBeans made my job easier. Developer docs can be found both on the javafx.com site as well on netbeans.org. I am looking forward to the 1.0 release of the SDK later on this year.

Monday Jul 14, 2008

Mix and match

My JavaScript coding skills are not longer that crisp, so I decided to develop a widget using a truly participatory environment such as the one provided at zembly.com. By doing so I put myself in the position to ask for the help of other zembly users. I can grant certain folks the privileges to modify and re-publish versions of the my widget experiment. In the end, I'd like to be able to embed my widget in a more sophisticated application that I'll be developing using NetBeans.[Read More]

Tuesday Jul 08, 2008

VisualVM now part of the JDK set of tools

The NetBeans team just announced the availability of VisualVM 1.0, which ships along JDK 6 update 7.

"VisualVM is a free opensource visual tool integrating several commandline JDK tools and lightweight performance and memory profiling capabilities. Designed for both production and development time use, it further enhances the capability of monitoring and performance analysis for the Java SE platform."

This version of the tool requires Java SE 6, so to run it on the Mac you'll have to install the latest version from the Apple website. In addition you'll likely have to invoke the tool with the --jdkhome flag to load the appropriate version of the JDK.

./visualvm --jdkhome /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/

As you can see from the screen shot, you can easily monitor local and remote Java applications. The tool will help you discover performance and memory bottlenecks, debug threading problems or inspect contents of the heap. The data can be saved into a single snapshot and processed offline.

Monday Jun 30, 2008

Social web application development

The next generation web application development environments may look a lot like zembly.com. First, no installation will be required and developers will use their browser as a platform. Second, application development will be done in a very participatory fashion, where developers, in your social network, will help you develop and leverage your code. Third applications (widgets, services, etc) will be able to draw into the power of the social graph. Give zembly a try and imagine the future.

While using zembly, I strongly recommend using Firefox 2.0. You'll also have to make sure that the Java is enabled in your browser (it will work without the JRE, however the experience in the editor degrades considerably).

Thursday Jun 26, 2008

Build NetBeans on OpenSolaris

OpenSolaris is on path to become a compelling development environment. Once in a while I use my local installation that runs on my MacBook (under Virtual Box) to experiment with different tasks. Yesterday I tried to build NetBeans on OpenSolaris. With that in mind I knew I'll need the JDK (for the compiler), ant to build the sources, mercurial to pull the sources from the NetBeans open source repositories, etc.

In a terminal I became root and started looking for packages (e.g. pkg install mercurial - but this won't work). I found out that at this point the naming is not yet consistent. You can look for software like netbeans or openoffice by name, however for something like mercurial and ant, one has to use SUNWmercurial and SUNWant respectively.

Pulling from the NetBeans repository is simple:

hg clone http://hg.netbeans.org/main

The next step calls for going into the <nbsourcedir>/main/nbbuild/ directory and looking for build targets using ant -projecthelp. "All" seemed an intuitive so I tried it. The bad part is that NetBeans requires ant version 1.7.0 and the version I installed earlier was 1.6.5 :-(. At this point I gave up and I'll ping the NetBeans community for help.


Friday May 30, 2008

Virtualization using Sun's solution

I recently played with Sun's Virtual Box. The score card is mixed. Here are the highlights.

First installation of Virtual Box (1.6.0) on Leopard failed. The installer pointed me to a log that did not exist. A bug. The bad part is that is crashed my MacBook Pro and Java no longer worked as expected until I un-installed Virtual Box. The bad part is that I did not realize that I had a problem with Java and it killed a presentation to some of the Sun folks in Korea. I almost gave up, however Steve encouraged me to try it again ... with feeling:-) I took the advise and I re-installed. This time everything worked well and I was able to install Ubuntu Hardy and OpenSolaris 2008.05. I installed off .iso images that I previously downloaded on my notebook. After the install, both systems behaved as expected (including networking on OpenSolaris, did I say that wireless worked as well - - I've been pleasantly surprised, Tim has now a fan :-)).

Quick note: installing software on OpenSolaris is easy and similar to what one does on Ubuntu. This document gives you a mapping, in case you are a Linux user

Monday May 19, 2008

NetBeans and network.com in Korea

I recently arrived in Seoul, South Korea. I'll be presenting, to customers and the folks from the local office, on NetBeans, web 2.0 and SaaS/network.com. I am yet to make some changes to some of the slides, however I don't have any appointments today and I should be able to customize the presentations with updates from Java One. The network.com have demoed the storage service (Sun internal deployment so far), developer collaboration services and project Hydrazine looks very promising. I need to incorporate these new services and infrastructure that are starting to define Sun's SaaS offering.

The city's architecture is stunning. This is the first time I've been to Asia and the only footage of Korea that came to mind before the trip was from the Olympic stadium and History Channel documentaries from the early 1950's. What I've experience since my arrival last night was very different. The city is vibrant, the people courteous, the skyline reminds my of Chicago, the size of the metropolitan area is overwhelming. Sun's office is located in a highrise (ASEM Tower 15th Floor 159-1 Samseong-dong) next of a world famous shopping mall - COEX. I am looking forward to spending the week in Seoul - learning about the Asian marketplace, customer needs and perhaps visiting a few landmarks.

Stay tuned for pics.

Friday May 09, 2008

Java uber alles

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

Building on the momentum

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

Bleeding edge plugins

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 and OpenSolaris

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

Just another way to learn

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

Achieving virality

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

AMP developement on the Mac

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

Share your technology expertise with others

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

In Boston for a short trip

 

  • 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 :-)

Sunday Mar 09, 2008

Performance analysis and diagnostic aid for Java applications

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 wins the Jolt award - Development Environments

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

Ajax support in NetBeans

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

Embedding charts in web applications using NetBeans

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] },



                  ]
              }";));
?>

About

octav

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