I see the Flash problem, but I was mainly thinking of DHTML apps. With
Flash, you can do a lot with pure Flash without the need for injecting
HTML into a page/view. That's needed for DHTML, and then it should be
very easy - because every developer would expect it to be easy. Living
inside the same DOM, it shouldn't be difficult to do it.

In the end it's the productivity for a platform which makes up the
largest portion of the value. If simple things as using a bit of HTML
code inside an Ajax app cost you days to do them, it will feel as if
the platform has been over-engineered. Of course I'm aware of the
technical details and difficulties, but sometimes simple solutions for
one runtime are more valuable to cross-runtime magic.

On Wed, Jul 14, 2010 at 6:29 PM, Max Carlson <[email protected]> wrote:
> On 7/14/10 12:59 AM, Raju Bitter wrote:
>>
>> How can something as simple as injecting an HTML snippet into a page
>> be so difficult? How many times did this discussion come up in the
>> past years?
>
> Yes, everything takes longer than I'd like :).  I don't know of a good way
> to make the barrier between Flash and DHTML completely seamless. The fact
> is, it's not simple under the covers.  The question is, how do we make it
> simple for developers by hiding some of this complexity?
>
>> If you'd make views accessible out of JavaScript that would make
>> things much, much easier as well (I mean JS directly in the page, not
>> within LZX). OpenLaszlo is artificially creating the same barriers
>> between simple JS and the HTML page which we have in Flash.
>
> So the question becomes, how do you decide which Flash APIs you want exposed
> on the JS/browser side?  If you could do this, OL could create the necessary
> proxy calls on your behalf and 'hide the seam' between Flash and JS.  It
> would also make it easy to proxy those methods directly into a containing
> <html/> tag, making the calls fairly seamless.  In that case, there wouldn't
> be any difference to a developer between calling the view APIs directly a
> <view/> vs. an <html/> with an embedded app.
>
>> @Ono: Try http://www.schillmania.com/projects/soundmanager2/, it's
>> used by last.fm as well. Supports HTML5 audio playback on iOS, and has
>> a SWF8/SWF9 playback components with 4kb/12kb file size. If you have
>> an HTML5 OpenLaszlo app, it should be the perfect tool for
>> audioplayback.
>
> Cool!  You still have the API bridging problem though...  And when you build
> a Flash version of your app, soundmanager looks unnecessary :)
>
>> On Wed, Jul 14, 2010 at 7:42 AM, Ono Keiji<[email protected]>  wrote:
>>>
>>> Hi Max,
>>>
>>> Thank you for your reply.
>>> In fact, i have tried embed swf into my app according to musicdhtml, as
>>> following.But it did not work like musicdhtml,it was just written the
>>> text
>>> in the view.
>>> My aim is located the swf in the given position into dhtml.
>>> Many thanks for your advices.
>>>
>>>
>>>    <attribute name="htmlsnippet" type="string" value="" />
>>>    <handler name="oninit" args="e">
>>>    <![CDATA[
>>>        canvas.htmlsnippet = "lz.embed.swf({url:
>>> 'dum.lzx.swf10.swf?lzt=swf',
>>> width: '100', height: '100', id: 'dumapp'})";
>>>    ]]>
>>>    </handler>
>>>
>>>    <simplelayout/>
>>>    <view name="v2" width="500" height="100">
>>>       <text id="video" width="400" height="100" bgcolor="#cccccc"
>>> resize="true"/>
>>> <!--
>>>        <html id="ht" src="http:dum.lzx.swf10.swf" width="400"
>>> height="100"/>
>>> -->
>>>    </view>
>>>    <button text="modify text"
>>> onclick="video.sprite.setText(canvas.htmlsnippet)" />
>>>
>>>
>>>
>>> Quoting Max Carlson<[email protected]>:
>>>
>>>> Thanks for filing the JIRA for the compiler issue!
>>>>
>>>> On 7/13/10 6:48 PM, Ono Keiji wrote:
>>>>>
>>>>> I tried as following after reading wiki of SWF in DHTML.
>>>>>
>>>>> 1.<videoview runtime="swf"/>  this property has not implement yet.
>>>>
>>>> We need to add wideo and audio support for HTML5 - see
>>>> http://jira.openlaszlo.org/jira/browse/LPP-9019  Until then, we need to
>>>> embed swf to play video and audio.
>>>>
>>>>> 2.<html ...../>  this can show the videoplayer in it, but don't know
>>>>> how
>>>>> to pass a video source from dhtml to swf.
>>>>
>>>> This is a great way to go for now.  You can use the
>>>> html.callJavascript() API to send a URL to the HTML embedding the
>>>> player.  You can use something like
>>>> html.callJavascript("lz.embed.videoplayer.setCanvasAttribute('videourl',
>>>> 'http://...')")
>>>>
>>>>> give me sample :<
>>>>
>>>> Let me know if you have more questions!
>>>>
>>>>> ono
>>>>>
>>>>> Quoting Ono Keiji<[email protected]>:
>>>>>
>>>>>> I filed this compile error to jira, lpp-9184.
>>>>>>
>>>>>> And return to the issue of<videoview>  in dhtml.
>>>>>> Are there any workaround idea ?
>>>>>>
>>>>>> Thank you.
>>>>>>
>>>>>> ono
>>>>>>
>>>>>> Quoting Ono Keiji<[email protected]>:
>>>>>>
>>>>>>> Adding this, in audiokernel.lzx get compile error at swf9 over.
>>>>>>> You can confirm it compile with 'audiokernel.lzx?lzr=swf10'.
>>>>>>> It seems like that compiler dose not allow the canvas size
>>>>>>> zero(width=0/height=0).
>>>>>>> Is there any workaround or i should file it to jira?
>>>>>>>
>>>>>>> ono
>>>>>>>
>>>>>>> Quoting Ono Keiji<[email protected]>:
>>>>>>>
>>>>>>>> Music Player(<view>) was works fine, but i have no idea how to use a
>>>>>>>> video player(<videoview>).
>>>>>>>> The size are zero in the example of 'musicdhtml', it is fine for
>>>>>>>> audio.
>>>>>>>> But video need width/height in it.
>>>>>>>> When i want to set video player in arbitrary position in my dhtml
>>>>>>>> application,
>>>>>>>> how can i write a code ?
>>>>>>>> Could you show me some example, if they are able to do, how to
>>>>>>>> combine
>>>>>>>> videoview and dhtml ?
>>>>>>>>
>>>>>>>> Thank you
>>>>>>>>
>>>>>>>> ono
>>>>>>>>
>>>>>>>>
>>>>>>>> Quoting Ono Keiji<[email protected]>:
>>>>>>>>
>>>>>>>>> Thank you Henry,
>>>>>>>>> I noticed it. :)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Quoting Henry Minsky<[email protected]>:
>>>>>>>>>
>>>>>>>>>> Well, I don't specifically know what is happening, but whenever
>>>>>>>>>> you have
>>>>>>>>>> something that works in proxied mode, but fails in SOLO mode, you
>>>>>>>>>> should
>>>>>>>>>> always check two things:
>>>>>>>>>>
>>>>>>>>>> 1) That flash permissions (such as a server crossdomain.xml file)
>>>>>>>>>> are
>>>>>>>>>> correct
>>>>>>>>>>
>>>>>>>>>> 2) That the MIME type of the media file is correctly being sent
>>>>>>>>>> from the
>>>>>>>>>> server
>>>>>>>>>>
>>>>>>>>>> On Mon, Jun 28, 2010 at 3:25 AM, Ono Keiji<[email protected]>  wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> I am now trying a swf, that is video player, into DHTML
>>>>>>>>>>> application.
>>>>>>>>>>> I found lpp-7818 and musicdhtml example, they works fine in proxy
>>>>>>>>>>> mode,
>>>>>>>>>>> but it dose not
>>>>>>>>>>> work in solo mode.
>>>>>>>>>>> I have tried as following,
>>>>>>>>>>>
>>>>>>>>>>> 1. main.lzx compile to dhtml
>>>>>>>>>>> 2. audiokernel.lzx compile to swf
>>>>>>>>>>> 3. write those in wrapper html as following,
>>>>>>>>>>> lz.embed.swf({url: 'audiokernel.lzx.swf8?lzt=swf8', bgcolor:
>>>>>>>>>>> '#eaeaea',
>>>>>>>>>>> width: '0',
>>>>>>>>>>> height: '0', id: 'audiokernel'});
>>>>>>>>>>> lz.embed.dhtml({url:
>>>>>>>>>>> 'main.lzx.js?lzt=object&lzr=dhtml&_canvas_debug=false', bgcolor:
>>>>>>>>>>> '#ffffff', width: '100%', height: '150', id: 'lzdhtmlapp'});
>>>>>>>>>>>
>>>>>>>>>>> I use lps4.7.3, FP10, FF3.
>>>>>>>>>>>
>>>>>>>>>>> Can i handle it in solo mode ?
>>>>>>>>>>> Thanks in advance.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> ------------------------------------------
>>>>>>>>>>> Ono Keiji
>>>>>>>>>>> [email protected]
>>>>>>>>>>> URL http://www.net8.co.jp
>>>>>>>>>>> ------------------------------------------
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Henry Minsky
>>>>>>>>>> Software Architect
>>>>>>>>>> [email protected]
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> ------------------------------------------
>>>>>>>>> Ono Keiji
>>>>>>>>> [email protected]
>>>>>>>>> 1-45-11 Mizue Edogawa Tokyo JP
>>>>>>>>> TEL 03(3676)6599
>>>>>>>>> URL http://www.net8.co.jp
>>>>>>>>> ------------------------------------------
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> ------------------------------------------
>>>>>>>> Ono Keiji
>>>>>>>> [email protected]
>>>>>>>> 1-45-11 Mizue Edogawa Tokyo JP
>>>>>>>> TEL 03(3676)6599
>>>>>>>> URL http://www.net8.co.jp
>>>>>>>> ------------------------------------------
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> ------------------------------------------
>>>>>>> Ono Keiji
>>>>>>> [email protected]
>>>>>>> 1-45-11 Mizue Edogawa Tokyo JP
>>>>>>> TEL 03(3676)6599
>>>>>>> URL http://www.net8.co.jp
>>>>>>> ------------------------------------------
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> ------------------------------------------
>>>>>> Ono Keiji
>>>>>> [email protected]
>>>>>> 1-45-11 Mizue Edogawa Tokyo JP
>>>>>> TEL 03(3676)6599
>>>>>> URL http://www.net8.co.jp
>>>>>> ------------------------------------------
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>>> --
>>> ------------------------------------------
>>> Ono Keiji
>>> [email protected]
>>> 1-45-11 Mizue Edogawa Tokyo JP
>>> TEL 03(3676)6599
>>> URL http://www.net8.co.jp
>>> ------------------------------------------
>>>
>>>
>>>
>

Reply via email to