View Full Version : Laszlo file sizes and caching?
Micah
06-18-2004, 08:59 PM
I am interested in getting doing some Laszlo coding but I was wondering what the end-user would be looking at in terms of download size. To be more specific:
1) What is the download size difference between a hard coded flash file (all actionscript with components in the library) and a laszlo app?
2) Can you force the client to cache components throughout a session (or longer)? With Flash MX 2004 you can "link at runtime" and create an swf file with all your components. Then the client will have to download that component library file once and use those components in all your swf files throughout the session.
3) Flash now has remoting capabilities which allow for binary data to be sent instead of XML files. 95% of my data is going to be query results sent to the client from an SQL server. With Laszlo, is there any way to send compressed and/or binary data to the client? Between the overhead associated with XML files and the need to send binary results from a database (such as an image stored inside a database) XML does not seem like the best solution.
4) As I understand it, the lzo file is compiled once the first time it is requested and then that compiled swf is sent out each time thereafter, is there any additional serverside overhead beyond that first compilation or is it just like requesting a Flash made SWF file?
5) Can Laszlo send vector graphics? I know it can send an swf file, but are there any functions for actually drawing vector graphics?
6) The last thing I noticed was that some Laszlo applications I have seen seem to lack the "snappiness" of flash/flex applications? Will a Laszlo application perform just as well as an equivilant hard coded (actionscript) swf file? (it could have been poor coding or just the amount of graphics on the apps I was looking at which caused the slowness)
-Micah
antun
06-19-2004, 01:33 PM
1) What is the download size difference between a hard coded flash file (all actionscript with components in the library) and a laszlo app?
I'm not sure about this one.
2) Can you force the client to cache components throughout a session (or longer)?
Your app should get cached by the browser, so that subsequent requests for it will retrieve the locally cached version.
With Laszlo, is there any way to send compressed and/or binary data to the client?
Yes, this has always been the way that Laszlo handles data.
4) As I understand it, the lzo file is compiled once the first time it is requested and then that compiled swf is sent out each time thereafter, is there any additional serverside overhead beyond that first compilation or is it just like requesting a Flash made SWF file?
The lzo file is what is compiled when the application is KRANKed. See here for more on the KRANK feature (http://www.laszlosystems.com/lps-2.1.2/docs/lzx-developers-guide/krank.html). The lzx file is what is compiled the first time the app is requested. The server does cache the lzx file, so subsequent requests for it will require little server overhead.
but are there any functions for actually drawing vector graphics?
Right now you can write a class to draw lines by stretching views and rotating them. I believe that more complex drawing APIs might be present in a future release. In the meantime, you could always have a server-side SWF-generation/bitmap generation technology create the files on demand and load them into your app at run-time.
The last thing I noticed was that some Laszlo applications I have seen seem to lack the "snappiness" of flash/flex applications?
Can you elaborate a little? Are you referring to components (e.g. combobox, etc.), or a particular application?
-Antun
Micah
06-19-2004, 11:06 PM
Your app should get cached by the browser, so that subsequent requests for it will retrieve the locally cached version.
What about components? When using Flash 2004, my components take up about 100k, while my actual actionscript takes up under 10k. I can use the link at runtime feature to make the client download the components once, and then use them across multiple SWFs.
An example:
Component Library (100k) contains all commonly used components.
SWF_1 (10k) a basic flash form using some, or all, of the components in the component library.
SWF_2 (10k) another basic flash form with different components, used in different ways.
In order for the client to view both of those SWFs in a single session, they would have to download a grand total of 120k. If I did not link at runtime, and the components were built into the SWFs normally, then they would have to download 220k. And of course, when you are dealing with 5 or 6 forms it really adds up.
So, is there any way I can do something similar with Laszlo? ie: create a library of components, classes, etc., which the client downloads at the begining of their session?
With Laszlo, is there any way to send compressed and/or binary data to the client?Yes, this has always been the way that Laszlo handles data.
Oh, how do I do that? :P The only information I could find in my brief search was using PHP, or some other server side script, to generate XML output from the SQL results and then send that XML data to Laszlo. Is there a way for Laszlo to interact directly with SQL or PHP variables, so I don't have to convert everything to XML or URL encoded tags (like Flash Remoting where I can send an entire object of data to Flash from PHP)?
Can you elaborate a little? Are you referring to components (e.g. combobox, etc.), or a particular application?
After looking back over the examples, demos, etc. again I think it's just the content that is slow, not Laszlo. It's hard to find Flash 2004 applications as in-depth as the Laszlo dashboard or calandar in order to do a good comparison. ;)
That's all for now. Thanks for the response, I am very interested in Laszlo, but I need to make sure it will do what I need it to before I get too into it.
antun
06-22-2004, 10:47 AM
What about components? When using Flash 2004, my components take up about 100k, while my actual actionscript takes up under 10k. I can use the link at runtime feature to make the client download the components once, and then use them across multiple SWFs.
You can't separately cache components in Laszlo. There's a good reason for this - the Flash Player makes it possible to load separate SWFs and have them cache separately, but the next runtime we choose to target might not. So in the interests of not getting wedded to the Flash Player, we chose not to allow people separately load different parts of their application.
Oh, how do I do that? :P The only information I could find in my brief search was using PHP, or some other server side script, to generate XML output from the SQL results and then send that XML data to Laszlo. Is there a way for Laszlo to interact directly with SQL or PHP variables, so I don't have to convert everything to XML or URL encoded tags (like Flash Remoting where I can send an entire object of data to Flash from PHP)?
I might have misunderstood you here - I thought were asking about whether Laszlo supports binary data transfer. That is the standard mode for data transfer between the client and the LPS. The LPS transcodes data requests which allows the Flash 5 player to be a viable runtime. As for how to bring data into Laszlo, right now we support XML over HTTP, so your search was correct: you have to have a service that generates XML data (PHP, JSP etc.) There is no way to interact directly with something like PHP, but there will be more involved data connectivity with server data sources in the future, and other protocols will be supported in a future release (e.g. SOAP).
Thanks for the response, I am very interested in Laszlo, but I need to make sure it will do what I need it to before I get too into it.
The best way to get a feel for Laszlo is to work download the LPS, work through the tutorials and build a small app. There's a BETA version of the upcoming Developers Guide, which you can see online at:
http://www.laszlosystems.com/lps-2.2b1/docs/developers-guide/index.html
-Antun
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.