Writing Your First YUI Application


If you are interested in creating applications using the Yahoo! User Interface then you may be looking for a good resource to get started. Well, over at O'Relly's Inside RIA they have put together a good post to help you get started.

Below is an excerpt from the post.

Getting Started

YUI consists of several CSS components and nearly three dozen JavaScript components, all of which are designed to empower the rapid creation of web applications that run in all the major web browsers. Yahoo! uses a Graded Browser Support approach in which we "white-list" a subset of browsers that we'll fully support — we call these the "A-Grade browsers," and, taken together, they represent more than 90% of traffic on Yahoo!'s network worldwide. YUI is tested and supported in all A-Grade browsers (including current versions of Safari, Opera, Firefox and Internet Explorer).


The best way to think about YUI and what it does for you is to consider the difference between the user interface language of the browser as compared with the desktop. In the browser, the "default" language is relatively limited. You have form elements (buttons, select menus, text inputs) and hyperlinks. On the desktop, you expect much more: Tabs, sliders, cascading menus, dialogs, tooltips, data grids, rich text editing, drag and drop, animation, autocompletion, and so on. Here's one way to visualize this difference, with the browser's native UI elements on the left and the richer set of desktop-style UI elements on the right:

In the browser, everything on the right side of this diagram requires some hard work. YUI, like other JavaScript/CSS libraries, aims to make that work less hard.

You can read the full post here.

The Yahoo! User Interface is a great JavaScript library and this will give anybody that wants to learn it a good jump start.

Adobe Flash Player 10 Beta Released


Adobe has released Adobe Flash Player 10 Beta. This looks very good and has some very interesting features.

Below is the run down of features from Adobe's website.

3D Effects - Easily transform and animate any display object through 3D space while retaining full interactivity.  Fast, lightweight, and native 3D effects make motion that was previously reserved for expert users available to everyone.  Complex effects are simple with APIs that extend what you already know.
Custom Filters and Effects - Create your own portable filters, blend modes, and fills using Adobe® Pixel Bender™, the same technology used for many After Effects CS3 filters. Shaders in Flash Player are about 1KB and can be scripted and animated at runtime.
Advanced Text Layout - A new, highly flexible text layout engine, co-existing with TextField, enables innovation in creating new text controls by providing low-level access to text offering right-to-left and vertical text layout, plus support for typographic elements like ligatures.
Enhanced Drawing API - Runtime drawing is easier and more powerful with re-styleable properties, 3D APIs, and a new way of drawing sophisticated shapes without having to code them line by line.
Visual Performance Improvements – Applications and videos will run smoother and faster with expanded use of hardware acceleration.  By moving several visual processing tasks to the video card, the CPU is free to do more.

You can read more about Flash Player 10 Beta here.

The two features that stand out for me are the Enhanced Drawing API and the 3D effects. This could give some great effects for web pages.

YUI based Color Picker Widget

Dynamic Drive has posted a new color picker widget built with the YUI JavaScript toolkit. This widget can be integrated in a form field to provide an inline or floating color picker. A control can also be assigned the color picker, activated with a click, with an option to set the control's background color based on the value chosen in the color picker widget. Since each color picker is defined as an empty DIV on the page, you can surround it with content and style it as you like. This new implementation also supports multiple instances of the color picker on the same page. So, two form elements can have two separate color pickers, as opposed to having one picker shared by all elements.

Visit Dynamic Drive for the script, demos, and installation instructions.

Google Friend Connect


Later today Google will be launching a new service called Friend Connect. Read Write Web has written an interesting post about the new service raising some concerns.

Below is an excerpt from the post.

You Can't Use it Yet

