[Haskell-cafe] Need advice: Haskell in Web Client

2012-01-30 Thread dokondr
**Bardur Arantsson wrote:
On 01/26/2012 11:16 AM, dokondr wrote:
 Ideally, I would be happy to be able to write in Haskell a complete
 front-end / GUI, so it could be compiled to different back-ends:
Javascript
 to run in the Browser and also a standalone app.
 In Python world this is already done with Pyjamas (http://pyjs.org/) -
a
 Rich Internet Application (RIA) Development Platform for both Web
and
 Desktop.
 Also from Pyjamas site:
 Pyjamas ... contains a Python-to-Javascript compiler, an AJAX
framework
 and a Widget Set
API.

 Pyjamas Desktop is the Desktop version of
Pyjamas
 Pyjamas Desktop allows the exact same python web application source code
to
 be executed as a standalone desktop application (running under
Python)
 instead of being stuck in a Web browser.

 Architecture diagram
 http://pyjs.org/wiki/pyjamasandpyjamasdesktop/

 I wonder if somebody works on similar Haskell Rich Internet
Application
 (RIA) Development Platform ?
 Any ideas, comments on implementation of such system in Haskell? What
 existing Haskell GUI libraries can be used for a desktop GUI, etc.?


Well, it's basically just proof-of-concept at the moment, and it's not
really usable for real applications at the moment, but there is

http://hackage.haskell.org/package/dingo-core-0.1.0
http://hackage.haskell.org/package/dingo-widgets-0.1.0
http://hackage.haskell.org/package/dingo-example-0.1.0

The basic client-server communication, server-side state handling,
etc. is there, but it's missing a couple of things before it could be
used for real apps: There's no real security, and there are *very* few
widgets. The few widgets that exist at the moment are also probably
lacking a few operations. On the plus side, it's should be pretty easy
to create new widgets.

You can get a feel for how the thing looks from an application
programmer's perspective by looking at the source for the example.

Looks neat, thanks!
If I got this write, in dingo all web page content is created by running
Haskell on the server side in run-time and then sending generated html + js
to the client (browser).
I am looking for the opposite - when client does more work running
Javascript generated by Haskell in advance, the approach that Pyjamas use (
http://pyjs.org/) with Python to Javascript compilation.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Need advice: Haskell in Web Client

2012-01-26 Thread dokondr
On Thu, Jan 19, 2012 at 1:37 AM, Dag Odenhall dag.odenh...@gmail.comwrote:


 On Tue, 2012-01-17 at 22:05 +0300, dokondr wrote:
 
  I prefer using Turing complete PL to program web client, like the one
 used
  in GWT (Java) or Cappuccino  (Objective-J). http://cappuccino.org/learn/
  In this case you /almost/ don't need to know  HTML, CSS, DOM, Ajax, etc.
 to
  develop WebUI and good PL lets you concentrate on problem domain instead
 of
  bothering about browser support.
  It is a real pity that Haskell still has no such tools to generate Web
 GUI
  in Javascript. (((

 Have you seen Chris Done's posts on the subject?

 http://chrisdone.com/tags/javascript.html


Thanks for the link! (Never seen this before)
Ideally, I would be happy to be able to write in Haskell a complete
front-end / GUI, so it could be compiled to different back-ends: Javascript
to run in the Browser and also a standalone app.
In Python world this is already done with Pyjamas (http://pyjs.org/) - a
Rich Internet Application (RIA) Development Platform for both Web and
Desktop.
Also from Pyjamas site:
Pyjamas ... contains a Python-to-Javascript compiler, an AJAX framework
and a Widget Set API.
Pyjamas Desktop is the Desktop version of Pyjamas
Pyjamas Desktop allows the exact same python web application source code to
be executed as a standalone desktop application (running under Python)
instead of being stuck in a Web browser.

Architecture diagram
http://pyjs.org/wiki/pyjamasandpyjamasdesktop/

I wonder if somebody works on similar Haskell Rich Internet Application
(RIA) Development Platform ?
Any ideas, comments on implementation of such system in Haskell? What
existing Haskell GUI libraries can be used for a desktop GUI, etc.?

Thanks!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Need advice: Haskell in Web Client

2012-01-26 Thread Bardur Arantsson

On 01/26/2012 11:16 AM, dokondr wrote:

On Thu, Jan 19, 2012 at 1:37 AM, Dag Odenhalldag.odenh...@gmail.comwrote:



On Tue, 2012-01-17 at 22:05 +0300, dokondr wrote:


I prefer using Turing complete PL to program web client, like the one

used

in GWT (Java) or Cappuccino  (Objective-J). http://cappuccino.org/learn/
In this case you /almost/ don't need to know  HTML, CSS, DOM, Ajax, etc.

to

develop WebUI and good PL lets you concentrate on problem domain instead

of

bothering about browser support.
It is a real pity that Haskell still has no such tools to generate Web

GUI

in Javascript. (((


Have you seen Chris Done's posts on the subject?

http://chrisdone.com/tags/javascript.html



Thanks for the link! (Never seen this before)
Ideally, I would be happy to be able to write in Haskell a complete
front-end / GUI, so it could be compiled to different back-ends: Javascript
to run in the Browser and also a standalone app.
In Python world this is already done with Pyjamas (http://pyjs.org/) - a
Rich Internet Application (RIA) Development Platform for both Web and
Desktop.
Also from Pyjamas site:
Pyjamas ... contains a Python-to-Javascript compiler, an AJAX framework
and a Widget Set API.
Pyjamas Desktop is the Desktop version of Pyjamas
Pyjamas Desktop allows the exact same python web application source code to
be executed as a standalone desktop application (running under Python)
instead of being stuck in a Web browser.

Architecture diagram
http://pyjs.org/wiki/pyjamasandpyjamasdesktop/

I wonder if somebody works on similar Haskell Rich Internet Application
(RIA) Development Platform ?
Any ideas, comments on implementation of such system in Haskell? What
existing Haskell GUI libraries can be used for a desktop GUI, etc.?



Well, it's basically just proof-of-concept at the moment, and it's not 
really usable for real applications at the moment, but there is


   http://hackage.haskell.org/package/dingo-core-0.1.0
   http://hackage.haskell.org/package/dingo-widgets-0.1.0
   http://hackage.haskell.org/package/dingo-example-0.1.0

The basic client-server communication, server-side state handling, 
etc. is there, but it's missing a couple of things before it could be 
used for real apps: There's no real security, and there are *very* few 
widgets. The few widgets that exist at the moment are also probably 
lacking a few operations. On the plus side, it's should be pretty easy 
to create new widgets.


You can get a feel for how the thing looks from an application 
programmer's perspective by looking at the source for the example.



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Need advice: Haskell in Web Client

2012-01-18 Thread dokondr
On Wed, Jan 18, 2012 at 10:47 AM, John Lenz l...@math.uic.edu wrote:



 I don't see a great need of developing something like GWT for haskell,
 since we already have good support for all sorts of existing tools that
 span more than just haskell, like extjs, yui, and jqueryui.


Haskell makes my work doable in many areas where other PLs will take
enormous efforts and time to  achieve the same result.
It would be great if I could write Web client code in pure Haskell (no
HTML, no DOM, no Ajax, ..) compile it to Javascript and just run it in the
browser and do all GUI and backend communication work. Simple as that.

Regards,
Dmitri.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Need advice: Haskell in Web Client

2012-01-18 Thread Johannes Waldmann
dokondr dokondr at gmail.com writes:

 It would be great if I could write Web client code in pure Haskell [...]

not exactly Haskell, but you may want to have a look at OPA http://opalang.org/ 

the idea is that you write all of the application in one 
(statically typed, functional) language
and the framework takes care of distributing the code to server and client
(and on the client, it shows up as JavaScript)

J.W.



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Need advice: Haskell in Web Client

2012-01-18 Thread Dag Odenhall
On Tue, 2012-01-17 at 22:05 +0300, dokondr wrote:
 On Tue, Jan 17, 2012 at 6:42 PM, John Lenz l...@math.uic.edu wrote:
 
 
  HTML5 Canvas is great for charts.  If you go this route you might as well
  use a library which draws charts for you instead of writing all this code
  yourself.
 
  Personally, I use extjs version 4 which has some amazing charts, but there
  are other libraries out there.
 
  http://www.sencha.com/**products/extjs/examples/#**sample-3http://www.sencha.com/products/extjs/examples/#sample-3
 
  Essentially the server provides the data in JSON or XML some other format,
  and the extjs code draws the charts on the client side.
 
  If you go with extjs, then the server side I would suggest a small, simple
  yesod or snap server.   You could probably get the server under a hundred
  lines of code with yesod; see some of the examples in the yesod book.
   yesod or snap would serve JSON of the statistics on request, and also
  serve the javascript files which draw the charts.
 
 
 Yes, I was thinking about using Haskell to generate everything that
 specific Javascript library needs to display charts in browser. Naturally
 charts are to be displayed by this library itself. I also would like to
 have Haskell tools to generate Web GUI in Javascript.
 As for yesod, I am not sure that I like approach which mixes HTML with
 code, or even worse - creates a new weird HTML-like language like  'whamlet
 quasi-quotation', for example:
 
 !-- a href=@{Page1R}Go to page 1! --
 
 I prefer using Turing complete PL to program web client, like the one used
 in GWT (Java) or Cappuccino  (Objective-J). http://cappuccino.org/learn/
 In this case you /almost/ don't need to know  HTML, CSS, DOM, Ajax, etc. to
 develop WebUI and good PL lets you concentrate on problem domain instead of
 bothering about browser support.
 It is a real pity that Haskell still has no such tools to generate Web GUI
 in Javascript. (((

Have you seen Chris Done's posts on the subject?

http://chrisdone.com/tags/javascript.html



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Need advice: Haskell in Web Client

2012-01-17 Thread dokondr
Hi all,
I hope to use Haskell for graphics (charts) programming in Web client.

My current implementation in brief:
Server side, Haskell modules:
1) collecting various statistics from Twitter
2) generating text data for Gnuplot (http://www.gnuplot.info/)
3) Gnuplot creates png files with charts

Web client:
GWT (Google Web Toolkit) web UI that allows user to enter queries and see
resulting charts  in Web browser. Charts are png files generated by Gnuplot
on the server side.

Ideally, on the server side  instead of using Gnuplot I would like Haskell
to generate Javascript to be downloaded to Web client and draw charts in
the browser. Something, very approximately, similar to what GWT does :)
This code will be specific of course to plotting Javascript framework, no
problem.
Looking at Haskell in web browser - HaskellWiki:
http://www.haskell.org/haskellwiki/Haskell_in_web_browser#Haskell_web_toolkit
I feel a little confused about current state of the available Haskell tools
for this task.
Any ideas?

Thanks!
Dmitri
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Need advice: Haskell in Web Client

2012-01-17 Thread C K Kashyap
On Tue, Jan 17, 2012 at 4:19 PM, dokondr doko...@gmail.com wrote:

 Hi all,
 I hope to use Haskell for graphics (charts) programming in Web client.

 My current implementation in brief:
 Server side, Haskell modules:
 1) collecting various statistics from Twitter
 2) generating text data for Gnuplot (http://www.gnuplot.info/)
 3) Gnuplot creates png files with charts

 Web client:
 GWT (Google Web Toolkit) web UI that allows user to enter queries and see
 resulting charts  in Web browser. Charts are png files generated by Gnuplot
 on the server side.

 Ideally, on the server side  instead of using Gnuplot I would like Haskell
 to generate Javascript to be downloaded to Web client and draw charts in
 the browser. Something, very approximately, similar to what GWT does :)
 This code will be specific of course to plotting Javascript framework, no
 problem.
 Looking at Haskell in web browser - HaskellWiki:

 http://www.haskell.org/haskellwiki/Haskell_in_web_browser#Haskell_web_toolkit
 I feel a little confused about current state of the available Haskell
 tools for this task.
 Any ideas?

 Hi Dimitri,
Perhaps HTML5's canvas element would meet your requirement. There a few JS
chart implementation for HTML5 floating on the internet.
Regards,
Kashap
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Need advice: Haskell in Web Client

2012-01-17 Thread Rogan Creswick
On Tue, Jan 17, 2012 at 3:07 AM, C K Kashyap ckkash...@gmail.com wrote:

 Perhaps HTML5's canvas element would meet your requirement. There a few JS
 chart implementation for HTML5 floating on the internet.

The Google Charting API *might* be sufficient:

http://code.google.com/apis/chart/

--Rogan

 Regards,
 Kashap

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Need advice: Haskell in Web Client

2012-01-17 Thread dokondr
On Tue, Jan 17, 2012 at 6:42 PM, John Lenz l...@math.uic.edu wrote:


 HTML5 Canvas is great for charts.  If you go this route you might as well
 use a library which draws charts for you instead of writing all this code
 yourself.

 Personally, I use extjs version 4 which has some amazing charts, but there
 are other libraries out there.

 http://www.sencha.com/**products/extjs/examples/#**sample-3http://www.sencha.com/products/extjs/examples/#sample-3

 Essentially the server provides the data in JSON or XML some other format,
 and the extjs code draws the charts on the client side.

 If you go with extjs, then the server side I would suggest a small, simple
 yesod or snap server.   You could probably get the server under a hundred
 lines of code with yesod; see some of the examples in the yesod book.
  yesod or snap would serve JSON of the statistics on request, and also
 serve the javascript files which draw the charts.


Yes, I was thinking about using Haskell to generate everything that
specific Javascript library needs to display charts in browser. Naturally
charts are to be displayed by this library itself. I also would like to
have Haskell tools to generate Web GUI in Javascript.
As for yesod, I am not sure that I like approach which mixes HTML with
code, or even worse - creates a new weird HTML-like language like  'whamlet
quasi-quotation', for example:

!-- a href=@{Page1R}Go to page 1! --

I prefer using Turing complete PL to program web client, like the one used
in GWT (Java) or Cappuccino  (Objective-J). http://cappuccino.org/learn/
In this case you /almost/ don't need to know  HTML, CSS, DOM, Ajax, etc. to
develop WebUI and good PL lets you concentrate on problem domain instead of
bothering about browser support.
It is a real pity that Haskell still has no such tools to generate Web GUI
in Javascript. (((
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe