Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Is there a component like panelGrid that uses ul instead of table?

JSF 1.1 has a problem with JSP in that it can't bind components together when a page first loads. This is well documented in Improving JSF by Dumping JSP by Hans Bergsten.

The easy example of this problem is when you have <h:outputLabel> tags before <h:inputText> tags. The average JSF user might not notice the problem, but if you customize <h:outputLabel> to display "required field" indicators based on the "required" attribute of <h:inputText> - the issue slaps you in the face. The easy solution is to use <h:panelGrid> to layout your form data, and everything magically works. However, table-based forms are ugly and I'd much rather do pretty forms like this one.

In order to create pretty forms and get around the JSF sucks with JSP problem, I'm looking for a component similar to panelGrid - but it spits out <ul> and <li> instead of <table> and <tr>/<td>. Does anyone know of such a component? I asked this question on the MyFaces list this morning, but haven't had much luck.

I'm fully aware that Facelets (or Clay) will solve this problem. However, I'm merely trying to get AppFuse 1.9.2 released without making major changes. I suppose I could always go with ugly table-based forms, but I'd rather not.

Posted in Java at May 23 2006, 12:55:44 PM MDT 13 Comments

RE: Thoughts on the future direction of AppFuse

Sanjiv has some interesting thoughts on the future direction of AppFuse. To summarize: take on Seam head-to-head, but use Spring instead. Get rid of all the other frameworks except for JSF, Spring and Hibernate. Furthermore, focus on making Web 2.0 applications easy to create and use.

I like Sanjiv's ideas, but I'm not so hot on ditching all the other web frameworks in favor of JSF. I'm still not convinced it's the best solution for Java web development. The idea behind JSF is great, but the implementation has warts. Maybe that'll be fixed with JSF 1.2, but it will likely be quite a few months before MyFaces supports it. Yeah, I know there's the RI, but it is an RI and you remember the 1.1 version don't you? ;-)

I'd hate to give up WebWork support because I've used it on a couple of projects and really like it. Ditching Spring MVC would likely be a mistake as well since it's the most popular web framework among AppFuse users today. While I love what Tapestry brings to the table, it is harder (for the newbie) than JSF. Also, it seems to be the least-used web framework in AppFuse, which means I'm doing a lot of maintenance for no reason. AppFuse 2.0 will definitely make things simpler (JDK 5, Maven 2, standard directory layout, better IDE integration), but it will still be difficult to support 5 web frameworks and 2 persistence frameworks.

What do you think about Sanjiv's proposal? It sounds good to me. However, I'd rather see different lead developers for each framework and continue to support them all - except for Struts of course.

Posted in Java at May 22 2006, 08:16:53 PM MDT 28 Comments

It's good to be home

After a week and a half on the road, it's awesome to be home. JavaOne was a great time, but pretty exhausting too - and I didn't even go to any sessions! After attending the Ajax Experience, all the JavaOne topics seemed like old news. Actually, I was motivated on Thursday, but when I tried to register using the schedule builder, all sessions were full. Hot topics of the week were GWT, Avatar in JSF and Java EE. I do hope to checkout GWT sometime, but it'll probably take me a month or two. I'm booked at clients for the next couple of weeks, and after that I'd rather just enjoy the summer than work 12-hour days. As far as AppFuse 1.9.2, that's high on my list - but it'll probably take me a couple days to complete since I'll be doing it at night.

The Tangosol/SolarMetric party didn't disappoint, and Geronimo Live was a smashing success. There's a bunch of pictures (and video) posted on the Virtuas Travels Blog.

I arrived home Friday afternoon and the fun hasn't stopped. Softball game yesterday, followed by 3 BBQs and a night of playing with the kids on a friend's swingset. Today, we went to the 12th Annual VWs on the Green show. Unfortunately, it was 90°F, so we didn't last long. I'd like to say I got some good ideas for my bus, but in reality I chased Abbie and Jack around the whole time. Below are some pictures from the show today. As for my bus, it's in the shop, but no work has begun. I need to visit them this week to get something in writing so they can start doing body work.

Giant Bug and Jack Can we run up the hill Dad?

Thing with Tracks Kids love buses

Jack is pooped Nice black and white

