Compilation and Execution (openlaszlo)

7. Compilation and Execution

LZX programs are compiled by the OpenLaszlo Compiler, downloaded as byte code, and executed on the client. In writing your program you can make trade-offs between compilation performance, download and startup up time, and runtime performance.

As in other scripting languages such as Perl and Python, LZX programs execute in approximately linear order. That is to say, if you were to write

<view name="outside"> 
  <view name="inside"/> 
</view>

Then inside would be built before outside. However in many cases you may wish to control the order in which objects are built, or initialized. LZX gives you fine grained control over initialization and instantiation of views.

The <splash> tag allows you use the canvas to display information while the program is being initialized.

 

8. On Runtimes and Deployment Modes and the "Core" API

[Note]Note

The following section also appears in the Preface; we repeat it here on the assumption that the Preface is an often-skipped part of any manual.

OpenLaszlo applications can be compiled to run in any of several runtimes, and in either of two deployment modes. Some capabilities are available in only a subset of these use cases. OpenLaszlo's "core" APIs run on all target runtimes, and they get the most attention in this Guide. The "Core API" is kind of loose concept, since there's no formal definition, but what it means is that unless you see indication to the contrary, you can assume that the topic under discussion applies to all runtimes. Similarly the default deployment mode is assumed to be SOLO.

Nevertheless, as a developer you have to decide whether to:

  1. optimize for swf (employ swf-only APIs, (and maybe even touch Flash APIs))

  2. optimize for dhtml (employ dhtml-only APIs)

  3. code to lowest common denominator ("core" APIs only)

  4. conditionalize (include both. An example would be including comma separated list of embedded and system fonts; when compiled to SWF you get embedded font, to DHTML you get system font).

The focus of the OpenLaszlo Application Developer's Guide is (c), the lowest common denominator; runtime-specific APIs and engineering approaches are presented as adjuncts. Graphic devices ("glyphs") in the margin call attention to non core/non SOLO information.

Depending on which approach you're taking, you'll make different engineering decisions and different approaches to reading the this Guide. For example, if you're determined to deploy SOLO, you can just skip all the chapters marked with the "Server Required" device, etc.

Finally, this Guide does not address any browser-specific considerations. If a thing does not run on all supported browsers for a given runtime, it's by definition not supported and thus should not be cluttering up our lovely Guide. Nonstandard, browser-specific things are described in the release notes or the OpenLaszlo Wiki.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值