[Laszlo-dev] Importing precompiled laszlo files questions
Oliver Steele
steele at laszlosystems.com
Tue Sep 13 13:45:19 PDT 2005
<include> and <import> both break an application into source files:
they let you distribute an application's sources among multiple
source files. They address developer workflow, code ownership, and
source control issues.
<import> additional breaks an application into multiple delivery
components: they let an application defer download of some
components. It addresses the initial download size of an
application; nothing more. It is intended for the scenario where all
the source files are available when an application is created; it's
synonymous with <include> except that the bits it creates are
distributed across multiple files, instead of all placed in one
file. These bits can't be mixed and matched any more than the bits
in a single-object-file application created with <include> can.
Neither of these is suitable for separate compilation or for a plug-
in component architecture, where components aren't known until
runtime. They don't support separate compilation: the library files
will only work with the specific application file that they were
compiled against, and vice versa. Second, because they don't support
modularization: all library files share the same namespace. The
second problem could be worked around; the first can't (except by
avoiding a certain set of implementation-specific features that is
likely to change from release to release and from target to target).
There are other functions of a full-fledged component system (such as
OSGi), but these could all be added at a layer above the module
layer, or kludged around, if separate compilation worked (and with
the use of the undocumented library.unload() feature):
- Platform version detection
- Component versioning and version detection
- Lifecycle management
- Component discovery
---
So, that's the problem. As for the solution: Is it a requirement
that the laszlo file is precompiled? Is it a requirement that the
app can't be recompiled when this happens (or upon receipt of the
next request after this happens)? If you can negotiate away either
of these requirements, I can think of some other solutions.
Otherwise, if you're able to dedicate some resources towards the
platform itself, we could either tell you what steps to take in order
to add an option for separate compilation (it involves resurrecting
and finishing some designs from an abandoned path we went down in the
initial implementation of the feature), or an estimate of what it
would take to pay for employees or contractors (that we could line
you up with or manage) to do this themselves.
On Sep 13, 2005, at 3:38 PM, dhay at lexmark.com wrote:
> Hi,
>
> Thanks for the reply.
>
> So, is it possible for someone to "drop in" a precompiled laszlo file
> (maybe using a stub piece of code that does the <include> to
> generate the
> file) to the "build" subdirectory and have the app load it when
> needed?
>
> We have a fairly undefined requirement at this time to break the
> app into
> components, and allow new components to be added at a later date.
>
> Do you have any feel for the best way to do this?
>
> cheers,
>
> David
> x54680
>
>
> |---------+---------------------------->
> | | P T Withington |
> | | <ptw at pobox.com> |
> | | |
> | | 09/13/2005 03:09 |
> | | PM |
> | | |
> |---------+---------------------------->
>
>> ---------------------------------------------------------------------
>> ----------------------------------------------------|
>>
>
> |
> |
> | To:
> dhay at lexmark.com
> |
> | cc: laszlo-
> dev at openlaszlo.org
> |
> | Subject: Re: [Laszlo-dev] Importing precompiled laszlo
> files questions |
>
>> ---------------------------------------------------------------------
>> ----------------------------------------------------|
>>
>
>
>
>
> On 13 Sep 2005, at 14:15, dhay at lexmark.com wrote:
>
>
>>
>> Hi,
>>
>> We need to break up our app into sub-components, and also allow a
>> developer
>> down the road to simply drop a precompiled laszlo file into a
>> directory and
>> have our app pick it up.
>>
>> Has anyone done this?! Some pointers would be great!
>>
>> I guess my first question is the difference between <import> and
>> <include>?
>> Could anyone explain, please?
>>
>
> include is literally a textual inclusion
>
> import supports separate compilation and deferred loading
>
>
>> Also, can <include> only be used with uncompiled lzx files?
>>
>
> yes
>
>
>> And can <import> only be used with files that are in a "build"
>> subdirectory?
>>
>
> yes, at the current time because the compiler compiles the whole app,
> but splits out the imports for deferred loading. this is partly due
> to limitations of the current target platform.
>
>
>
>
>
> _______________________________________________
> Laszlo-dev mailing list
> Laszlo-dev at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>
More information about the Laszlo-dev
mailing list