Nice Porsche Wheels Abbie and Jack

Posted in General at May 21 2006, 03:10:40 PM MDT 2 Comments

JavaOne 2006 Begins

After 3 hours of sleep, I'm up bright and early - attending the JavaOne Keynote. They're still shuffling people in, and have this awesome reggae-type band jamming. They're really good - I hope they're here later this week. The wireless sucks (as usual), so I'm using bluetooth to connect. Watch this post, I'll update it as the good announcements come.

We're starting off with a 10 minute overview of the Schedule Builder and how to use it. For those sessions that are full, apparently they'll schedule a 2nd showing. Most most sessions, there's already available online in PDF. After the show, most sessions should be available online in video form. Everyone should act like a Brazilian at this conference - meet people you don't know and learn as much as you can.

Jonathan Schwartz is on stage, dressed in a suite, talking about how they're offering a now offering a "Free Kit" on their website. Apparently, you can now get their Niagra servers for free. Sounds wierd, who knows if it's true. This JavaOne is the largest JavaOne ever, as apparent from this exhibition hall. "The Java community has never been more vibrant." The JCP has 1052 members. Of these, Jonathan says there aren't enough individuals on this committee. Everyone should go out and join. The community defines the future of Java.

Now there's a guy from Motorola on stage. He's the guy who originally introduced Java at this conference 11 years ago. The next few years will be just as crazy as the last 10 years for Java - only it will happen on a high-speed mobile network. In the mobile space, their are a lot of proprietary things going on. By encouraging and using Java, applications can be developed and deployed easily across many mobile devices. Motorola is selling 200 million phones this year. They've shipped 90 million in the last 6 months. Java needs to stay unified so write-once, run anywhere works on all devices. Motorola is publishing many open source projects for Java and Linux on http://opensource.motorola.com. To summarize, Motorola alone out-ships the PC industry.

Mark Shuttleworth from Canonical, Inc. is now on stage. Mark is deeply involved in the Ubuntu community. As of today, Java will be directly available to Ubuntu, Gentoo, Debian, etc. Apparently, this is because Sun has made some changes that allow it to be distributed with Linux. They're talking about Linux on Niagara - it sounds like there might be some announcements around this during the week. There's still no announcements about open-sourcing Java or re-licensing.

Mark Fluery has now been invited up on stage. He's got a red beret on. The Red Hat deal closes on May 31st. JBoss is joining the NetBeans community. Mark seems to think the next big thing in Java is Tools. Seems like a publicity stunt since they're talking about Netbeans. It will be interesting to see if JBoss becomes heavily involved in IDE development. Expect more innovation. You should expect more from the future, from the companies that provide Java, and from the community that uses it. Jonathan's first act of congress in his new post was to ask someone to return to Sun. Rich Green is the Executive VP of Software for Sun. He's been back at Sun for a week and a half, and he's been in meetings the entire time.

"Are you going to open source Java?", asks Jonathan.

"It's not a question of whether, it's a question of how." replies Rich.

So there you have it. They're going to open source Java, it's simply a matter of getting through all the politics and compatibility-issues to make it happen. Rich is now on stage by himself, encouraging the audience to get more involved in Java. Java EE 5 was recently approved. Now they've invited the Java EE Expert Group on stage. Everyone has a company sign to show. My name is on the slide, but it doesn't look like individuals were invited. Oh well, it's not like I contributed anything.

Jeff Jackson, Senior VP of Java Enterprise Platforms and Developer Products is now on stage. Java EE 5 is the big thing at the conference this year, and has all the right stuff: Ease of Development, simplified programming model with annotations, EJB 3.0 support for POJOs, new Java Persistence API, Web 2.0 Support, .NET Interoperability, Simplified SOA. NetBeans 5.5 supports Java EE today, so Jeff recommends you download it today.

Jeet Kaul is now on stage and he's going to do a demo of developing an application with Java EE 5 and NetBeans. He's using a nightly build from May 10th. I'm not sure if it's a nightly build of NetBeans or Glassfish that he's using. The demo he showed is pretty cheesy. He added an "author" column to a table, added a property to an Entity bean and then added an input field to the UI. This was followed with a web services demo and an Ajax demo. The Ajax demo was kinda cool - NetBeans allows you to drag and drop JSF components into a page. It drops in code rather than using a WYSIWYG view. I'm not sure if a WYSIWYG view is an option, as they didn't demo or mention anything.

