nitrogen

Where does Nitrogen get the best performance - yaws, mochiweb, or inets?

The Nitrogen project web page declares equal support for yaws, mochiweb, and inets, but with which of these web servers is it going to perform the best? I.e. for a large scale application with mostly dynamic content with nitrogen + a web server which combination will be able to handle the most user load? ...

What is the correct usage of the Nitrogen Auth API?

Just wanting to confirm the usage of the Nitrogen Authentication and Authorization API. The description of the API is: wf:user() -> User or 'undefined' Return the user value that was previously set by wf:user(User) wf:user(User) -> ok Set the user for the current session. wf:clear_user() -> ok Same as wf:user(undefined). wf:role(Role...

How do you unwire an action in Nitrogen?

In Nitrogen, the Erlang web framework, you wire actions like this: wf:wire(send_message, #event { type=click, postback=send_message }) but if after that you run wf:wire(send_message, #event { type=click, postback=send_message2 }), then you get the action wired twice. How do you unwire the previous action or all actions of an eleme...

Are events always run in the same process in Nitrogen?

I'm taking about event function in Nitrogen, the Erlang web framework, in a web module that is run when you get a postback. Does event always run in the same process for the same web client (that is, browser window or frame). I've recall at least one case in which that didn't happen, but I can't reproduce it. ...

How to keep track of a process per browser window and access it at each event in Nitrogen?

In Nitrogen, the Erlang web framework, I have the following problem. I have a process that takes care of sending and receiving messages to another process that acts as a hub. This process acts as the comet process to receive the messages and update the page. The problem is that when the user process a button I get a call to event. How d...

Two quick consecutive calls to wf:insert_bottom end up in the reverse order

Using Nitrogen, the Erlang web framework, I have the following method that receives messages and adds them to the bottom of an html element: receive_messages() -> receive Message -> io:format("~p received ~p", [self(), Message]), wf:insert_bottom(messages, [#p{}, #span { text=io_lib:format("~p", [Message]) }]) end, ...

Unflash a message with Nitrogen

I have a login page for my Nitrogen based web app. If user authentication fails I wf:flash a message to the user to let them know. However if the user continues to supply bad credentials these flash message keep building up. Is there a way to first clear the flashed messages before posting a new one? ...

How do I get pages like src/pages/myrootpage.erl to show up at http://mysite.org/myrootpage using nitrogen?

Nitrogen does not seem to like pages being at the root url path, only addon paths like /web/ is there some way to get pages to show up at the root url like /mypage ? ...

How to get Peer IP Address in Nitrogen

Is is there a built in function in nitrogen framework to get Peer IP address? If not, is there a way to get the IP address of peer which is making to request to Nitrogen App ...

Nitrogen: changing targetID breaks lightbox

I'm using Nitrogen & lightbox. I'm looking for some guidance after spending way too long trying to understand why a working example breaks as soon as I change the targetID of a lightbox. The fragment below works if I use "name_dialog" or "share_dialog", but not if I use "compose_dialog". I've looked through the source and style sheets,...

Couchdb and Nitrogen

How to add Key/value pairs to existing couchdb document through nitrogen web framework? ecouch:doc_update(DBName,DocId,DocValue) is not returning true when I was trying to implement. ...

What is your experience with Nitrogen on Erlang?

I've been checking out the Nitrogen Project which is supposed to be the most mature web development framework for Erlang. Erlang, as a language, is extremely impressive. However, with regards to Nitrogen, what I am not too keen about is using Erlang's rather uncommon syntax (unless you're native in PROLOG) to build UIs. What is your ex...

How to connect Nitrogen with Couchdb using Ecouch

I don't understand how to make a connection with nitrogen and couchdb using ecouch, because I have a error on this connection CAUGHT ERROR: error-undef [{ecouch,db_info,["test_suite_db"]} I put ecouch in my erlang library path and I create a symlink to support/include.mk (even I don't know if it has necessary). Or if anyone know a dat...