[erlang-questions] Thoughts on EHE - the PHP killer

Tim Watson watson.timothy@REDACTED
Sun Feb 19 01:08:53 CET 2012


On 18 February 2012 15:30, Ulf Wiger <ulf@REDACTED> wrote:
>
> On 18 Feb 2012, at 16:13, Joe Armstrong wrote:
>
> I was thinking about this: In theory having a watertight
> barrier between logic and presentation seems like
> a good idea - but is it?
>
>
> To quote Yogi Berra (or Einstein, or van de Snepscheut):
>
> "In theory there is no difference between theory and practice. In practice
> there is."
>
> I've found that mixing Erlang into the Web design part drastically reduces
> the pickings when you need a professional web designer. The erlang community
> to-date hasn't attracted the kind of people who live to design beautiful
> HTML pages.
>
> The cousin of this train of though is the idea to put Node.js on the server.
> It makes perfect sense in one way: JavaScript is the one programming
> language a Web designer MUST be good at. Unfortunately, Node.js is a very
> bad server-side programming environment.
>
> Still, the question is how much that hurts you. PHP isn't a great language,
> but great websites have been built with it, mainly because enough great web
> designers make the effort to learn PHP.
>
> Of course, for a team of Erlang programmers, the fact that they may be poor
> web page designers to start with isn't exactly helped by the fact that they
> have to build their web pages in a programming language they don't master
> well. OTOH, they can be greatly helped by stealing good open source web
> designs from the web. Doing so should be easier with an enlive-style
> approach.
>
> Also, if you build a functional prototype, you can get away with a
> "developer-ugly" web UI, as long as you can hire a pro to make it beautiful
> later on. If you can stick to mainstream web design techniques as closely as
> possible, this step will be easier (or less impossible) to take.
>
> BR,
> Ulf W

Major +1 on this point. Joe, what is the difference between this:

<div>
    <?e Erlang... >
</div>

and this:

<div class="make_this_pretty"/>

plus maybe a bit of config like this:

{template, "mypage.html", mymod}

with a bit of this:

make_this_pretty(Dom, BoundData) -> ....

-----

Because that, fundamentally, gets you away from having a web page that
a designer will puke over, and still gets you the full power of Erlang
where you absolutely need it. Obviously if you generate a hell of a
lot of content in the Erlang code, then the designer needs to vet that
and make *it* pretty, by which time you might as well use a templating
language that supports dynamic includes (e.g., within a for-each
loop). This approach is used by a number of frameworks (both client
and server side), the first of which I came across was Apache Wicket.

Also, I'm not convinced that making things truly gorgeous is outside
of what's possible with the Django Templating Langauge which ErlyDTL
implements most of. There are some really beautiful sites out there
built with it, and it's all the easier for designers because there's
very few code constructs for them to 'learn' (or at least need to ask
about) and this works well in practise for a lot of people. If
anything, I think a Template View works quite nicely as a pattern.

>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list