Today Sun is donating their Java Message System (JMS) and NetBeans Enterprise Pack (UML, collaboration, etc.) to the open source community.

Craig McClanahan is on stage, He's got a slide with Duke holding a beer stein. The beer stein, and the Sierra Nevada that Craig pulled out are to represent the real reason we're here: The Beer. Craig is doing a demo with Java Studio Creator and creating a Pub Locator application that utilizes built-in GoogleMaps components. Craig deployed and showed a demo locating all the pubs near Moscone center. Then he turned "boss mode" on and clicked on a link to the Thirsty Bear. This took him to the new Java Ajax portal at developers.sun.com/ajax. Craig's demo was followed with a demo of the new Pet Store - with Ajax/Dojo enhancements.

Sun will be donating Java Studio Creator to open source (at netbeans.org) in the near future. In case you're not aware, Sun has recently released a number of other products on netbeans.org: NetBeans Profiler, NetBeans Mobility Pack, NetBeans Matisse.

Now there's a guy from Microsoft on stage talking about .NET and Java EE 5 interoperability. There's a "Tango" project that has a runtime that provides the interoperability between platforms. Now they're doing a demo with NetBeans 5.5 and its BPEL engine; all running on Open ESB. They demonstrating using WFC and Vista on the Windows side to connect to a web service on the GlassFish side. The Tango project has been renamed to Web Services Intererability Technology (WSIT) and is available on java.net at http://wsit.dev.java.net.

There's some new guys on stage now and they're talking about "Simplified SOA" with NetBeans Enterprise Pack using BPEL. While the BPEL tools in NetBeans look cool, they're definitely starting to lose the audience; people have started streaming out of the auditorium. More open source contributions: BPEL Engine into Open ESB and Sun Java System Portal Server.

Big Announcement: all of the technologies mentioned today will be under the umbrella of the OpenJava EE project.

Richard Blair (Swing Engineer from Sun) and Romain Guy have come on stage to demonstrate a Java SE Swing Web 2.0 Mashup. The demo uses Mustang and starts with showing a Swing client that connects to Flickr and allows you to browse photos. The slideshow feature is very cool and allows you to do 3d rendering and angling of images. It's one of the slickest-looking desktop apps I've ever seen. After showing the photo feature, they're showing how you can integrate this will a Google Map-looking service to show pictures on a map. All of the components in this demonstration are open source or simply customized Swing components. They ended the demo with showing a preview feature. The preview creates an applet that runs in a web browser (even when you're disconnected) and draws Roman's trip on a map, playing music and fading in pictures as the trip progresses. I was blown away at this point and would love to get my hands on this application. Hopefully it will be made available online, or maybe as a Flash movie?

There you have it folks. Sun is going to open source Java, just like I predicted a couple of weeks ago. It's not a matter of when, it's a matter of how. ;-)

Posted in JavaOne at May 16 2006, 09:40:33 AM MDT 5 Comments

Wine Country

While last week's Ajax Experience was a good time, it didn't hold a candle to the fun I had this weekend. I closed down the Thirsty Bear and Kate O'Brien's Friday night with Mats, Carlos and a few others. Saturday morning, Mr. and Mrs. Crazy Bob picked me up and we headed up to Napa Valley.

hans fahden The first place we headed was Hans Fahden, which is a small winery in the northern part of Napa Valley. It was strange at first - no one was there, not even someone to serve us. Then a guy showed up, grabbed a bottle of wine and proceeded to give us a tour of the place. For the next hour, we toured his "wine cave" and beautiful gardens. Whenever our glasses were empty, he filled them up. The owner has spent the last 30 years building a spectacular garden with trees, flowers and even a couple of ponds. The gardens are so beautiful now that they've become a hotspot for weddings and have hosted over 800 since they started doing it. It was one of the most beautiful places I've ever been and we couldn't have asked for a better host.

