[erlang-questions] Re: Process Dictionary vs Proplist in Web Frameworks

Max Lapshin max.lapshin@REDACTED
Fri Oct 30 06:39:04 CET 2009


Damn, I've programming Rails for many years and I really don't see any
reason to use global hash tables!
Explicitly passed data is very, very convenient and predictive way to
glue SEPARATED layers.

Using of PD in gen_server is its own internal way to live, I haven't
seen this PD outside and I'm not going
to think about it. But using PD to pass variables from controller
layer to view layer in erlang is a VERY, VERY bad
way of programming. It is a sufficient reason not to use such software
at all, because it is a sign of very bad quality of other code.

Explicit passing of data generated in controller, to view is:
a) clear to understand
b) clear to hook and modify, cache, etc.
c) testable
d) separatable (you may move templates from erlang to other application server)

PD is:
a) unclear, what is required and what is passed to template
b) unmodifieable and unhookable. Business logic migrates to templates
c) very, very hard to test


More information about the erlang-questions mailing list