While the whole developer and publisher world is anxiously awaiting details from the launch tonight, Google is putting a damper on adoption by limiting the Friend Connect "preview release" to a handful of white listed apps and a short list of selected websites. The company says it has to prove it can scale the infrastructure (ooh, can Google scale? I don't know, better limit the approved users to just a tiny handful!) and it wants to see what kinds of features developers and site owners want to request. Apparently the company believes this feedback is best done by making said parties look from the outside and send emails guessing about what they'd like to see once they are let inside. This seems completely backwards to me.

You Can't Touch What's Inside the Magic Box

Site owners will be able to add Open Social apps to their web pages - sort of. They'll be able to display them inside an iframe, a separate web page inside a webpage. They won't be able to leverage that user data to change what they deliver themselves to their users.

Apps in an iframe may as well be a social sidebar ala Flock or Yoono. Those collections of social apps are probably more useful anyway.

Conversations Are Complicated

Google made it clear during their press call that they are aiming for the easiest, simplest and safest way to enable social apps to be integrated into other websites. It will take less than six months, they promise.

Let's be clear that it's not going to be easy to figure out how to enable all this user data to be mashed up in acceptably safe ways. We asked Google how they can assume that one user's friends on IMeem have permission to access their info out on other sites around the web. They said that users will have to be given the option whether to expose that info to third party sites or not, something we haven't seen any details on yet from the original source social networks. That would be even more difficult if the destination sites had read, much less write, access to that ported-in social networking data.

You can read the full post here.

While the post raises some interesting concerns, I think that the service may turn out better than the post states. While I think the initial release of the service may have some issues, Google has a proven track record that bodes well for the service over time. We can only wait and see what happens.

Live From JavaOne: Second Half


After CommunityOne and the initial rush to JavaOne on Tuesday, Wednesday for me was a bit less eventful. The highlights of the day included Neal Gafter's talk on Closures and Gavin King's introduction to Web Beans. For those who have already been following the Closures proposals (and debates) for the Java language, Neal's talk didn't really contain much that was new other than concrete examples for how closures would be used in the real world (hence the title "Closures Cookbook"). Gavin's presentation was a little more interesting for me, primarily because I had not really spent that much time looking at Web Beans. Web Beans, for those who don't know, is a component model for objects in the web tier. It borrows ideas from Seam and Guice and, well, standardizes them. This has been an increasing trend in Java, and a good one: take the best of the ideas from Open Source, and move them into the standards space. But with all the new specifications being aimed at developers in this space (EJB 3.0, JSF 2.0, Servlet 3.0, etc.), I wondered a bit if there wasn't just a little specification overload happening here.

By Thursday, most attendees are starting to feel what is commonly referred to (in professional circles) as "PowerPoint fatigue". I was no exception. One session that really alleviated some of the fatigue was Martin Odersky's "Programming with Functional Objects in Scala". For those who don't know, Scala is a new programming language created by Odersky himself. Though it targets the JVM, it is a very different language than Java: functions/methods are objects which can be sub-classed (!); the language uses mixins ("traits") instead of interfaces; it is statically type-inferred; and the list goes on. The slide where Odersky showed Erlang-like actors in Scala really floored me; clearly, this was a sophisticated language.

The other fatigue reliever, "The Future of Guice", contained almost no information but was the perfect counterpoint to the rest of the conference. Bob Lee and fellow cohorts from Google (including Joshua Bloch himself, who showed up for the presentation) provided free beer, free books, off-the-cuff jokes, and generally a good time. I still have very little idea of what Guice 2.0 will be like but--what the heck--I'll read the documentation when it comes out.

As in past years, Friday is the winding-down period of the conference. The show floor is already empty, and a lot of people are thinking about other things. Nevertheless, the intrepid contention-goer can still squeeze some last nuggets of wisdom before the end, and this year I was able to do exactly that. My most practical session of the entire conference was on this day, "Automated Heap Dump Analysis" by Andreas Buchen and Krum Tsvetkov from SAP. I've spent some time doing profiling with one of the best (JProbe), but I must admit this was a pretty slick tool. For those who are interested, the SAP Memory Analyzer is open source and freely downloadable.

I ended the conference with Rod Johnson's "Spring Framework 2.5: New and Notable". Rod spent a fair amount of time on both the new @AutoWire dependency injection annotation as well as the OSGi-enablement of Spring itself. For those who have been following Guice, the first was nice but no big deal. The second (the integration of OSGi into Spring) was much more interesting given the move of many big application server vendors--WebLogic, WebSphere, Glassfish, etc.--to OSGi as the modularization and versioning platform of choice.

And, just like that, JavaOne was over. I rode up the escalator in the Moscone Center with a slight tear in my eye and a fistful of receipts for my expense report. Well, here's to next year...

Processing JavaScript


A while back I wrote a post about Processing (you can read my previous post here). If you haven't seen Processing before, it is a Java based development platform that rivals Flash. Well, John Resig has written a cool port of the Processing API to JavaScript.

Below is an excerpt from John's post.

The Processing Language

The first portion of the project was writing a parser to dynamically convert code written in the Processing language, to JavaScript. This involves a lot of gnarly regular expressions chewing up the code, spitting it out in a format that the browser understands.

It works "fairly well" (in that it's able to handle anything that the processing.org web site throws at it) but I'm sure its total scope is limited (until a proper parser is involved). I felt bad about tackling this using regular expressions until I found out that the original Processing code base did it in the same manner (they now use a real parser, naturally).

The language includes a number of interesting aspects, many of which are covered in the basic demos. Here's a brief selection of language features that are handled:

  • Types and type casting - Type information is generally discarded, but becomes important in variable declaration and in casting (which is generally handled well).
  • Classes - The full class system is supported (can be instantiated, etc. just fine).
  • Method overloading and multiple constructors - Within classes you can have multiple method (or constructor) definitions - with the appropriate methods being called, based upon their signature length.
  • Inheritance - Even classical-style inheritance is supported.

Note: There's one feature of Processing that's pretty much impossible to support: variable name overloading. In Processing you can have variables and functions that have the same name (e.g. float size = 0; float size(){}). In order to support this there would have to be considerable overhead - and it's generally not a good practice to begin with.

You can read the full post here.

If you get some time over the weekend, you might want to play with the new Processing JavaScript API. This looks like another good job by John Resig.

Wolfenstein 3D in JavaScript


If you are looking for something to get through the rest of the work week then check out this great JavaScript game. The game is Wolfenstein 3D (for you younger readers Wolfenstein 3D was the very first big first person shooter) and is just like the game I used to play on my 386 (except the AI is not finished)!

You can read more about the game here. Or you can get straight to the game here.

Note: that the game works on most browsers, but does not work on Internet Explorer.

It is always interesting to see things like this done in JavaScript. Who knows, perhaps we will be playing games like Doom (the original version) in JavaScript within the next few years.

Live From JavaOne


I'm here at JavaOne this week in San Francisco sitting through the usual spiel of vendor pitches and technology presentations. As always, the conference is a bit of a zoo...long lines for popular presentations, lots of things going on.

BuddyBlend Adds LinkedIn Support


The latest application from Ajaxonomy Labs, BuddyBlend, has just added LinkedIn support. As you know LinkedIn is one of the most used social networks for business professionals. So, we hope the addition will be very useful to all of our users.

If you haven't started using BuddyBlend yet, you may not know that BuddyBlend is a free service that makes it easy to find out what your friends on various social networks are up to. BuddyBlend is an attempt to make it easier to keep track of your friends and easier to setup tracking your friends by allowing you to simply put in your username for a social network and then it will get what your friends are doing (so, you don't need to make friends all over again on a "sub" social network). BuddyBlend also allows you to filter the content that appears on your BuddyBlend, so you can get right to what you are interested in.

LinkedIn is the latest addition to the social networks on BuddyBlend which include the below.

To all of our BuddyBlend users we hope that the addition of LinkedIn will be very useful to you and if you haven't started using BuddyBlend we hope that the addition of LinkedIn will make it useful for you if you decide to use the free service.


Web Services, Part 1: SOAP vs. REST


Developers new to web services are often intimidated by parade of technologies and concepts required to understand it: REST, SOAP, WSDL, XML Schema, Relax NG, UDDI, MTOM, XOP, WS-I, WS-Security, WS-Addressing, WS-Policy, and a host of other WS-* specifications that seem to multiply like rabbits. Add to that the Java specifications, such as JAX-WS, JAX-RPC, SAAJ, etc. and the conceptual weight begins to become heavy indeed. In this series of articles I hope to shed some light on the dark corners of web services and help navigate the sea of alphabet soup (1). Along the way I'll also cover some tools for developing web services, and create a simple Web Service as an example. In this article I will give a high-level overview of both SOAP and REST.

Syndicate content