Mark Gharibian's blog

DWR version 3.0 Release Candidate 1

Tagged:  

DWR version 3.0 has reached release candidate 1. Here's what's new right from Joe Walker's Blog:

  • RPC Enhancements
    • Varargs support
    • Method overloading (DWR tries to copy Java's method matching rules)
    • Typed parameters (so you can say new Apple() in JavaScript and pass it to the addFruit() method and DWR will instantiate the correct type on the server)
    • Lightweight typed parameters (as above, but by adding $dwrClassName:"Apple", for when you are getting the objects from something else)
    • More natural synchronous XHR (so you can call var reply = Remote.getData() when doing 'Sjax')
  • Improved Marshalling
    • Binary file upload/download (byte[], java.awt.BufferedImage, InputStream etc and FileTransfer can be uploaded from an input type=file, offered for download, or sent to an img)
    • Functions (Store a reference to a JavaScript function on the server for later execution)
    • Objects by Reference (Store a reference to a JavaScript object, and then call methods on that)
    • Locale, Currency (DWR will marshal to and from java.util.Locale and java.util.Currency objects)
  • Reverse Ajax
    • JavaScript can now implement a Java interface (For simple integration with Java Events/Listeners)
    • More scalable Reverse Ajax APIs (See org.directwebremoting.Browser)
    • DOM Manipulation Library (Window and Document can now be manipulated from the server)
    • The server now runs in 3 modes: stateless (New - save memory with no page tracking), passiveReverseAjax (the default) and activeReverseAjax (comet enabled)
  • TIBCO GI Integration
    • Complete set of Reverse Ajax Proxy APIs (So you can manipulate your GI user interface from Java on the server)
  • Dojo Integration
    • Data Store (Keep a server side data store in sync with data in a client browser with both sides able to send updates. The data store also supports paging, sorting and filtering)
    • Packaging Integration (dojo.require all your DWR scripts)
  • Server Support
    • Asynchronous servlet support for Tomcat and Glassfish
    • Improved Spring and Guice support
  • Over the wire
    • JSONP support
    • JSON-RPC support
  • Tech Previews
    • JMS Integration (Publish to the browser directly from JMS)
    • Jaxer Integration (Zero configuration for trusted environments)
  • Infrastructure
    • SVN (We've moved from CVS to SVN)
    • Related Projects (Our repository contains a set of related projects including a number of demos)
    • CLA (We've been through a legal review and have signed CLAs for dwr.jar)
    • Dojo Foundation (We joined the Dojo Foundation and are now hosted by their servers)
    • Better Documentation (DWR version 1.x had great docs. Version 2.x let things slide a bit, but we've dropped Drupal, and have our own system now)
    • You can download it here.

      Read the full post

TIBCO GI 3.6.2 and GI 3.7.0 M1 Technology Preview Release

Tagged:  

Now available for download is TIBCO's General Interface 3.6.2 service pack release.

Here's a summary of what's new in 3.6.2 from the release notes:

General Interface Template Language
The new template language enables you to create custom, re-usable components by building on your knowledge of HTML and JavaScript. Using the template language, you can convert a single snippet of HTML—a widget—into a re-usable component. This means that if you’ve developed user interface components that combine HTML and JavaScript code, you can convert the functional user interface HTML elements into a General Interface template for custom usage.

CDF Form Mapping
General Interface 3.6.2 introduces a new CDF class that enables developers to map a CDF document in the local cache to on-screen form fields—without the need to author additional JavaScript code. The new class, jsx3.gui.CDF, is a container that knows how to bind the form fields it contains to values in a CDF document.

JSON Mapping
The General Interface Mapping utility now supports mapping to JSON-based services. Similar to mapping to WSDL and XML, the new JSON mapping feature provides a visual tree to which the developer can assign mapping rules. JSONP is supported by default, which gets around cross-domain security problems when accessing data from other sites.

Read the full release notes for more information

Also available is the General Interface 3.7.0 Milestone 1, technology preview release. Go to the TIBCO Developer Network site http://www.tibco.com/devnet/gi for downloads and more info.

New in 3.7

  • Asynchronous Modular Platform (AMP), the Eclipse inspired plug-in architecture for building advanced modular and high-performing enterprise AJAX application.
  • Extensible GI Builder IDE based on AMP
  • Syntax highlighting script editor
  • and More ...

Day Two Summary @ The Ajax Experience

Tagged:  

The second day of The Ajax Experience is behind us and it was even better than the first. It all started off with a keynote by Brendan Eich as I described earlier. After that, I attended a session titled “Struts on Ajax: Retrofitting Struts with Ajax Taglibs” where my take-away was to not use Ajax Taglibs, ever. Then came the lightning rounds, which were a great way to get a wide variety of information in a short amount of time. After the lightning rounds, Microsoft had a keynote that covered Microsoft’s JavaScript developer tools, namely Visual Studio 2008 and Visual Web Developer 2008. There was also talk of the new IE8 developer toolbar, which is a great big step in the right direction for Microsoft. Strangely, the developer toolbar will be shipped with all instances of IE8. It includes features like:

  • DOM & CSS inspection
  • Live Editing
  • JavaScript debugger and profiler
  • Multiple Document Modes

I really enjoyed Joe Walker's "Advanced Web Application Security" session, where he covered a variety of security issues and complete solutions to help increase security. This is another great session to view once the videos are posted online.

Next up I attended back-to-back sessions by John Resig on Advanced jQuery and Visual Programming with JavaScript. These were two of the best sessions of the entire conference. Clear and concise lectures, chalk full of practical solutions and answers to complex problems.

The last session of the day was the "Ask the Experts Panel", moderated by Ajaxian.com co-founders, Ben Galbraith & Dion Almaer, featuring Brendan Eich, Douglas Crockford, John Resig, Joe Walker and Dylan Schiemann. There was some great discussion on JavaScript engines, Browsers, HTML5, ECMAScript, and more...

That's all for today! I'm looking forward to tomorrow for some more informative sessions.

Lightning Rounds at The Ajax Experience

Tagged:  

We had a great session today that was comprised of 10 “lightning rounds” each lasting about 5 minutes.

Topics included:

  1. Smushit.com – a web based tool that automates image optimization. You specify a URL, or batch upload images and smushit can greatly reduce the file size of your images without sacrificing any quality. A Firefox extension also exists to allow you to easily optimize the images on any page you visit.
  2. Adobe Dreamweaver CS4 – the latest web development tool from Adobe, which was just recently released. You can expect to see some great new features in this version, including:
    •    Workspace customization – coder, designer, compact preset workspaces
    •    JavaScript intellisense and validation, including advanced intellisense that works with any JavaScript library or custom JavaScript classes and objects.
    •    Live Code view – let’s you see changes to the document in real-time as you interact with it.
  3. Comet – discussed technique for Ajax push asynchronous message delivery from the server to the client
  4. Firebug. Enough said, if you don’t know what it is, go here.
  5. Making web apps faster – Steve Souders discussed manual vs. programmatic scripting to time web pages using Episodes, a proposed framework. Read more about Episodes.
  6. Hacking Netflix – Netflix API to be released soon (this week), more info will be available at:
  7. Interviewing JavaScript Gurus.
  8. 280 Slides / Objective-J , a strict superset of JavaScript
  9. shiftspace.org – client-side JS and interface
  10. milescript.org – new language that compiles to JavaScript, intended for large scale (enterprise) JavaScript solutions.

Day Two Begins at The Ajax Experience

Tagged:  

Tuesday morning here in Boston started off with a keynote by Brendan Eich, CTO of Mozilla and creator of JavaScript. The title of the session was “Faster than Light JavaScript”, where Brendan discussed JIT compilation of JavaScript in the browser and the performance gains we can expect to see in the future. In particular, a new JavaScript engine code-named “TraceMonkey”, based on the SpiderMonkey interpreter and the Tamarin-Tracing VM, is set to be released with an future version of Firefox.

Read more about TraceMonkey here

TraceMonkey is one of many current JavaScript engines, listed below:

  1. JavaScriptCore: The engine that powers Safari/WebKit (up until Safari 3.1).
  2. SquirrelFish: The engine used by Safari 4.0
  3. V8: The engine used by Google Chrome.
  4. SpiderMonkey: The engine that powers Firefox (up to, and including, Firefox 3.0).
  5. TraceMonkey: The engine that will power Firefox 3.1 and newer (currently in nightlies, but disabled by default).
  6. Futhark: The engine used in Opera 9.5 and newer.
  7. IE JScript: The engine that powers Internet Explorer.

John Resig wrote a good post earlier this month covering JavaScript performance in these engines, read it here.

Day One Summary @ The Ajax Experience

Tagged:  

As day one comes to an end, it's been a whirlwind of asynchronous requests, CSS Selectors, Chrome, performance and more as we flew through the Ajax Universe. We’ve seen some great comparisons between open source JavaScript frameworks, including the specific focus and goal of each framework that helps to differentiate them from the rest. We’ve also seen how frameworks are on a path of convergence, each with similar solutions to the same problems. However, the likelihood of a unification of the major frameworks is unlikely in the short term.

Of the three developer breakouts, I attended the jQuery sessions which were very insightful. I was surprised to see the growth jQuery has enjoyed over the last 4-6 months, but it’s not too surprising since it is an exceptional framework.

Another highlight of the day was Ben and Dion’s Ajax Universe session where they used created a script to sound a buzzer at random intervals so they would switch turns. This was hilarious and turned out to be a great idea. As they buzzed back and forth, they stepped through the progression of the web over the years, showing where we started and where we are today. Their slides and video should be posted online soon, just stay tuned to ajaxian.com.

Finally, we had a session titled “The Top 10 Cross-Browser Issues”. A panel of experts including Andrew Dupont (Prototype), Chris Heilmann (YUI), John Resig (jQuery), and Dylan Schiemann (Dojo) discussed how their respective frameworks handled browser issues. In particular, the discussion included the issue of browser user agent sniffing versus object/feature detection in order to create workarounds for browser issues. User agent sniffing has been the standard for all current libraries, but the next version of jQuery (1.3) will remove all browser sniffing and will rely solely on feature detection. John received some opposition from the other panelists about this approach, but was able to hold his ground and his vision of a more elegant approach for handling browser issues. John stressed that it is the responsibility of the JavaScript libraries to be good role models for coding practices and to encourage browser manufacturers to fix existing bugs instead of assuming that the developer community has already hacked around them.

The discussion continued around issues with the DOM API and the pain it can cause. Then we moved to a new topic: the influence JavaScript libraries have with the browser vendors (which seems to be getting better). The discussion was fast and insightful. I spoke with one of the staff here and was told that videos of the sessions will be posted online at some point. When they are posted, be sure to check out this session.

That’s all for today, it’s time to head to the Microsoft sponsored “Evening Event”!

Microsoft and Nokia adopt jQuery

Announced on the jQuery blog, and by John Resig here at the Ajax Experience, jQuery is being adopted by Microsoft and Nokia as part of their official development platform. Microsoft will distribute the framework with Visual Studio and will build UI widgets to run on top of jQuery. Nokia is looking to use jQuery to develop applications for their WebKit-based Web Run-Time. To make this news even sweeter, Microsoft and Nokia aren’t looking to make any modifications to jQuery (both in the form of code or licensing) - they plan to use it as-is. This is some very exciting news and we'd like to congratulate the jQuery team on this milestone!

Read the full post.

The Ajax Experience 2008 Begins

Tagged:  

The Ajax Experience 2008 is about to begin here in Boston. Developers from all over the world have gathered to hear about the latest and greatest from the land of client-side development. I'm attending the jQuery Developer Day session this morning where topics will include "Progressively Enhancing the User Experience Using jQuery" and "An In-Depth Look at jQuery UI". Conference presentations are available for download here.

b9j.uri : A JavaScript URI Object

Robert Krimen has created a JavaScript URI Object capable of parsing, manipulating, and generating URIs. It splits up a URI into three objects: the URI, the path, and the query. Changes to the path or query objects are reflected in their respective URI. Armed with a wide array of methods, the b9j.uri object is well equipped to handle even the toughest of URIs.

Here's a overview of b9j.uri.URI from Robert:

  • Parses using Steven Levithan's parseUri 1.2
  • Easy path traversal (ascend to parent, descend to a child)
  • Set or add to the URI query (with proper encoding), get/interrogate the query (with proper decoding)
  • Add arbitrary data (unencoded) to the end of the query string, for extra flexibility
  • Manipulate/interrogate the scheme, user information (username & password), host, port, fragment, and more in a piecewise fashion
  • Add, change or strip the extension (html, js, css, ...) from a given URI

The code is available at http://appengine.bravo9.com/b9j/b9j.uri.js (19kb compressed / 5kb gzipped)

Code Snippet: Detect Google Chrome w/JavaScript

With Chrome entering the browser market, you may find a need in the not too distant future to code some exceptions for it. In case that day comes, here's a quick snippet of JavaScript for detecting if your users are Chromed out:

You can detect Chrome using the following:
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;

Chrome's full user agent:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13

Syndicate content