JRuby 1.1.4 Released

Tagged:  

The JRuby project, an implementation of the Ruby language on the JVM, has released version 1.1.4. Though a minor (maintenance) release, the new version introduces a number of improvements, including:

  • A substantially re-written Ruby-Java integration layer.
  • Big improvements in performance: about 2-20x.
  • Reduction of garbage collection cycles (efficient memory usage).
  • Experimental support for Ruby 1.9 (via the --1/9 flag)
  • Started support for the win32 API
  • Ported Rubinius' FFI subsystem for integrating with C libraries
  • Addition of OSGi metadata to the jruby.jar
  • Lots of bug fixes (72 issues resolved since version 1.1.3)

The full release notes are here.

You can download the new version here.

GWT 1.5 Released

The Google Web Toolkit (GWT) project has released version 1.5 of its Java-based web development library yesterday. The new release sports a host of new features such as:

  • Support for Java 5 language features (generics, enums, enhanced for loops, and static imports)
  • Improved performance of compiled JavaScript code
  • It is now possible to sublcass the JavaScriptObject class, creating "class overlays" that can be mapped to arbitrary JavaScript classes
  • Expanded JRE emulation library
  • A new high-performance DOM API
  • Default visual themes: Standard, Chrome, and Dark
  • Support for right-to-left languages

For a full list of the new features, see here.

The new version can be downloaded here.

Upcoming Ajax Conferences

Tagged:  

Here are a couple upcoming Ajax conferences for your consideration:


The Ajax Experience 2008
Location: Boston, MA
Dates: September 29th-October 1st, 2008
Cost: $1495
Site: www.theajaxexperience.com
Conference Agenda



AJAX World 2008
Location: San Jose, CA
Dates: October 20-22, 2008
Cost: $1,595 before August 29th [early bird]
$1,695 before September 12th [discounted]
$1,895 onsite price [full price]
Site: http://ajaxworld.com/
Conference Agenda

Leave a comment if you've been to either of these conferences before, letting us know what you thought. Also leave a comment if you plan on attending one or both conferences this year.

Firebug 1.2 Released

Tagged:  

Firebug, the latest version of the indispensable debugging utility for Firefox, has released version 1.2 of the plugin for Firefox 3.0.

What's New?

  • Selective Panel Enablement: You can now choose to enable any combination of Console (logging), Script (JavaScript debugging) and Net (Network monitoring).
  • Automatic activation of HTML, CSS, and DOM views when Firebug UI is visible/activated (since they require minimal overhead).
  • Ability to suspend/resume Firebug.
  • A new tooltip telling you which tab/page in Firefox has enabled Firebug.

John Resig, creator of jQuery and now lead on the Firebug team, gives an excellent overview on his blog. Resig points out the currently rather global nature of enabling certain Firebug features, the overhead of enabling them (especially Script, which slows down all JavaScript running in Firefox about 25%), and states that all of these issues are targets for the 1.3 release.

Use the Add-ons panel in Firefox to update your plugin or get it now.

The release notes are here.

Faster JavaScript in Firefox 3.1

Tagged:  

Mozilla plans to give some relief to web developers struggling to create a "desktop-like" experience for web applications: relief in the form of huge increases in speed. On Friday, the father of JavaScript, Brendan Eich, announced the launch of a new JIT (Just In Time) JavaScript compiler called TraceMonkey that will be included in Firefox 3.1.

Depending on the benchmark, TraceMonkey currently improves JavaScript performance in Firefox 3.1 by about 2 to 37 times over Firefox 3.0. The average performance improvement is predicted to be about 4.6 times faster.

TraceMonkey is an evolution of Mozilla's current JavaScript engine, SpiderMonkey, that also draws from the Adobe-contributed Tamarin Tracing project. It is based on the concept of tracing (or trace-based compilation), which takes the approach of monitoring bytecode interpretation, following frequently-executed backwards branches to a "loop start point", analyzing the linear sequence of instructions in what is called a "trace" (using data structures called Trace Trees), and natively compiling these code paths. This has the advantage over more traditional JIT compilers--that keep track of which methods get called most frequently, and do whole-method analysis and compilation--of having to analyze and natively compile only the performance-critical parts of the code. It also has the advantage of being more mobile-friendly as this translates to a much lighter memory footprint. Andreas Gal, the principal architect of the TraceMonkey project, discusses the technique in his blog.

