ANNOUNCE: haste-perch

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

ANNOUNCE: haste-perch

Alberto G. Corona
Hi,

haste-perch defines builder elements (perchs) for Haste.DOM elements that are appendable, so that dynamic HTML can be created in the client in a natural way, like textual HTML, but programmatically and with the advantage of static type checking. It can be ported to other haskell-js compilers.

http://hackage.haskell.org/package/haste-perch

This program, when compiled with haste:

  main= do
   withElem "idelem" $   build $ do
   div $ do
     div $ do
           p "hello"
           p ! atr "style" "color:red" $   "world"

   return ()

Creates these element:

   <div id= "idelem">  <-- was already in the HTML
       <div>
         <div>
            <p> hello </p>
            <p style= "color:red"> world </p>
         </div>
       </div>
   </div>

Since the creation is in the browser, that permit quite dynamic pages for data
presentation, and interctive textual (a.k.a "serious") applications and, in general
the development of client-side web frameworks using haskell with the haste compiler.
 

See the README in the git repository:

https://github.com/agocorona/haste-perch

--
Alberto.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: [Haskell] ANNOUNCE: haste-perch

Andrew Gibiansky
Could you elaborate on how this is better/different from blaze-html?

I'm a bit confused - is it just the same thing but works with Haste, while blaze-html doesn't? What's the main idea?

Thanks!
Andrew


On Wed, Jun 18, 2014 at 7:02 AM, Alberto G. Corona <[hidden email]> wrote:
Hi,

haste-perch defines builder elements (perchs) for Haste.DOM elements that are appendable, so that dynamic HTML can be created in the client in a natural way, like textual HTML, but programmatically and with the advantage of static type checking. It can be ported to other haskell-js compilers.

http://hackage.haskell.org/package/haste-perch

This program, when compiled with haste:

  main= do
   withElem "idelem" $   build $ do
   div $ do
     div $ do
           p "hello"
           p ! atr "style" "color:red" $   "world"

   return ()

Creates these element:

   <div id= "idelem">  <-- was already in the HTML
       <div>
         <div>
            <p> hello </p>
            <p style= "color:red"> world </p>
         </div>
       </div>
   </div>

Since the creation is in the browser, that permit quite dynamic pages for data
presentation, and interctive textual (a.k.a "serious") applications and, in general
the development of client-side web frameworks using haskell with the haste compiler.
 

See the README in the git repository:

https://github.com/agocorona/haste-perch

--
Alberto.

_______________________________________________
Haskell mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell



_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: [Haskell] ANNOUNCE: haste-perch

Mats Rauhala
I don't know the implementation, but as far as I know, creating html
with javascript dom api is faster than creating textual html and then
using that. And also if blaze-html uses text (or bytestring?), it is not
compilable with haste

On Wed, Jun 18, 2014 at 09:11:20AM -0700, Andrew Gibiansky wrote:

> Could you elaborate on how this is better/different from blaze-html?
>
> I'm a bit confused - is it just the same thing but works with Haste, while
> blaze-html doesn't? What's the main idea?
>
> Thanks!
> Andrew
>
>
> On Wed, Jun 18, 2014 at 7:02 AM, Alberto G. Corona <[hidden email]>
> wrote:
>
> > Hi,
> >
> > haste-perch defines builder elements (perchs) for Haste.DOM elements that
> > are appendable, so that dynamic HTML can be created in the client in a
> > natural way, like textual HTML, but programmatically and with the advantage
> > of static type checking. It can be ported to other haskell-js compilers.
> >
> > http://hackage.haskell.org/package/haste-perch
> >
> > This program, when compiled with haste:
> >
> >   main= do
> >    withElem "idelem" $   build $ do
> >    div $ do
> >      div $ do
> >            p "hello"
> >            p ! atr "style" "color:red" $   "world"
> >
> >    return ()
> >
> > Creates these element:
> >
> >    <div id= "idelem">  <-- was already in the HTML
> >        <div>
> >          <div>
> >             <p> hello </p>
> >             <p style= "color:red"> world </p>
> >          </div>
> >        </div>
> >    </div>
> >
> > Since the creation is in the browser, that permit quite dynamic pages for
> > data
> > presentation, and interctive textual (a.k.a "serious") applications and,
> > in general
> > the development of client-side web frameworks using haskell with the haste
> > compiler.
> >
> >
> > See the README in the git repository:
> >
> > https://github.com/agocorona/haste-perch
> >
> > --
> > Alberto.
> >
> > _______________________________________________
> > Haskell mailing list
> > [hidden email]
> > http://www.haskell.org/mailman/listinfo/haskell
> >
> >

> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe


--
Mats Rauhala
MasseR

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Haskell] ANNOUNCE: haste-perch

Alberto G. Corona
In reply to this post by Andrew Gibiansky
The syntax is similar to blaze-html, but haste-perch  uses the HTM-DOM in the browser to create DOM elements. blaze-html creates a html bytestring in the server that the browser must load.

It uses Haste.DOM


Haste.DOM has primitives that invoke Javascript functions in browser like: For example newElem invoke  "createElement" in javascript 

Perch assemble a sequence of DOM calls that create the HTML tree directly in the browser. so you can create an application that run fully in the browser 

The tree can change depeding on different actions done by the user by changing the HTML tree dynamically. It is possible to create dynamic applications. 




2014-06-18 18:11 GMT+02:00 Andrew Gibiansky <[hidden email]>:
Could you elaborate on how this is better/different from blaze-html?

I'm a bit confused - is it just the same thing but works with Haste, while blaze-html doesn't? What's the main idea?

Thanks!
Andrew


On Wed, Jun 18, 2014 at 7:02 AM, Alberto G. Corona <[hidden email]> wrote:
Hi,

haste-perch defines builder elements (perchs) for Haste.DOM elements that are appendable, so that dynamic HTML can be created in the client in a natural way, like textual HTML, but programmatically and with the advantage of static type checking. It can be ported to other haskell-js compilers.

http://hackage.haskell.org/package/haste-perch

This program, when compiled with haste:

  main= do
   withElem "idelem" $   build $ do
   div $ do
     div $ do
           p "hello"
           p ! atr "style" "color:red" $   "world"

   return ()

Creates these element:

   <div id= "idelem">  <-- was already in the HTML
       <div>
         <div>
            <p> hello </p>
            <p style= "color:red"> world </p>
         </div>
       </div>
   </div>

Since the creation is in the browser, that permit quite dynamic pages for data
presentation, and interctive textual (a.k.a "serious") applications and, in general
the development of client-side web frameworks using haskell with the haste compiler.
 

See the README in the git repository:

https://github.com/agocorona/haste-perch

--
Alberto.

_______________________________________________
Haskell mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell





--
Alberto.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: [Haskell] ANNOUNCE: haste-perch

Alberto G. Corona


2014-06-18 19:20 GMT+02:00 Alberto G. Corona <[hidden email]>:
The syntax is similar to blaze-html, but haste-perch  uses the HTM-DOM in the browser to create DOM elements. blaze-html creates a html bytestring in the server that the browser must load.

It uses Haste.DOM


Haste.DOM has primitives that invoke Javascript functions in browser like: For example newElem invoke  "createElement" in javascript 

Perch assemble a sequence of DOM calls that create the HTML tree directly in the browser. so you can create an application that run fully in the browser 

The tree can change depeding on different actions done by the user by changing the HTML tree dynamically. It is possible to create dynamic applications. 




2014-06-18 18:11 GMT+02:00 Andrew Gibiansky <[hidden email]>:

Could you elaborate on how this is better/different from blaze-html?

I'm a bit confused - is it just the same thing but works with Haste, while blaze-html doesn't? What's the main idea?

Thanks!
Andrew


On Wed, Jun 18, 2014 at 7:02 AM, Alberto G. Corona <[hidden email]> wrote:
Hi,

haste-perch defines builder elements (perchs) for Haste.DOM elements that are appendable, so that dynamic HTML can be created in the client in a natural way, like textual HTML, but programmatically and with the advantage of static type checking. It can be ported to other haskell-js compilers.

http://hackage.haskell.org/package/haste-perch

This program, when compiled with haste:

  main= do
   withElem "idelem" $   build $ do
   div $ do
     div $ do
           p "hello"
           p ! atr "style" "color:red" $   "world"

   return ()

Creates these element:

   <div id= "idelem">  <-- was already in the HTML
       <div>
         <div>
            <p> hello </p>
            <p style= "color:red"> world </p>
         </div>
       </div>
   </div>

Since the creation is in the browser, that permit quite dynamic pages for data
presentation, and interctive textual (a.k.a "serious") applications and, in general
the development of client-side web frameworks using haskell with the haste compiler.
 

See the README in the git repository:

https://github.com/agocorona/haste-perch

--
Alberto.

_______________________________________________
Haskell mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell





--
Alberto.



--
Alberto.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe