<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;ul&gt;
	&lt;li&gt;Install &lt;a href=&quot;http://www.openlaszlo.org/download&quot;&gt;open laszlo 4.x&lt;/a&gt; on your dev machine&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;Setup merb to handle laszlo requests&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;add the following to your after_app_loads block&lt;/p&gt;
Laszlo.url = &amp;#8220;http://127.0.0.1:8080/lps-4.2.x&amp;#8221;
Merb.add_mime_type :swf, :to_swf, %w[application/x-shockwave-flash]
&lt;ul&gt;
	&lt;li&gt;You need to install haml and the merb haml plugin&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;You need to download/checkout http://github.com/mcarlson/laszlo_post_api/tree/master  and place it  into the root of the lps (that&amp;#8217;s the code that handles the magic of compiling at runtime)  (It could be automated but it&amp;#8217;s hard to figure out where your open-laszlo server is and it might be on a different machine)&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;put the resources in a resources directory directly in your views or for global ones app/views/resources&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;workflow:&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;you make your lzx/&lt;span class=&quot;caps&quot;&gt;XML&lt;/span&gt; views using a regular template&lt;/li&gt;
	&lt;li&gt;inside your action you do laszlo(render)&lt;/li&gt;
	&lt;li&gt;when you hit the &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; in dev mode, it does a bunch of magic and redirects you to the compiled version&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;layout&lt;/li&gt;
&lt;/ul&gt;
&lt;span&gt;canvas{:width =&amp;gt; &amp;quot;100&lt;/span&gt;&amp;quot;, :height =&amp;gt; &amp;#8220;100%&amp;#8221;, :bgcolor =&amp;gt; &amp;quot;0xDDDDDD&amp;quot;}
= lz :reload_button if Merb.environment == &amp;#8220;development&amp;#8221;
= catch_content :for_layout

&lt;ul&gt;
	&lt;li&gt;view:&lt;/li&gt;
	&lt;li&gt;start by defining your resources&lt;br /&gt;
     = lz :resource, &amp;#8220;logo&amp;#8221;, &amp;#8220;laszlo_store_header.png&amp;#8221;&lt;br /&gt;
     = lz :resource, &amp;#8220;video&amp;#8221;, &amp;#8220;mediaplayer.png&amp;#8221;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;(resources being in app/views/resources)&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;setup your init block:&lt;/li&gt;
&lt;/ul&gt;
= lz :on, :init do
:cdata
gController.setAttribute(&amp;#8220;appstate&amp;#8221;, &amp;#8220;Login to Main&amp;#8221;);

&lt;ul&gt;
	&lt;li&gt;( see http://pastie.textmate.org/private/kn5qenzzflq3i7mbgg for more)&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;Deployment: Getting to the point where it&amp;#8217;s easy to deploy &lt;span class=&quot;caps&quot;&gt;SOLO&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; is still a task to do&lt;/li&gt;
&lt;/ul&gt;</body>
  <created-at type="datetime">2008-07-05T13:12:59-07:00</created-at>
  <id type="integer">33413</id>
  <permalink>merb_laszlo</permalink>
  <repository-id type="integer">218</repository-id>
  <title>merb_laszlo</title>
  <updated-at type="datetime">2008-07-05T13:20:50-07:00</updated-at>
  <user-id type="integer">113</user-id>
</wiki>
