Miles to go …

March 18, 2008

Ajax World East 2008 – Day 1 Report

Filed under: web2.0 — arungupta @ 7:04 pm


Ajax World East 2008
started earlier today.

I delievered my “Web 2.0 Application development using jMaki” and the slides are available here. There were several demos shown in the talk (using NetBeans and GlassFish) and they are all accessible at the links mentiond below:

Several other related demos are available here. Luckily I could deliver without much hassle inspite of having a high fever and cough! I hope I can hold at least until tomorrow morning when the big preso is scheduled @ 11:35am.

Anyway I attended 3 more talks today and took notes to share:

See below for notes from each talk.

The first talk I attended was: Picking the Right Technology for Enterprise Rich Internet Applications. I got little late and the session was packed with attendees standing way outside the room so I joined them.

The session talked about AIR, Silverlight & JavaFX as three possible technologies for Enterprise RIA. Per the talk, here are the basic criteria for RIA tools requirement:

  • Seamless deployment on client
  • High penetration of runtime
  • Web browser independence
  • Fast client/server communication protocol
  • Robust security

Of course, this session was given in Ajax World so pros/cons of Ajax were dicussed:

Pros of Ajax Cons of Ajax
No deployment required Ajax apps are browser depdendent
100+ Frameworks 100+ Frameworks
Open Source, no need to purchase software license Expensive due to long cycle, skilled developers demand top rate
JavaScript is an interpreted language, entire source code can be viewed using “View Source”
Network communication speed is not optimizedf for Ajax requests

And then basically it talked about the three technologies and their pros & cons are well captured in the slides.

The second session I attended was Performance Tuning your Ajax Applications. This was an interesting session and I learned a few tricks. Interstingly we have implemented quite a few of these performance enhancements in jMaki already.

Improving the performance of Ajax applications require tuning the following parameters:

  • Number of requests
    • Reduce number of JavaScript files that are loaded. This is the most important since each request to the backend adds extra cost. Even when the scripts are cached, the browser still makes a request (unless Since-Modified header is set correctly).
    • Typical approaches are to concatenate the files at dev time or at runtime based upon request.
    • Dev time approaches
      • Ant – concat all JS files using <concat> task
      • Dojo – Run Rhino over all provide/requires and then concatenate the files
      • Command-line
    • Run time approaches – Concatenation happens depending upon the request. Cons are:
      • Server-side dependent
      • Makes it harder to distribute code
      • Server is loaded as concatenation happens on server (mitigated with caching)
      • Works for <15 JS files
      • Does not track dependency
  • Size of requests
    • Remove white spaces and comments (Packer, Dojo, YCompresser, SafeCompress, ShrinkSafe are some of the tools)
    • Shorten the variable names
    • Gzip the code
    • Semicolon is optional but needed if you remove EOL (careful when compressing the code)
      • Drastically reduces the file size (e.g. Apache XAP reduced the file size from 330 kb to 70 kb)
      • Lots of gzip tools
      • Need to put appropriate headers so that browsers recognize gzipped content
    • Coding Style
      • Single line “if” and “for” do not need “{ }”
      • Combine var declarations into a single var such as var x=1, y = 2;
      • Use JavaScript style object
  • Time of requests
  • Time of initial code completion
    • Minimize the time that is executed @ start up
    • Bring the data once the initial page is loaded
    • Show images telling users that something is going on
      • Distracts user from the time it’s taking
  • Other tips
    • Don’t write your own parser  - use the native parsers
    • “If” statement optimization
    • Use the native facilities like getElementById() or getElementByTagName()
    • Consider different approaches of DOM creation
      • Tail Recursion
      • Setting the value in innerHTML
    • Consider JSON over DOM for object graph traversal – JSON could be much faster

Similar tips can be used for CSS as well.

My third talk of the day was Performance Paradigm of a Mashup World.

This talk given by Vice President of Webmetrics and laid a special emphasis on “Collaborative Monitoring” for performance measuring any mashup. This process involves not only monitoring your own application, but also setting up agents that measure performance with other services being invoked in the mashup, their further partners and so on. It also talked about a layered approach of using:

  • Standard monitoring – HTML page load time, DNS request processing time, etc.
  • Pixel Mapping monitoring – required mainly for GUI intensive application
  • Web services monitoring – Used for partner monitoring

This was further clarified using a
6-step process:

  • Know your apps
  • Learn where the points are in your ecosystem
  • Measure your perspective
  • Monitor your APIs
  • Collaborate within your organization
  • Collaborate with your partners & customers

That’s it!

Check out some of the pictures:

The expo hall opens tomorrow and Sun’s booth is right between the ballroom and the main door to expo hall, can’t miss us ;)

The complete album is available at:


The Internet connection at the Roosevelt hotel is painfully slow inspite of charging $14.95/night where as most of the “modern” hotels offer free wireless :(

Technorati: conf ajaxworld newyork glassfish netbeans ria sun web2.0 jmaki

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

March 17, 2008

Ajax World New York 2008 – This Week

Filed under: web2.0 — arungupta @ 3:02 am

Sun Microsystems is a Gold sponsor of Ajax World East 2008. The event kick starts in New York City tomorrow and you can see the complete agenda here.

From Sun speakers, you’ll hear how jMaki, GlassFish Comet, GlassFish and NetBeans provide an easy-to-use and industry-grade platform to develop and deploy Rich Internet Applications. Here is the list of Sun sessions:

Here is my wish list of sessions that I’d like to attend:

Tuesday, Mar 18
Picking the Right Technology for Rich Internet Applications Track 5 2:00 – 2:45pm
Ajax Applicability: When should Ajax be used ? Track 2 2:50 – 3:35pm
RIA Approach for Web 2.0 Development using jMaki Track 3 3:40 – 4:25pm
Wednesday, Mar 19
Opening Keynote: Can we fix the Web ? Opening Keynote 7:30 – 8:20am
Think Fast: Accelerate Ajax Development with Appcelerator Session 2 8:25 – 9:15am
REST and Ajax Reconciled Track 6 9:20 – 10:05am
Enterprise Comet: Real-Time or Real-Time Web 2.0 ? Session 4 11:00 – 11:30am
jMaki as an Ajax Mashup Framework Session 5 11:35 – 12:05pm
Understanding the top Web 2.0 Attack Vectors Track 3 12:10 – 12:55pm
Building Web 2.0 Applications with Project Zero Track 3 2:05 – 2:50pm
Ajax and Social Computing for the Enterprise Session 7 2:55 – 3:30pm
Aptana IDE: Your unfair advantage for Ajax etc. Track 3 5:20 – 6:05pm
SYS-CON.TV Power Panel: The Business Value of RIAs Session 10 6:10 – 6:55pm
Welcome Reception 6:30 – 8:30pm
Thursday Mar 20
RIA Adoption in 2008: Risks, Rewards, Challenges & Opportunity Opening Keynote 8:00 – 8:50am
Ajax and Rails Track 6 8:55 – 9:40am
Now Playing: Desktop Apps in the Browser Session 3 9:45 – 10:15am
DreamFace: The Ultimate Framework for Creating Personalized Web 2.0 Mashups Session 4 11:55 – 12:25pm
Securing Ajax Development and Testing Track 6 12:30 – 1:15pm
Asynchronous Ajax for Revlutionary Web Applications Track 3 2:15 – 3:00pm
Saving your Investment: Transforming J2EE Applications into Web 2.0 using GWT Track 4 3:05 – 3:50pm
Building Scalable Ajax Applications using GlassFish Comet Track 4 5:30 – 6:15pm
SYS-CON.TV Power Panel: What Lies Beyond AJAX? Session 9 6:15 – 7:00pm

It’s only a wish list cause I’ll be spending time at Sun booth in the Expo Floor as well and this is New York City ;)

See ya there!

Technorati: conf sun ajaxworld jmaki glassfish mashups comet netbeans ria

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

March 16, 2008

Travel Schedule – Next 5 weeks

Filed under: General — arungupta @ 11:30 pm

Here is my travel schedule for next 5 weeks:

Mar 17-21 Ajax World, New York Web Application Development using jMaki
Mar 25-26 The Server Side Java Symposium, Las Vegas Rails powered by GlassFish & jMaki
Mar 27 Developer Update, St Louis Westport DoubleTree, FREE event Open Source Web Services stack in GlassFish
Mar 28 Developer Update, Kansas City, FREE event Rich Internet Applications and GlassFish
Apr 16-19 FISL, Brazil Web 2.0 Application Development using jMaki and
Asynchronous Ajax for Revolutionary Web Applications

Stop by and say hello if you are present at any of the events. You’ll hear about different GlassFish technologies:

  • How Metro provides enterprise-grade open source Web services stack for meeting all your needs
  • How jMaki allows you to create Rich Internet Applications
  • How Rails applications can be powered by GlassFish & jMaki
  • Asynchronous Ajax that allows you to scale your applications tremendously
  • And any other topic that you are interested in :)

