Yaws API discussion

Eric Merritt cyberlync@REDACTED
Tue Jul 16 19:09:14 CEST 2002


See inline ->

--- Chris Pressey <cpressey@REDACTED> wrote:
 
> My two cents:
> 
> I agree that it is a Bad Thing<tm>, for the reason
> that interleaving
> different languages in the same source code file
> results a polyglot that
> is harder to understand and consequently harder to
> maintain.  In order to
> write a good 'active page' you need to write good
> HTML and good code, and
> few people specialize in both.

I agree with you here. Most people dont realize this,
or they dont agree with the supposition (I attribute
this to lack of experience in the domain).

> Even more unpopular opinion follows:
> 
> I don't see the big deal with yaws besides
> performance (which, as has been
> mentioned, it gets by "cheating" like mad.)  On
> sourceforge it is
> described as "small and beautiful" but I find it to
> be neither, at least
> in comparison to pico.  No offense meant to Klacke,
> but it's only as well
> designed as any project called "yet another foo"
> would be expected to be. 
> I feel it is trying to do too much.

 Well in defense of klacke, he achieved his design
goals. Which is more then I can say for many projects.
The resultof his efforts is exaclty what he wanted.

> So, I'm writing my own web server.  Mainly I'm doing
> so because of the
> usual Erlang-hacker excuse, that nothing available
> out there provides
> quite the right balance of features that I'm looking
> for (of course this
> is just to hide the fact that it's more fun to roll
> your own :)

  Not a bad idea.

> For the sake of elegant design I have consciously
> decided not to support
> documents consisting of interleaved Erlang and HTML
> in my project. 
> Instead, templates have fields which are filled out
> from values in a
> dictionary.
 
  As far as I am concerned this is the right choice.
But dont forget that you need to support lists as
well. Also are you going to go with the specialed
template language approach or the tag approach? If you
go with the tag approach I would suggest that you use
something other then <> as tag delimiters. Awhile back
I wrote a custom template engine for a client and made
use of [] for tag delimiters. It made the parser much
easier to write and the tags tended to stand out
pretty well against the html.

> While I do not suppose it will be able to compete
> with yaws in terms of
> sheer performance, that can always be added later,
> once driver-side
> http-header parsing is a documented feature...

Why not? go ahead and lift the code from yaws, thats
what open source is about. In this case, the
documentation is yaws itself. Also, if you compile
your templates to erlang you should get pretty close
to the performance of yaws. 

> -Chris


__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com



More information about the erlang-questions mailing list