Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an Erlang module that supports AJAX? [closed]

Tags:

ajax

erlang

I would like to create a server an Erlang capable of receiving and sending AJAX messages. Is there a module that provides this functionality?

like image 257
Xavier Avatar asked Dec 17 '22 12:12

Xavier


1 Answers

Well, i would not call it a module, perhaps a "library" would be a better description. check out these: Mochiweb, Webmachine and Nitrogen -- the master of Event Driven Web Apps.

What you need is RESTFUL services in Erlang. You want to be able to initiate HTTP GET or POST requests from your Ajax, say with JSON encoded Data and you expect to get back JSON encoded responses. Mochiweb has a good JSON parser and its Light Weight. The heavy duty Web server called Yaws is very capable of doing what you want. There is a good tutorial about RESTFUL services with Yaws. The most wonderful thing about all these is that you can use all or several of them together in the same web App (but you need some experience to do so, it aint very obvious for starters!)

However, you will need to get a grip of Erlang Concepts of doing things and you will then find all these frameworks very easy. These are not the only ones you can look into, there is ErlyWeb, Erlang Web and so many upcoming libraries.

Am sure you will find any one of these useful.

like image 199
Muzaaya Joshua Avatar answered Dec 23 '22 07:12

Muzaaya Joshua