According to Gal, Firefox now has the "fastest JavaScript engine in the world". So what can you do when your browser's JavaScript is that fast? How about online photo editing...

Get Started with CSS 3

Tagged:  

While CSS 3 does not yet have full browser support (currently Opera and Safari are leading the way with FireFox said to be adding support in version 3.1) you may want to look into CSS 3 now to get ready for it. Well, over at webmonkey.com they have put together a nice tutorial to get you started.

Below is an excerpt from the post.

Rounded Corners

The number one rule of Web 2.0: If it has rounded corners, it's modern.

Say what you will about the design aesthetics of rounded corners, at least with the new border-radius rules you won't have to resort to images and JavaScript to get that web 2.0 look.

Say you have some HTML that looks like this:

<p class="r-box">Try doing this without images</p>

Add this style definition to round off the element:

.r-box {
	background-color: #666; 
	color: #fff; 
	line-height: 20px; 
	width: 200px; 
	padding: 10px; 
	-webkit-border-radius: 10px; 
	-moz-border-radius: 10px;
}

Here's a live demo for those of you with Firefox or Safari:

Try doing this without images

If you're using a different browser here's a screenshot of how Safari displays the above block:

Image:css3_shot1.jpg



So what did we do? Well the first five lines are your normal CSS 2 declarations to give things a bit of style. It's the last two lines we're interested in. The actual CSS 3 declaration is border-radius. Until the specs are finalized the various browser manufacturers have enabled the features via prefixes -- the -moz- prefix is what Firefox uses and the -webkit- prefix is for Safari.

The rule works like this (where TopLeft, TopRight, etc... is a numeric value in pixels):

border-radius: TopLeft TopRight BottomRight BottomLeft;
border-radius: TopLeft BottomLeft+TopRight BottomRight;
border-radius: TopLeft+BottomRight TopRight+BottomLeft;
border-radius: ALL;

So in our case we used the later rule, but if you want just two rounded corners, you would do this:

-webkit-border-bottom-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-bottomleft: 10px;
-moz-border-radius-topright: 10px;

Note: as of this writing, the W3C is planning to move toward the syntax Mozilla uses, rather than that of Safari. Because the border-radius spec is not finalized, Opera chose not to support it in Opera 9.5.

The nice thing about border-radius is it degrades gracefully. If a browser doesn't understand it, it simply renders a square box.

You can read the full post here.

So, use this tutorial to get prepared for CSS 3 (if IE ever gets their act together) as it will really make your pages look very nice.

TIBCO GI 3.6.1 - Now supports Firefox 3 and Safari 3

Tagged:  


Announced this morning, TIBCO has released a new version (3.6.1) of its General Interface Ajax Framework. This release adds support for Firefox 3 and Safari 3.1.2+.

For more information on GI, check out this flashy product overview.

Download TIBCO GI 3.6.1

Auto Resize iFrames - Part 2

Tagged:  

In part 1 of this 2 part series on auto re-sizing iFrames I explained the basic principal of how it would work (you can read part1 here). Today I will give code examples to better demonstrate how you would accomplish this in the real word.

Below is an example of the server side proxy that would be used (this example is written in classic asp [as I needed to use this scripting language for the server that this script was to run on] but this could easily be re-written in your favorite language).

<%@ LANGUAGE=VBScript%>
<% 
            Response.Buffer=True

            Dim MyConnection
            Dim TheURL  

            ' Specifying the URL
            TheURL = Request("url")

            Set MyConnection = Server.CreateObject("Microsoft.XMLHTTP")

            ' Connecting to the URL
            MyConnection.Open "GET", TheURL, False

            ' Sending and getting data
            MyConnection.Send 

            TheData = MyConnection.responseText
            'Set the appropriate content type

            Dim MoreData, MoreData2

            MoreData2 = "<script type='text/javascript'>function Loadcontent(){var iframes = window.parent.document.getElementsByTagName('iframe'); for(var a=0; a</head>"
