History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-2656
Type: Task Task
Status: Resolved Resolved
Resolution: Fixed
Priority: -- --
Assignee: Unassigned
Reporter: John Sundman
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

proxied/solo development tips

Created: 11/Sep/06 05:46 PM   Updated: 22/Feb/07 11:11 AM
Component/s: Documentation
Affects Version/s: None
Fix Version/s: 3.4

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 2,783
Runtime: N/A
Fix in hand: False


 Description  « Hide
I don't know if this will help your situation or not but this is the code
that we use to load our dataset URLs from an external XML file. We need to
do this because we test our app locally as a proxied app, but deploy it as a
SOLO app. A solo app requires the URLs to be relative. Having the URLs in
an external file allows us to swap out the URLs by changing that file. No
need to touch the code...



This is the code in "canvas"...

<dataset name="ds_paths" request="true" type="http" src="paths.xml" />

<dataset name="ds1"/>

<datapointer xpath="ds_paths:/paths/ds1">
  <method event="ondata">
    parent.ds1.setAttribute( 'src', this.getNodeText() );
  </method>
</datapointer>

<dataset name="ds2"/>

<datapointer xpath="ds_paths:/paths/ds2">
  <method event="ondata">
    parent.ds2.setAttribute( 'src', this.getNodeText() );
  </method>
</datapointer>


<dataset name="ds3"/>

<datapointer xpath="ds_paths:/paths/ds3">
  <method event="ondata">
    parent.ds3.setAttribute( 'src', this.getNodeText() );
  </method>
</datapointer>



The contents of paths.xml looks something like this...

<paths>
   <ds1>http://www.domain.com/dsservlet/getds1&lt;/ds1>
   <ds2>http://www.domain.com/dsservlet/getds2&lt;/ds2>
   <ds3>http://www.domain.com/dsservlet/getds3&lt;/ds3>
</paths>




Hmm... looking at the datapointer code above, it could
probably simplified a little too...

<datapointer xpath="ds_paths:/paths/ds1"
             ondata="parent.ds1.setAttribute('src',this.getNodeText())" />


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
John Sundman - 11/Sep/06 06:43 PM
If you are compiling the app as SOLO (lzproxied=false) then a .swf file will
be written to the source directory, and you can fetch that directly,
bypassing the
compiler's check for up-to-dateness.

If you are compiling a proxied app, you can grab the raw swf using wget or
the command line lzc compiler tool and reference that directly from your own
HTML wrappre page. It is only when you fetch *.lzx that the LPS server might
attempt to recompile.





On 4/3/06, Andy Chandler <achandler@visionael.com> wrote:

 (I keep forgetting to use the correct account to send to the list -
apologies if this winds up coming through twice)



I was asked to pass this question along to the list :



            We have a fairly large/complicated application and it has been
observed that whenever a user visits a page for the first time it can take
around 15 seconds for the page to load - thereafter it loads much quicker.
We believe it is due to compilation or perhaps loading the swf into a cache
on the tomcat side of the equation and we were looking to see how we could
avoid that step if the resource hasn't been updated since the last
compilation or if its caching is there any way to pre-load it?

John Sundman - 01/Dec/06 03:59 PM
Fixed in trunk.