[erlang-questions] Thoughts on EHE - the PHP killer
Steve Vinoski
vinoski@REDACTED
Sun Feb 19 04:39:18 CET 2012
On Sat, Feb 18, 2012 at 10:20 PM, Wes James <comptekki@REDACTED> wrote:
> On Sat, Feb 18, 2012 at 5:19 PM, Tim Watson <watson.timothy@REDACTED> wrote:
>> On 18 February 2012 20:05, Wes James <comptekki@REDACTED> wrote:
>>> On Sat, Feb 18, 2012 at 4:13 AM, Joe Armstrong <erlang@REDACTED> wrote:
>>>> Thoughts on EHE
>>>>
>>>> I'm playing with a little language for writing web applications.
>>>> It's called EHE. All it is HTML with embedded Erlang
>>>
>>> <snip>
>>>
>>>
>>> Isn't this what is in YAWS already?
>>>
>>> http://yaws.hyber.org/dynamic.yaws
>>>
>>
>> It kind of is isn't it, although I must admit I'm a bit confused by
>> the relationship between the erlang code and the surrounding HTML,
>> especially as none of the examples seems to have any html around them.
>> What's the difference between .yaws files and an appmod? The latter
>> 'feels' more natural to me, although clearly I don't really understand
>> how the former works.
>
> How I think of .yaws vs appmods:
>
> .yaws files are like .php files. You can have html content with
> erlang interspersed throughout the html with <erl> </erl>.
>
> appmods are erlang modules where in yaws.conf you can control the url
> paths that run the appmod web application
>
> more details on appmods here -> http://yaws.hyber.org/appmods.yaws
To paraphrase:
.yaws file: sprinkle a little Erlang into your HTML
appmod: sprinkle a little HTML/XML/JSON/whatever into your Erlang
An appmod is like a servlet, I suppose. It's code that handles
requests made to a configured portion of the server URI space (the
path can be "/" to handle all requests to that server), and can do
pretty much anything it needs to in order to fulfill each request.
In my own development work with yaws, I use appmods almost exclusively
because they're totally flexible.
--steve
More information about the erlang-questions
mailing list