On Dec 27, 2006, at 6:39 PM, Shannon -jj Behrens wrote:


On 12/21/06, Jamie <[EMAIL PROTECTED]> wrote:
I'm new to Python and even newer to the Python frameworks, but I'm an
old hack at web development. I've been evaluating the various
frameworks and was struck my how different Myghty is compared to Kid,
Django's template system, or even PHP's Smarty.

Unless I'm misunderstanding something, there doesn't seem to be a way
to make a Myghty template without embedding Python? The "<%" syntax
reminds way too much like the spaghetti code I'd expect to see in a
.php file. Why is Myghty considered a templating framework when the
logic is unavoidably intermixed with the presentation?

+1 for Genshi!!!


genshi mixes python code in templates too...in expressions, the argument declarations of py:def, and if it implements the <python> tag yet, dont know if thats there though.

one thing to keep in mind with python is, its *python*. its not C++ or assembly code we're putting in templates here...python is a high level scripting language, therefore entirely appropriate for...scripting ! such as in a template. its not like youre going to have to use malloc() and free() to manage memory, or segfault your application with it or something. I much prefer real Python constructs to a template language that completely reinvents the wheel with its own "directives" that just do the same thing (but of course are subtly different and therefore require re-learning of a whole new language).

also, PHP incurs spaghetti code because of PHP's essentially broken language, its lack of any kind of explicit "controller" layer (at least one that anyone is generally familiar with) and its extremely low barrier to entry which invites people with little or no experience in programming to produce huge monstrosities. if you look amongst the landscape of JSP pages, which also embed Java directly in a way even closer to straight Java code than Myghty does to Python, you can find entire universes of non-spaghetti code (even though spaghetti is certainly possible). Just emphasizing controller frameworks like Struts goes an enormous way towards coercing apps to be better designed.

With PHP and JSP accounting for probably 90% of dynamic websites in the world right now, I hardly think Myghty's choices are fringe.

anyway, as some of you know, Mako is extremely close to release. While it also embeds Python, its a whole lot cleaner in design and syntax than Myghty anyway.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to