>"

             MoreData = TheData
           

            MoreData = Replace(TheData,"</head>",MoreData2)

            Response.Write (MoreData)

            Set MyConnection = Nothing     

%>

The below JavaScript is the most important part of the above code (I've formatted it to make it easier to read). In the proxy script it adds this code to the head tag of a page to accomplish the resizing. This code has been tested in IE6 and IE7, but needs a bit of tweaking to work cross browser (it re-sizes the iFrame incorrectly in FireFox, but this is easily fixed and I will post this code when I finish it).

<script type='text/javascript'>
	function Loadcontent()
	{
	var iframes = window.parent.document.getElementsByTagName('iframe');
		for(var a=0; a

So, in order to have an iFrame that re-sizes you would simple call the proxy url from the iFrames src property and set the url parameter (that us passed into the proxy) to the url of the page that you would like to display in the iFrame.

While this iFrame method accomplishes loading content from a different site you could accomplish the same thing using a div element and the XMLHTTPRequest object in JavaScript. Both methods would require the use of a cross-domain proxy (if loading content from a different site). I would probably use the div XMLHTTPRequest element if I am making a new application (as the div element re-sizes very well on it's own). However, if you have an application that already uses iFrames, then this script would be an easy way to make them re-size.

Ruby on Rails 2.2 to be Thread Safe

Tagged:  

Tucked inside the somewhat innocuous announcement that a new committer has joined the Rails core team (Josh Peek, who had worked on Rails via the Google Summer of Code) was the surprising revelation that Ruby on Rails 2.2 will be thread safe. Even more surprising was the statement:

The actual thread safety won’t really matter much to most people, but it’ll surely look nice on your enterprisey check list of Features Your Framework Must Have To Get Play Around Here.

Huh? Thread safety not important? As much as I sometimes feel nostalgic about 1990's CGI programming (ah, signing bonuses...*sniff*), statements like that are just plain embarassing, and don't do much to promote Ruby or Ruby on Rails. And before anyone counters that stable versions of Ruby still don't use native (kernel) threads, think again: JRuby does. It may well turn out that JRuby + RoR 2.2 will be the the power combo for Ruby developers in 2008 and beyond...those that are serious about concurrency, at least.

ECMAScript Harmony

Tagged:  

Big news for the future of the Web: JavaScript 2 (ECMAScript 4) is dead, though pieces of it will live on in the new ECMAScript 3.1-based (informally dubbed "Harmony") specification. The members of the ECMA Technical Committee 39 (Adobe, Mozilla, Opera, and Google in favor of ECMAScript 4 and Microsoft, Yahoo in favor of the less ambitious ECMAScript 3.1), which had been at odds over the future direction of the JavaScript language for some time, finally agreed upon the new direction. Brendan Eich, the original creator of JavaScript, broke the news on Wednesday (8/13).

The details of what the new unified specification will look like are far from finalized at this point, but clearly it will be a very scaled back version from the ambitious ECMAScript 4 proposal. Some early results:

  • Packages, namespaces, and early binding from ES 4 are off the table for good.
  • ES 4 classes are being "rephrased": they will now be syntactic sugar for lambda-coding and Object.freeze() (which was proposed in ES 3.1)
  • JavaScript getters and setters are being fast-tracked as part of the new specification.
  • ES 4 let expressions seem to have some general agreement among committee members.

The announcement has sent ripples across the Web. Adobe, which had built ActionScript 3 to closely match anticipated ECMAScript 4 features, has maintained that they will not change AS 3 at all in response to the new direction. Some have speculated that Microsoft's motivation in bucking the ECMAScript 4 standard--and certainly the main factor in why it was abandoned--was political.

Whatever the reasons for abandoning ECMAScript 4, it is certainly clear that JavaScript will now evolve at a much slower pace than some had hoped or anticipated.

Syndicate content