Tuesday, July 26, 2005

OpenLaszlo Prototype 50% Complete, Let's talk about the Bad and the Good.

As I mentioned the other day, I'm developing my web-based Project Management application, Ataraxis Unity, with OpenLaszlo. (OpenLaszlo applications are written in XML and JavaScript. The OpenLaszlo server then compiles the XML and JavaScript into .swf files, which run in the Flash player.) I'd say I'm about half through my quick, dirty, non-functioning prototype. The basic visual layout of the my application icons, menus, and headers haven't changed from my XHTML version. But learning how to put things together in OpenLaszlo, has had it moments of frustration.

Like all technologies, OpenLaszlo has it's bad points and it's good points. I'll start with the bad. Please keep in mind that I've only been working with OpenLaszlo for a total of (about) 40 hours. So I'm still getting to know the in's and out's of the technology.

Bad
  • The components are of varying quality. Laszlo Systems, the people who created (and open-sourced) OpenLaszlo have built a commercial email application called Laszlo Mail, which is (or will be) used by Earthlink (yeah, the big ISP with millions of customers). I looked over the screen shot of Laszlo Mail, and I don't see a single standard OpenLaszlo component. The specific widget I've had the most issues with is the standard "grid" widget. It's really awkward to work with. For example, centering text in a column is a lot harder than it should be. Don't get me wrong, the grid works, it's just a pain in the butt. Another widget I have a love/hate relationship with is the tabbed pane. Honestly, I love the tabbed pane, but it has a few quirks. For some reason the tabpane is not what I call, "percentage aware". If you have your layout set to expand with the width of your browser you do so by setting the "canvas" width to 100%. A lot of the components in OpenLaszlo also allow you to give them a percentage for their width and height, and they will act as you expect them to. Except for the tabpane. Set the tabpane to 100% and it will render it at 100%... initially. I.e. It will start out at 100%, but never shrink or grow as the other components on the page do when their container adjusts itself. There is a work around that I am taking advantage of. The work around, well, works. But I don't understand why it doesn't "just work". There are a bunch of small issues like this that you have to work around with the standard OpenLaszlo components. None of them are show-stoppers, and you can always write your own from scratch, but I was hoping the components would be a little more mature.
  • Awkward view referencing. In OpenLaszlo every "thing" you make is extending from a "view" class. A lot of the views are nested in parent/child relationships. The most difficult issue I've had with programming in OpenLaszlo is finding a clean way to reference views that are a few levels up the relationship tree. The easiest, and messiest, way to reference them is hard coding the path to the view you want. See this post I made to their forum. (I would have posted the code here, but I'm having issues with posting code inside of Blogger's WYSIWYG.) Are you back from reading that forum post? Good. Using the "classroot" style has alleviated some of the pain, but not all. I've played around with the "searchSubViews" and the "searchParents" methods. I rarely need to search the sub views, and I couldn't get the "searchParents" method to work. I need to experiment with those two methods before I start the real development of my application.
  • Not-all-that-great-documentation. For a product that used to be sold for ten's of thousands of dollars, and is now in it's third version, you would expect some really good documentation. The Software Engineer's Guide to Developing Laszlo Applications is a good start (even with the grammatical and spelling errors). But the guide doesn't go beyond simple examples. However, it does show you how to build your own components (hint, hint!). The javadoc-style reference they provide is also pretty thin.
  • Lack of good frameworks and community established best-practices. I can't blame OpenLaszlo itself for this. It's up to people like me, and them, to produce those kinds of things. But there's a gaping hole in this department. Having to figure out the best way to build a layout that switches out pages on my own isn't fun. I've been spoiled by the framework-for-everything world of Java/JSP and Fusebox for Coldfusion!
Now for the Good
  • Animation library. Animation gives you two things. 1) Coolness factor, and if you used properly, 2) increased usability. When I've watched my Apple Computer-owning friends and colleagues use OSX my chin is usually on the floor and I'm drooling profusely. Apple uses animation in all the right places, and I'm hoping to do the same.
  • Single Rendering Engine (Flash Player). Oh how I love that I only have to debug my GUI once!
  • Built-in "Windows". If there is something that I would tell every web developer to never do, it would be to never pop open a new browser window in your application. You never know what kind of pop-up blocker someone has installed. And you would be shocked to find out how many people just can't work with windows. I've seen users have such a hard time with apps that open new browser windows. The window becomes lost behind the main browser window, they can't find the window in their task bar, if they even know what that thing is on the bottom of their screen - it's just pathetic. As a developer you have to write JavaScript to have the two windows react to each other, and you know I don't like that! OpenLaszlo has a built-in "window" component. This thing is great. It's not a new browser window, it's in the Flash player. It can't get lost on the user's desktop because it never leaves the inside of the browser window. Development is also the same as any other part of OpenLaszlo. The window is just another view in the application, you have access to all the global functions and variables in a seamless manner.
Well, that is my current list of likes and dislikes of OpenLaszlo. As I develop more I'm sure I'll find a lot more issues to add to each list.

I'm really excited about the capabilities OpenLaszlo has provided to me. I'm going to be able to create a much better user experience for my customers than if I had used HTML and JavaScript. I can't wait until my prototype is at a point where I can send it to people for feedback!

5 Comments:

Anonymous Anonymous said...

Keep posting, its interesting to see what you think of laszlo

Wednesday, July 27, 2005 11:49:00 AM  
Blogger Henry said...

regarding accessing views, are you familiar with the "classroot" feature?

If you define a class, you can access it from any depth of nested views

class name="foo"
method name="doSomething"
...
/method

view
view
view
method name="bar"
this.classroot.doSomething();
/method


sorry I cann't figure out how to enter XML into this blog, so I left out the pointy braces

Wednesday, July 27, 2005 1:01:00 PM  
Blogger Michael Sica said...

Hi Henry,

Thanks for the tip. As I said in my blog post, using the classroot technique has solved some of these problems, but not all of them.

For example, let's say you want to get at an attribute that is 2 views up from the current view and two views down from the classroot. Using both the parent.parent technique, and the classroot technique, you're still hardcoding the path to the value.

Like I said in my post, I need to spend some more time with the searchSubViews and searchParents methods. They may hold the key to my frustrational-lock. :)

Wednesday, July 27, 2005 7:24:00 PM  
Blogger Mario said...

Hi Michael,

just found your blog via the Laszlo forums - very interesting indeed. I just thought I'd add the one single thing I love about Laszlo: the way you can bind UI components to data. At least for my requirements, this was exactly was I was looking for: post to a web service, receive an XML dataset, and bind components to that dataset. User does stuff, posts to web service, and we receive back a new XML dataset, which refreshes the UI.
I know that this may well not be how many people will use OpenLaszlo, but for me it was a real eye-opener..

I'll keep reading and see how you get on - best of luck!

Mario.

Monday, August 01, 2005 5:28:00 PM  
Blogger Michael Sica said...

Hi Mario, thanks for leaving a comment!

I totally agree with your statement regarding the databinding. I think the main way I am going to communicate with my "business logic" is through REST-based web services. What I really love about Laszlo is that it's impossible to interact with the DB from the view... it forces you to not co-mingle the layers.

As I develop more with OpenLaszlo I'll be complaining about what I don't like - please feel free to comment and leave any corrections to what I'm saying! :)

Monday, August 01, 2005 8:30:00 PM  

<< Home