From there, we went to another private tasting, where they kept our glasses filled until we refused. At this point, my toungue could no longer taste the wine, but my brain assured me it was good. After hitting one more winery and sweet-talking our way in (they were closing), we headed back to our hotel to meet up with Cameron and the Tangosol crew.

We had an awesome dinner with several more bottles of wine, then headed to the bars in downtown Santa Rosa. Two hours later we called it a night, much to Crazy Bob's chagrin. He's a big fan of downtown Santa Rosa. Yesterday we drove back to a beautiful day in San Fransisco. I spent most of the day working on AppFuse 1.9.2 (preview, status) and while I didn't finish, I did manage to get a good night's sleep.

This morning, I checked into The W, which is right across the street from JavaOne. The location rocks, the accommodations are swanky, and life doesn't get much better. This afternoon I have meetings with customers, followed by some AppFuse development, followed by JavaOne festivities.

As far as missing Mother's Day (yesterday) and Julie's birthday (Saturday), I'm still not in the dog house. Julie and kids have been living it up in West Palm Beach and having a great time. Today they're heading to Disney World. Sounds like they're having more fun than I am. ;-)

Posted in General at May 15 2006, 10:43:31 AM MDT Add a Comment

Ajaxian Faces with David Geary

David wrote both Graphic Java Swing and Core JavaServer Faces (with Cay Horstmann). Both of these were best sellers on Java component frameworks. Not only that, but he's fun to talk to and lives just south of me in Colorado.

Agenda: Ajaxian Faces Essentials, Roadmap, Form Completion, Realtime Validation, Ajaxian Components, Ajax with Shale and Prototype.

Enterprise Java and Ajax: you invoke a URL from the client (XHR), then handle the URL on the server. This handling is usually done by a servlet, filter or a JSF phase listener. These return HTML or XML to the client. Then the client merges the response into the DOM on the client.

JSF and Ajax: JSF is an excellent framework for Ajax. Why? Because of its component model: GET and POST requests are supported and it has custom components and renderers. Furthermore, JSF has lifecycle and event handlers - phase listeners and allows complete control over the lifecycle.

Common Ajaxian use cases: form completion, realtime validation, polling (progress indicators, realtime search, etc.), ajax components and frameworks. In this talk, we'll be covering JSF (POSTs and GETs), JSF and JavaScript, how to control the JSF lifecycle, JSF client ids vs. component ids, accessing view state, and many other things.

Arm yourself with tools: Firefox with the Web Developer Toolbar. Most helpful features: outlining block elements and DOM inspector. Debuggers on client and server: IDEA on the server, Venkman on the server.

Good Resources: Java EE Blueprints, Ajax Magazine and MSDN.

JSF and JavaScript: The HTML component tags have all the event handlers built-in: onclick, onblur, onfocus, etc.

<h:form id="form">
    <h:inputText id="name"/>
    ...
</h:form>

In the above example, the component id is "name" and the client id is "form:name". To do minimal Ajax with JSF, you can use a non-Faces object to handle the Ajax requests with a servlet or filter. All you really need to know is how to reference client ids vs. the ids you code into your view templates.

Realtime validation: to do this, you need access to the view state. Ajax will fire a component's validators, invoke a phase listener (after the Restore View phase), POST a request with XHR and utilize client-side state handling. A typical component tree for a form consists of a UIViewRoot, an HtmlOuputText (instructions for form) an HtmlForm and an HtmlPanelGrid that contains all of the input components.

The JSF Lifecycle: Restore View -> Apply Request Values -> Process Validations -> Update Model -> Invoke Application -> Render Response. You have to do a post with JSF, otherwise the view state won't be available.

To register a phase listener, you merely declare it in your faces-config.xml file. There's a PhaseListener interface that defines 3 methods: getPhaseId(), beforePhase() and afterPhase(). In this example, getPhaseId() returns PhaseId.RESTORE_VIEW and beforePhase() isn't implemented; afterPhase() is used. David then checks for an "ajax" parameter. If it's sent in the request, he grabs the component to validate and invokes all its validators. One of the nice things about JSF is you can modify your client-side components on the server-side. You can also use JavaScript on the client-side to grab the hidden client-side state-saving field and send it with an Ajax request to maintain state.

