Re: [Erlangweb-users] Dynamic Yaws Pages
Brought to you by:
etcerlangweb,
paulgray
|
From: L. S. <lse...@gm...> - 2009-12-02 17:55:00
|
My mistake. I meant to post to the Yaws list.
I don't want to mix Erlang code and HTML; I intend to use an MVC
architecture. I am trying to test the existing ways to generate
dynamic web content using Erlang. Dynamic pages is one of those
solutions.
Although ErlyWeb is a solution, and it seems to works for others, the
tutorials are not written properly enough to allow someone without
prior knowledge of ErlyWeb to create working examples.
So I'm looking at dynamic pages, appmods, and yaws apps in Yaws.
On 12/1/09, Michal Ptaszek <mic...@er...> wrote:
> Hi,
>
> ----- "L. S." <lse...@gm...> wrote:
>
>> The documentation is like a puzzle with missing pieces.
>>
>> How would the following Yaws snippet example be called in a .yaws
>> file:
>> <erl module=foobar>
>> out(A) ->
>> io:format('This is the foobar module', []).
>> func() ->
>> i_am_exported_from_foobar.
>> </erl>
>>
>
> Erlang Web does not support Yaws' dynamic pages.
> If you would like to move some logic into templates use
> one of the template languages supported (XHTML-based wpart or
> ErlyDTL).
>
> Separating logic from view is a pretty good idea: why do you
> need to put some Erlang code into HTML file?
>
> Best regards,
> --
> Michal Ptaszek
> www.erlang-consulting.com
>
|