Laszlo in Action
Norman Klein and Max Carlson with Glenn MacEwen
  • January 2008
  • ISBN 9781932394832
  • 552 pages

Every OpenLaszlo developer should have a copy.

Ryan Stewart, Adobe

Laszlo in Action is the first comprehensive guide to the Laszlo system and its language LZX. OpenLaszlo is an increasingly popular open-source platform for the development and delivery of rich internet applications across multiple platforms: Flash, DHTML, and J2ME. The dramatic emergence of Ajax over the past year was a first step in the transition from page-oriented HTML web applications towards more full-featured rich internet applications. OpenLaszlo provides another important step in this continuing evolutionary process through the increased productivity resulting from LZX's declarative approach. It provides developers with the tools to create web-based applications offering the usability and interactivity associated with desktop applications, and the low costs associated with web-based deployment. The cross-platform nature of Laszlo LZX applications allows source code with only minimum modifications to run natively on all popular web browsers, on all desktop operating systems, on the Flash platform, and other platforms in the future.

About the book

Written to address the needs of a wide spectrum of developers, ranging from client-side HTML and JavaScript developers all the way to enterprise-class Java or Rails engineers, this book provides a very hands-on approach towards building applications that solve real-world problems across both the Flash and DHTML platforms. Starting with the fundamentals of Laszlo LZX, the authors quickly move towards applying this knowledge to the design and development of a full-scale application called the Laszlo Market. This provides a working context to assist understanding the underlying concepts of Laszlo LZX and, more importantly, how to apply this knowledge in innovative ways. The construction of the Laszlo Market proceeds over the course of the book illustrating topics starting with an initial wireframe and storyboard design to optimization issues dealing with the application's deployment across the Flash and DHTML platforms.

In the first four chapters readers are given a thorough overview of the Laszlo LZX language. You are shown how to design a Laszlo Market rich internet application using traditional design techniques such as wireframes and storyboards. This application is built in accordance with the principles of user-centered design, so you begin with a series of prototypes that are continually refined. The initial work on this application focuses on building its general architecture and providing a unit-testing framework. In subsequent chapters, you further refine this prototype by developing the individual screens utilizing Laszlo's components, layouts, and services.

The prototype you use is continually refined to first work with local datasets which allows your screens to be populated with data. Afterwards, you begin developing the API for communicating to back-end web servers. To demonstrate Laszlo's independence from any particular web server, two implementations featuring the Java Struts and Ruby on Rails frameworks are used to interface to a MySQL database. This provides your instructional application with a fully operational web server conforming to the REST web-service interface.

Once we are satisfied with the look of the prototype created with stock Laszlo components, we cover the conversion process progressing from a prototype to a finished application containing a branded application look. This branded appearance involves selecting a color scheme and fonts, and designing custom components to provide the branded appearance. Differences in platform capabilities are addressed to provide an identical look across both the DHTML and Flash platforms.

We also examine how to integrate Laszlo DHTML applications with Laszlo Flash components providing audio and video capabilities not available within DHTML. These audio and video capabilities range from SWF-embedded services to the streaming media services provided by the open-source streaming-media Red5 server.

Finally, the book shows you how to optimize your Laszlo application. This covers the tradeoffs involved in trading responsiveness for overall performance and the different techniques to achieve these goals.

Table of Contents detailed table of contents



about this book

about the title

about the cover illustration

Part 1 The basics

1. Turbocharging web technology

1.1. Laszlo is for designing and building RIAs

1.2. A first taste of Laszlo LZX 12

1.3. Deploying a Laszlo application

1.4. Summary

2. The declarative world of LZX

2.1. Architectural support

2.2. LZX classes

2.3. The fundamentals of tags

2.4. Summary

3. Core LZX language rules

3.1. Core LZX language rules

3.2. Learning LZX Basics

3.3. Creating object hierarchies

3.4. Storing values in attributes

3.5. Methods and event handlers

3.6. Declarative constraints

3.7. JavaScript and the script tag

3.8. Summary

4. A grand tour of views and user classes

4.1. Introducing the basic features of views

4.2. Interacting with a view 98

4.3. Locating views

4.4. Instantiating LFC-based objects

4.5. User-defined classes

4.6. Summary

5. Designing the Laszlo Market

5.1. Prototyping our application

5.2. Coding the prototype

5.3. Configuring the checkout screen

5.4. Central control of screen display

5.5. Refactoring our code

5.6. Testing with LzUnit

5.7. Putting it all together

5.8. Summary

Part 2 Prototyping the Laszlo Market

6. Laying out the Laszlo Market

6.1. Common layout problems

6.2. Creating custom layouts

6.3. Laying out forms

6.4. Summary

7. Introducing Laszlo components

7.1. Base component classes

7.2. Building a multipage window

7.3. Validating input fields

7.4. Summary

8. Dynamic behavior of events and delegates

8.1. Exploring event-handler and constraint operation

8.2. Adding dynamic behavior

8.3. Using delegates with layouts

8.4. Dynamically adding attributes

8.5. Handling complex behavior with attribute setters

8.6. Summary

9. Using Laszlo services

9.1. Overview of services

9.2. Different ways to use a service

9.3. Building a stopwatch

9.4. Demonstrating services with a login window example

9.5. Building a drag-and-drop network

9.6. Summary

Part 3 Laszlo datasets

10. Working with XML datasets

10.1. Introducing XML-based datasets

10.2. Matching multiple data elements

10.3. Sorting datasets

10.4. Prototyping datasets for the Laszlo Market

10.5. Prototyping with grids

10.6. Summary

11. Using dynamic dataset bindings

11.1. Linking data nodes and data pointers

11.2. The LzDataNode classes

11.3. Navigating with LzDatapointer and LzDatapath

11.4. Advanced replication manager issues

11.5. Master-detail design pattern

11.6. Summary

12. Scoreboarding the shopping cart

12.1. How a scoreboard works

12.2. Reimplementing the Product List window

12.3. Building the scoreboarding shopping cart

12.4. Summary

Part 4 Integrating DHTML and Flash

13. Enhancing the user experience

13.1. Animating transitions

13.2. Building resizable buttons

13.3. Modal windows and button interactivity

13.4. Basics of animation

13.5. Complex animated effects

13.6. Summary

14. Branding an application

14.1. Creating an application-specific look

14.2. Branding with custom components

14.3. Summary

15. Integrating DHTML and Flash

15.1. Advantages of a hybrid approach

15.2. Using an HTML wrapper

15.3. Intermixing DHTML and Flash applications

15.4. Calling browser JavaScript from Laszlo

15.5. Calling Flash from Laszlo

15.6. Embedding HTML in Laszlo

15.7. Working with video

15.8. Summary

Part 5 Server and optimization issues

16. Networked data sources

16.1. Interfacing to web servers

16.2. Accessing sessioned data

16.3. Maintaining server domains

16.4. Summary

17. Managing large datasets

17.1. Processing with alternative filters

17.2. Optimizing data display

17.3. Paging datasets for long listings

17.4. Summary

18. Laszlo system optimization

18.1. Dynamically loading optional elements

18.2. Optimizing critical elements

18.3. Reducing the Market’s startup time

18.4. Performance utilities

18.5. Summary

Appendix A: Working with Struts (available online only)

Appendix B: Working with Ruby on Rails (available online only)


What's inside

  • Provides a comprehensive overview of the Laszlo LZX language
  • Features a Laszlo online store rich internet application
  • Contains Struts and Ruby on Rails back-end server implementations
  • Uses Red5 server to provide streaming video
  • Addresses issues building OpenLaszlo applications across both DHTML and Flash

About the authors

Norman Klein, a former consultant with Laszlo Systems, has been a software engineer for over 20 years, and has been involved in internet development since its inception. He has also done extensive development work with both web frameworks and other RIA languages such as Adobe's Flex.

Max Carlson, one of the founders of Laszlo Systems, is the lead engineer on the OpenLaszlo DHTML 4.0 project. He is also responsible for implementing many of the features of the current 3.X OpenLaszlo release.

Glenn MacEwen, after 26 years on the Computing Science faculty of Queen's University in Canada, retired to Princeton, New Jersey, to work out of his home office as a technical writer and editor. When not writing or editing, Glenn plays bagpipes, flies small aircraft, and homebrews beer.

placing your order...

Don't refresh or navigate away from the page.
eBook $23.39 $35.99 PDF only
Laszlo in Action (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.

FREE domestic shipping on three or more pBooks