I always wanted to make this clear when I first read the tutorial. If
1. use {! ... !}
2. use <script type="text/flapjax"> ... </script>
3. use JavaScript functions on events and behaviors without
On Fri, Oct 30, 2009 at 8:12 PM, Fred Janon <fja
...@gmail.com> wrote:
> Thanks Artyom for the quick answer. I will check the docs and browse around
> the archives as you suggested. Thanks for your help.
> Very exciting stuff.
> Fred
> On Fri, Oct 30, 2009 at 19:28, Artyom Shalkhakov
> <artyom.shalkha...@gmail.com> wrote:
>> Hello Fred,
>> 2009/10/30 Fred Janon <fja...@gmail.com>:
>> > The examples use the compiler, I guess.
>> Every example uses the flapjax.js, right. But it's possible and
>> absolutely okay to use it without the compiler.
>> > The paper refers to using the
>> > library without the compiler. so what do I need to use to an HTML page
>> > to use the library only and not anything that deals with the compiler?
>> > I am guessing just include the js library in the HTML head? Do I still
>> > need to use "text/flapjax" around my code or just "text/javascript"
>> > tags?
>> You should do something like the following:
>> <!DOCTYPE html>
>> <html>
>> <head>
>> <title>test page</title>
>> <script type="text/javascript" src="flapjax.js"></script>
>> <script type="text/javascript">
>> function loader() {
>> // your code goes here
>> }
>> </script>
>> <head>
>> <body onload="loader()">
>> <p>hello, world</p>
>> </body>
>> </html>
>> Go to www.flapjax-lang.org/docs/ and see if that makes any sense.
>> The language in which function contracts are written (e.g.,
>> EventStream 'a -> Behavior 'a) can seem tricky and unnecessary at
>> first, but you'll realize its usefulness eventually.
>> You can also browse the list archives, there are a few demos around.
>> > Would the HTML pages then work without any Web connection? Or
>> > does the library still calls home?
>> Flapjax is geared towards fat clients (i.e., applications that perform
>> most of their work client-side). But anyway, an answer to your
>> question very much depends on a specific application.
>> Cheers,
>> Artyom Shalkhakov.