JSF Ajax Components: To create JSF Ajax components, you'll want to put your JavaScript into a separate file. In the component's renderer, you'll write a <script> tag that uses a JSF page as its "src" element. Then you use a PhaseListener that looks for the URI invoked by "src" and handle it appropriately. Now David is showing us how you need to create a component, a Tag and a Renderer to create an Ajax component. The Tag and the Renderer write out JavaScript functions that do the magic stuff. Finally, you'll need to create a JavaScript file that contains the functions to be called. At this point, ragged on Geary a bit for creating a simple component with 3 Java classes + a .js file.

Rather than writing all this low-level JavaScript code yourself, you can simplify development with JSF and Ajax by using Struts Shale. Features of Shale include.

  • Web flow
  • Remote method calls
  • Tiger extensions
  • Integration with: Spring, Tiles, JNDI
  • View controllers
  • Testing framework
  • HTML views (a.l.a. Tapestry and Facelets)

David gave a quick preview of Shale and showed how much easier it makes Ajax. Basically, you give a specialized URL on your client - and using a syntax of "dynamic/managedBeanName/method", it calls that method on the server. Pretty cool stuff, but doesn't seem a whole lot different from what DWR offers for JSF. "Shale is a proving ground for JSF 2.0, hopefully all its add-ons will make it into the next version of the spec." When David says stuff like this, I'm tempted to use Shale in AppFuse for its JSF support - especially since Shale can work with any JSF implementation (1.1 RI, MyFaces or 1.2 RI).

As usual, this was a good talk by David. He's always entertaining and fun to harass. ;-)

Posted in Java at May 12 2006, 06:06:55 PM MDT 3 Comments

Ajax on Rails with Stuart Halloway

There's a number of presentations I'd like to attend during this time slot. In particular, I'd like to attend Testing with Selenium and Simplified Ajax Development in Java with ICEfaces. However, Stuart Halloway is an excellent speaker and I'd rather hear him talk than learn something in another session. Hopefully other attendees blog about the aforementioned sessions so I can still learn something from them.

Agenda: Ajax, Libraries for Ajax (i.e. Prototype and Scriptaculous), Rails and Ruby.