Drop a comment if you are interested in a run or meal together ?

Technorati: conf glassfish metro webservices netbeans jmaki ajax newyork lasvegas stlouis kansascity brazil fisl ajaxworld tssjs

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

March 14, 2008

GlassFish and JRuby @ Silicon Valley Web Developer JUG – Mar 18, 2008

Filed under: web2.0 — arungupta @ 6:00 am

Vivek will be talking on JRuby support in GlassFish in Silicon Valley Web Developer JUG on Mar 18. The coordinates are:

GlassFish JRuby Logo Date Mar 18,. 2008
Time 6:30 – 8:30pm
Location Google, Inc. (map)
Tunis Conference Room, (Bldg. 43)
1600 Amphitheatre Parkway,
Mountain View, CA
Silicon Vallye Web Developer JUG Cost FREE
Register (optional) Here to participate in a free give-away drawing

The complete agenda for the evening is:

18:30-19:00 Arrive & mingle
19:00-19:45 Scala
19:45-20:30 JRuby

Here is the current status of JRuby/GlassFish:

Vivek leads the effort for different scripting languages in GlassFish so feel free to ask him any related question :)

Thanks to Kevin & Van for giving us the opportunity to talk!

Technorati: conf jruby ruby rubyonrails glassfish svjug webjug

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

March 13, 2008

GlassFish v3 gem 0.1.2 released

Filed under: web2.0 — arungupta @ 8:20 pm

Pramod announced the release of GlassFish v3 Gem ver 0.1.2. The focus of this release is bugfixes:

After #4228 fix, you can easily follow TOTD#28 to create a scaffold using Rails 2.0 and deploy it on GlassFish gem instead of WEBrick – works on JRuby 1.1 RC2.

You can verify if have 0.1.1 version by giving the command:

Macintosh-187:jruby-1.1RC2 arungupta$ bin/jruby -S gem list -d glassfish

*** LOCAL GEMS ***

glassfish (0.1.1)
    GlassFish V3 Application Server for JRuby

You can update to the most recent version by giving the command:

Macintosh-187:jruby-1.1RC2 arungupta$ bin/jruby -S gem update glassfish
JRuby limited openssl loaded. gem install jruby-openssl for full support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Updating installed gems...
Updating metadata for 634 gems from http://gems.rubyforge.org
.............................................................................................................................
.............................................................................................................................
.............................................................................................................................
.............................................................................................................................
.............................................................................................................................
.........
complete
Attempting remote update of glassfish
Successfully installed glassfish-0.1.2-universal-java
1 gem installed
Gems updated: glassfish


And then again verify using the following command:

Macintosh-187:jruby-1.1RC2 arungupta$ bin/jruby -S gem list -d glassfish

*** LOCAL GEMS ***

glassfish (0.1.2, 0.1.1)
    GlassFish V3 Application Server for JRuby

If you installed version 0.1.0 then you need to uninstall it and install the new version using the following commands:

bin/jruby -S gem uninstall GlassFish
bin/jruby -S gem install glassfish

All the latest information about the gem can be found at GlassFish JRuby wiki or JRuby wiki.

Please use the gem and send us feedback on GlassFish forums, dev@glassfish or gem mailing list.

File issues in JIRA or RubyForge or GlassFish Issue Tracker.

Technorati: glassfish v3 jruby ruby rubyonrails gem

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

March 12, 2008

jMaki on Rails – Reloaded for NetBeans 6.1 beta & Rails 2.0

Filed under: web2.0 — arungupta @ 12:02 am

NetBeans 6.1 Beta was released last week. Amongst the many improvements, one of them is the bundled JRuby 1.1 RC2 and Rails 2.0.2. The jMaki plugin used to work fine with Rails 1.2.3 but need to be updated because of changed file name extensions for the default generated views (“.rhtml.erb” instead of “.rhtml”). With this release of NetBeans, jMaki plugin has been updated to work in this configuration as well.

This blog provide detailed steps to install jMaki plugin, create a simple Rails 2.0 application using NetBeans IDE and update the generated scaffold to use a Yahoo Data Table widget for displaying the data. It is an update to screencast #web8, lets get started!

  1. Install the jMaki plugin – In NetBeans IDE, go to “Tools”, “Plugins”. Select “jMaki Ajax support” and click on “Install” button as shown in the following figure:

    Follow the instructions to install the plugin. The IDE is restarted after a successful install.

  2. Create a new Rails project
    1. Create a new Rails project by selecting “File”, “New Project…” and selecting “Ruby” and “Ruby on Rails Application”. Take all the defaults as shown below:


      and click on “Next >”.

    2. Choose “Specify Database Information Directly” and specify the database configuration information as shown below:


      and click on “Finish”. You need to make sure MySQL server is running.

  3. Generate Scaffold and Database structures
    1. Right-click on the newly created project, select “Generate…” and enter the values as shown below:


      and click on “OK”. This creates a scaffold and model that would allow us to perform CRUD operations on Title, Author, ISBN and Description for a Book.

    2. Create the datbase by invoking db:create target. This is done by right-selecting the project, select “Run Rake Task”, “db” and then “create” as shown below:

    3. Create the database tables by running “db:migrate” using the similar steps described above – “Run Rake Task”, “db”, “migrate”.
  4. Add and Configure jMaki widget
    1. In the project, expand “Views”, “books” and double-click on “index.rtml.erb” to edit it. This page is used to display all the books from the database table in an HTML table. It also shows links to perform CRUD operations on each book item. From the jMaki Yahoo palette, drag-and-drop a “Yahoo Data Table” right after “</table>” tag. The generated fragment looks like:

    2. The default generated code fragment shows 4 columns in the table. Lets add a new column to display the CRUD operations link. Add the following fragment:

      { :actions => 'Action', :id => 'actions' }

      right after

      { :label => 'Description', :id => 'description'}

      You also need to add a comma “,” after the Descrption column fragment. The updated code looks like:

    3. Add the following Ruby fragment right before “<%= jmaki_widget” generated code:

      <%
      @rows_data = []
      for book in @books
        @rows_data << { :id => book.id,
          :title => book.title,
          :author => book.author,
          :isbn => book.isbn,
          :description => book.description,
          :actions => link_to('Show', book) + ' ' + link_to('Edit', edit_book_path(book)) + ' ' + link_to('Destroy', book, :confirm => 'Are you sure?', :method => :delete)
        }
      end
      %>

      This fragment creates a JSON array, @row_data, in the format expected by Yahoo Data Table widget, after retrieving the values from the database. 

    4. Finally, instead of reading the static values for columns, use the newly created “@row_data” to populate the values. The code with all the changes looks like as shown below:

  5. Run the project
    1. The scaffold is now accessible at http://localhost:3000/books. This page in the browser looks like:

    2. After adding couple of entries, the page looks like:

Previous entries that shows how jMaki can be used with Ruby-on-Rails in NetBeans IDE can seen here.

Technorati: netbeans jmaki jruby ruby rubyonrails mysql

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

March 11, 2008

BitNami’s JRubyStack = JRuby + Rails + GlassFish Gem + MySQL all bundled together

Filed under: web2.0 — arungupta @ 8:00 am

BitNami provides easy-to-use, integrated and multiplatform install bundles for different open source apps. They released JRubyStack last week which includes JRuby 1.1 RC2, Rails 2.0.2, GlassFish v3 Gem 0.1.1, MySQL 5.0.45 and some other miscellaneous components. The components mentioned here are all you need to get started with hosting your JRuby-on-Rails applications on GlassFish. Refer to release notes for more details.