There's probably 100 people in the room. Stuart did a survey of who is using Rails - I'd say the response was about 10%. He also asked who's considering it for future development. The response seemed to be around 25%. I'm sitting in the front of the room, so I probably didn't see the results as well as Stuart did. Regardless, it's interesting to see that most people in the room won't be using Rails, they're merely interested in it (or they wouldn't be in the room, right?).

The best way to play with Rails on Windows is called InstantRails. For OS X, there's Locomotive.

All the demos given during this session are available in the ajax_labs section at codecite.com.

Things we're going to look at: autocomplete, in-place Editing, searching, sorting, expando, drag and drop, sort, server-side validation, client-side validation, and prototype windows (Stuart prefers to call them divdows).

Stuart is talking a lot about how Rails works at this point, model objects, yml files, tests and sample data. One of the things that I find interesting about most CRUD-generation frameworks is they don't take tests into account. Ruby on Rails generates tests, so does AppFuse. If you work on a CRUD-generation project for web development, do you generate tests too? If not, don't be embarrassed, tell us. There has to be a good reason you're not doing this.

Now the audience is struggling with the concepts in Rails, how ActiveRecord works, etc. For example, one guy asked if it's possible to use JDBC with Rails. It's definitely a humorous question, but Stuart handled it quite well without ridiculing the guy. A couple of notes: Rails doesn't work well with stored procedures or composite keys.

Now we're looking at the view layer, in particular a show.rhtml template. It's pretty simple , but not very HTML-ish. Looks a lot like scriplets in JSPs. Autocomplete with Rails is mostly CSS-driven. To use it in a Rails view, you start with the following line of code at the top of your template.

<%= stylesheet_link_tag 'autocomplete' %>

In Rails, when you want to render an Ajax response in a controller, you use the following at the end of your method.

render :layout=>false

This turns off any page decoration. It'd be nice to have something like this in the Java world - so you could turn off page decoration from SiteMesh, Tiles, etc. It shouldn't be hard to implement this in SiteMesh, but it might take a bit of work for Tiles.

Partials are Rails' way of creating fragments that are designed to be populated and returned by Ajax calls. Their naming convention is to being the filenames with an underscore. For example <%= render :partial=>'search' %> looks for a _search.rhtml template.

For Ajax development with Rails, you're not tied to using Prototype or Scriptaculous. However, since Rails has helper methods that emit the JavaScript, it makes things much easier. If you'd like to use Dojo, you'd have to hand-code the JavaScript into your RHTML templates, or write helper methods for Dojo. Stuart would like to see a Rails plugin that allows you to switch the Ajax helpers from one library to the other.

The last thing Stuart showed was Prototype Windows. This looks similar to lightbox gone wild, except you get better styling around the modal window. If you haven't heard enough of what Stuart has to say, checkout blogs.relevancellc.com. One of the most interesting things lately is he's been posting reviews of the various Ajax books.

Posted in The Web at May 12 2006, 01:35:41 PM MDT 5 Comments

Ajax and Open Laszlo with Max Carlson

Max is the co-founder and Lean Runtime Architect for Laszlo Systems. Max doesn't look at all like I pictured him (do they ever?!). He looks like a heavy-duty engineer, long curly hair, a little rough around the edges. I respect him more already. ;-)

Laszlo Systems Background: company founded in 2000. Laszlo Presentation Server (LPS) released in 2002. Embraced open source; LPS became OpenLaszlo. 2005: it's been widely adopted (130,000 downloads to date). This year, they're extending OpenLaszlo to support multiple runtimes, including DHTML. The company makes money of training and support, as well as developing custom applications (i.e. Laszlo Mail) and modules.

On 2/1/2006, Laszlo Systems joined a select group of tech leaders in establishing the Open Ajax community. Jointly committed to "making it easier for an open source community to form and popularize Ajax."

Demo's: Laszlo Mail, Pandora, Barclay's and Gliffy.

Developing with OpenLaszlo: XML-based, use your favorite XML editor. It's source-control friendly and has a library mechanism (for modularization). It's a familiar methodology for software engineers. It has standard OOP features: attributes and methods, class definitions with inheritance, familiar design patterns apply. There's an emphasis on declarative constructs. Finally, there's an open source Eclipse-based IDE4Laszlo. Originally developed by IBM, among the most popular downloads on alphaWorks. It now contains a WYSIWYG tool and is hosted at http://eclipse.org/laszlo.

LZX: Laszlo's XML Application Description Language: Flash independent tags and APIs (no ActionScript, movieClips, etc.; no need for Flash development). This allowed them to easily port to a different runtime. With OpenLaszlo, you can interface with your server via XML over HTTP, SOAP, XML-RPC and Java RPC. It has a runtime constraint system, hierarchical data binding with XPath. It has media, streaming support (although the Flash runtime seems to load images real slow - see the DHTML vs. Flash demo on http://openlaszlo.org).

Now Max is going through the Laszlo in Ten Minutes tutorial. If you haven't seen this, you should definitely check it out. It's a good quick introduction to OpenLaszlo. One of the unique features of OpenLaszlo is its components are written in LXZ. Compare this to XUL (components written in C) and Flex (components written in Flash) and it seems a lot more open.

In order to solve the nested-for-loops problem with JavaScript and DOM-manipulation, OpenLaszlo uses XPath and turns for loops into simple URL-like expressions. For example:

<text datapath="dset:/employee/firstName/text()"/>

Noticed on Max's Firefox toolbar: a del.iciou.us menu.

For the last 1/2 hour, Max has been talking about LZX, how to handle events, etc. In other words, since I've already worked with OpenLaszlo a bit, I haven't learned anything new.

Now Max is talking about OOP and how you can declare classes with certain attributes and then re-use them. It's kinda like Spring's "abstract beans" where you can declare a template bean and override attributes in child beans. In addition to allowing classes to be declared with no parent, you can create classes that extend an existing class. A common usage is declaring default values and then overriding visual elements (i.e. border size, colors, etc.).

OpenLaszlo 4.0 (with Ajax support) is targeted for a release by the end of the year.

Personally, I think OpenLaszlo is a very cool technology. However, it definitely needs a better IDE IMO. The last time I tried IDE4Laszlo on my Mac, it wasn't even close to useable. From a development perspective, using OpenLaszlo was difficult to work with because I felt like such a moron. With HTML and CSS, I know how to program UIs and it's difficult to give up that knowledge and rely on something else to provide the look and feel of my UI. In reality, I'm simply frustrated with my OpenLaszlo skills and would likely feel different if I was paid to develop a real-world application with it. After all, getting paid to work with a particular technology is almost always the best way to learn it.

Max is a great speaker and did a good job of introducing OpenLaszlo. Furthermore, this was one of the most interactive sessions I've seen at this conference. There's definitely a lot of folks interested in this technology.

Posted in The Web at May 12 2006, 11:50:24 AM MDT 1 Comment

CSS Framework Design Contest: Final Results

20 people voted for the css design contest runoff. Of those, 3 people voted after the Tuesday midnight deadline. Here's the final winners of this contest:

  • 1st place: puzzlewithstyle by Mattias Fjellström
  • 2nd place: andreas01 by me (the question is: should I win or Andreas Viklund - the original designer?)
  • 3rd place: simplicity by Herryanto Siatono

The 3rd place winner was a close call: deliciouslyblue tied with simplicity, but 2 votes came in after the deadline. Congratulations to all the winners - and thanks for helping out with this contest.

Since I'm traveling in San Francisco this week and next, it'll probably take me a couple weeks to send out the prizes (iPods) to the winners.

Now for hard part: integrating the entries into AppFuse for 1.9.2. I hope to make all the winners AppFuse-compatible and ship them (or make them downloadable) as part of the release.

Posted in The Web at May 11 2006, 10:23:42 PM MDT 9 Comments

Lessons learned building a 130+KLOC JavaScript application by Scott Dietzen, CTO of Zimbra

Scott Dietzen is the former CTO of BEA. Apparently he was one of the original founders of WebLogic, before it was bought by BEA. Scott's hope tonight is to share his experiences from developing Zimbra. Why does Zimbra use JavaScript and Ajax?

  • Richly interactive UI
  • Rich client/server communications
  • Zero-cost administration
  • Web security
  • Web look and feel (back button and bookmarks)
  • Multi-browser "standard"

All of the above features where things the Zimbra team expected. They also got lucky in a number of areas.

  • SAO/Mash-ups and Ajax authoring
  • RIA winner? Big sites voting with their feet: Google, Microsoft, Yahoo, Amazon, etc.
  • It really works

They started building Zimbra 2.5 years ago, long before Ajax was possible. Scott actually tried to talk his team out of using JavaScript when they first started architecting the application.

Zimbra's tools are good for Java programmers. If you're not familiar with OO concepts, it might be a bit difficult to understand. Now Scott is showing some demos, basically grids and trees - all built using the "Zimbra toolkit", whatever that is. Now he's moved on to demoing the Zimbra application itself. I used Zimbra as my primary e-mail client for a couple weeks and it's by far the best web application I've ever used. Not only does it look awesome, but everything works just as it would in a desktop application. The unfortunate thing about Zimbra is it has two licenses: an open source one and a pay-for version that has all the features you really want.

Zimbra = "Pure" Ajax. All UI behavior specified in JavaScript. The *entire* UI is written in JavaScript, no HTML. It's more like a typical GUI application from a programming perspective (think JavaScript SWT). Result is "husky" client 3-tier architecture. All UI on client, server-side Java code for UI operations. This is very different from HTML "design center" where you start with an HTML page and augmenting with Ajax. The Zimbra toolkit actually doesn't fit very well into most applications, where folks enhance HTML pages. It's more designed for programmers who want to write their entire application in JavaScript.

Ajax is finally giving us a clear partition between client logic and server logic. The dividing line is up to the developer, that's the challenge for web developers today. It's basically a user-defined SOA Endpoint. Before Ajax, in the Java world, JSPs and Servlets were considered the client-side, even though they were really more server-oriented.

Ajax applications are cheaper on the server/network than Web 1.0/HTML apps. Modulo the initial download (gzip is essential). Ajax is much more expensive on the client CPU. Tend to be finder grained in their client/server interactions. They tend to be more stateful. Rule #1: Pick your service bindings well! For modularity and re-use/mashups.

"There's a special place in heaven for whoever had the patience to get all of that JavaScript right." - Paul Ambrose, WebLogic Founder on Zimbra

Ajax Challenges: Browsers and Toolkits. Browsers render the same HTML differently, they have different event models, different levels of DOM supported, they have different APIs that do the same thing, as well as many issues. As far as toolkits for Ajax, there's too many rather than too few. Consolidation would definitely be a good thing.

Zimbra's Ajax Tookit (AjaxTK), Apache Kabuki* is modeled after SWT. It's a JavaScript OO class library and open source (Mozilla or Apache licensed).

Another big challenge is lack of integrated tooling. There's lot of technologies to deal with concurrently: HTML, CSS, JavaScript, etc. The initial stab at a solution is the Open Ajax Initiative. This is largely a set of technologies from Eclipse, Mozilla and Apache. There's 30-odd companies involved with the initiative, including: IBM, Zimbra, Eclipse, Firefox, Apache, Google, Yahoo, Oracle and Red Hat (or at least that's the logos Scott has on his slides).

The proprietary Ajax Landscape consists of MS Visual Studio (Tooling) and MS Atlas (Toolkit). On the open source side, there's Eclipse+Mozilla for tooling and all kinds of frameworks for toolkits (i.e. Zimbra/Kabuki, Dojo, Scriptaculous). Scott's opinion is there's really no room for any proprietary vendors to provide solutions outside of Microsoft.

Now Scott is doing a demo of mash-ups in Zimbra. He's showing how you can mouse-over many things in an e-mail message to get the information you're looking for w/o switching to a new page/context. Mash-ups he showed include: real-time flight information, displaying schedule for a particular day, dragging a message to an SMS sender, viewing a map by mousing over an address. The latest thing they're working on is dragging an appointment from a calendar to a "travel agent" that books your flight.

Zimbra also includes a WYSIWYG authoring environment for documents. It allows you to do HTML editing (in design view) as well as embedding spreadsheets within pages.

Zimlets: extensible mash-ups for e-mail, calendaring, IM, etc. They're a merge of "pull" and "push". There's zero-client install and they're secure because they're managed by the server administrator. To create a Zimlet, you develop a declarative XML template (Regex, ActionURL, XSLT, CSS, Menu). JavaScript can be used to override Zimbra client-based classes. JSPs can be used on the server-side for customization. Ajax Linking and Embedding (ALE) is Ajax components that are embeddable in editable HTML (simple docs, spreadsheets, etc.). Views are read-only HTML and WYSIWYG Ajax authoring (Ajax cod is the "authoring" application).

Practical Tips for Ajax:

  • Use an Ajax toolkit
  • CSS is your friend
  • Use JSON (as well as XML)
  • Use asynchronous network programming
  • MVC paradigm worked for us
  • Tooling better, but rough edges remain
  • _all.js -> jsmin (saves ~ 1/4X)
  • _all.js, _all.css -> gzip (saves ~ 3-4X)
  • Mercury's QuickTest-Pro (QTP) [IE + FF*]
  • Pick your fights - not all applications need to be Ajax enabled
  • No such thing as secure client-side business logic in Ajax
  • Dedicate some top UI OO talent (or wait for tech to catch up)

Ajax Sweet Spots:

  • Richly interactive UI desirable (HTML simplicity is ideal for many applications - for example, you'd rather use Amazon's one-click than drag a book to a shopping cart)
  • Combine with web look and feel and deployment
  • No client-side data/resources (but is changing, stay tuned)
  • Perfect for on-demand services

Recipe for Ajax Success: Ajax is not a business model, compelling and appropriate innovation is essential.

Next Ajax Steps: In open source land, try the OSS toolkits, Eclipse ATF and participate in Ajax communities (Apache/Zimbra, Eclipse, Mozilla, Dojo, Scriptaculous). Scott moved to fast for me to catch his recommendations for Microsoft developers. He did have positive things to say about Microsoft though.

Hardest Ajax problem of all? Recruiting. According to Scott, it's incredibly hard to recruit people that know Ajax.

Update: Additional coverage of this talk is available at Ajaxian.com.

Posted in The Web at May 11 2006, 09:54:26 PM MDT 7 Comments