The steps below walks you through installation of JRubyStack. It shows how this stack provides an integrated and ready-to-use bundle for hosting your applications on GlassFish:

  1. Install JRubyStack
    1. Download JRubyStack from here. Click on the installer to see:


       

    2. Clicking on "Next >" brings the following screen:

      Even though it shows "JRuby on Rails" component but it includes everything, including GlassFish v3 Gem & MySQL server, in it.

    3. Further in the installation process, change the database user name from default "jrubystack" to "root". Take all other defaults through out the installation process.
    4. After the installation is completed, the following program menu is added


       

  2. After the bundle is installed, it’s ready to use – MySQL server is started, a default application is created in "C:\Users\Arun Gupta\BitNami JRubyStack projects\jrubystack" and hosted using GlassFish v3 gem at "http://localhost:3000". Here is the output shown in the console window started by JRubyStack:

    Mar 10, 2008 2:49:26 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Init service : com.sun.enterprise.v3.services.impl.CmdLineParamProcessor@1d9e5ad
    Mar 10, 2008 2:49:26 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Init service : com.sun.enterprise.v3.server.SystemTasks@33c3e6
    Mar 10, 2008 2:49:26 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Init service : com.sun.enterprise.v3.services.impl.LogManagerService@1b70f9e
    Mar 10, 2008 2:49:26 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Init service : com.sun.enterprise.v3.services.impl.HouseKeeper@666d83
    Mar 10, 2008 2:49:26 PM com.sun.enterprise.v3.services.impl.DeploymentService postConstruct
    INFO: Supported containers : web,jruby,phobos
    Mar 10, 2008 2:49:26 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Startup service : Deployment
    Mar 10, 2008 2:49:26 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Startup service : org.glassfish.deployment.autodeploy.AutoDeployService@15925c0
    Mar 10, 2008 2:49:27 PM com.sun.enterprise.v3.services.impl.GrizzlyAdapter <init>
    INFO: Listening on port 3000
    Mar 10, 2008 2:49:27 PM com.sun.enterprise.v3.services.impl.GrizzlyAdapter <init>
    INFO: Listening on port 3131
    Mar 10, 2008 2:49:27 PM com.sun.enterprise.v3.services.impl.GrizzlyAdapter <init>
    INFO: Listening on port 3838
    Mar 10, 2008 2:49:27 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Startup service : com.sun.enterprise.v3.services.impl.GrizzlyService@eccfe7
    Mar 10, 2008 2:49:28 PM com.sun.grizzly.standalone.StaticResourcesAdapter <init>
    INFO: New Servicing page from: C:\Users\Arun Gupta\BitNami JRubyStack projects\jrubystack\public
    Mar 10, 2008 2:49:28 PM com.sun.enterprise.rails.RailsDeployer load
    INFO: Loading application . at /
    Starting Rails instances
    Mar 10, 2008 2:49:58 PM com.sun.grizzly.jruby.RubyObjectPool$1 run
    INFO: Rails instance instantiation took : 30451ms
    Mar 10, 2008 2:49:58 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Startup service : Application Loader
    Mar 10, 2008 2:49:58 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Glassfish v3 started in 32229 ms

Now you have a template app that can be used to experiment with different features of GlassFish Gem. A similar bundle can be easily hand-crafted using the steps described here.

More details about GlassFish and JRuby can be found @ GlassFish wiki and JRuby wiki. Help us test your application on the v3 gem and file issues in JIRA or GlassFish Issue Tracker.

Please use the gem and send us feedback on GlassFish forums, dev@glassfish or gem mailing list.

Technorati: bitnami jrubystack jruby ruby rubyonrails glassfish v3 gem

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

March 10, 2008

TOTD #29: Enabling “Available Plugins” tab in NetBeans IDE

Filed under: General — arungupta @ 11:30 pm

If you see “Available Plugins” tab disabled in your NetBeans Plugin Update Center as shown below

NetBeans 6.1 Beta Available Plugins Tab

then you have to explicitly hit “Reload Catalog” button in the top-left corner and to enable it. And then you see:

NetBeans 6.1 Beta Available Plugins Tab Enabled

Filed issue #129721 for tracking purposes.

Do you know that NetBeans 6.1 beta is now available ?

Please leave suggestions on other TOTD that you’d like to see. A complete archive is available here.

Technorati: totd plugin netbeans

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

March 5, 2008

Speaking @ SD West, Santa Clara – Mar 6, 2008

Filed under: web2.0 — arungupta @ 11:02 pm
SD West 2008 Speaker I’m talking on “jMaki: Web 2.0 Application Building Made Easy” at SD West 2008 on Mar 6. This talk will cover how jMaki provides a light-weight framework that allows to create “Web 2.0″ applications intuitively using NetBeans IDE. These application can be deployed on any Servlet container (such as GlassFish), Rails, PHP or Phobos. The talk will explain the jMaki concepts and shows several real-life demos that can be used for your applications.

Venue: Santa Clara Convention Center
Location: Room H
Time: 1:30 – 3:00pm

Register now!

Read more details here.

Technorati: conf sdwest jmaki netbeans glassfish

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

March 2, 2008

Hyderabad in Pictures and Traffic

Filed under: General — arungupta @ 12:02 am

Shahi Qutbi Tomb, Golconda Fort and Charminar. Ate biryani @ Cafe Bahar in Basheer Bagh. This place served real good biryani with a good variety. I went there with a friend who ate at Paradise Biryani earlier in the week and he liked it much better at Cafe Bahar.

And now have a feel of the traffic in the video below:

Technorati: india traveltips hyderabad

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot
« Newer PostsOlder Posts »

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.
Powered by WordPress