Why pylons and genshi. It seems that mako would be a better choice because we, young pylonists, are using mako since we joined pylons community. We learned it and for us (me), it was an awesome templating language. Right in Python simplicity and strength. For us (me), genshi is and old-time templating language, even if it was a good one.
No misleading, i'm not 20 but 63 old.
What do i mean is that it would be more convenient for us (me) to use mako to customize the layouts and so on, in order to build our sites as we want.
Meanwhile, your work is a mischievious one.
Thanks for all.
Pylons and not Mako
4 posts Started 13 years ago by michka Latest reply from Nathan Wright
-
-
Oh, I'm so sorry for the mistake in my latest post.
"your work is a mischievious one" oh no !
I wanted to say "your work is a MARVELOUS one"
Sorry again -
It's a fair question as to why we use Genshi instead of Mako. Basically we learned Genshi first as it was part of TurboGears which is what MediaCore was originally built on. Migrating to Mako at this point would be painful (although it would definitely help with page load times). We do like Genshi for the simple fact that it checks to make sure everything on the page is valid xml - but we recognize there are constraints here that not everyone would like. You are more than welcome to write a mako port for MediaCore :)
This is an issue we are aware of as we are looking to optimize MediaCore for performance, there's a good blog post here on the comparison of the two in terms of speed:
http://chrismoos.com/2008/01/27/genshi-vs-mako/There is a genshi compiler we've seen, that would speed things up, but we haven't had the need to implement it yet:
http://pypi.python.org/pypi/Chameleon -
Genshi is slow, its true, but it's also extremely powerful! The templates are true XML,, instead of just glorified plain text. Once you start to get comfortable you'll find you'll be able to do a lot more with it than you could with Mako. With the release of our plugin architecture in v0.9, that flexibility will hopefully pay off for plugin authors, who will be able to modify the output of the page in any way they want.
Unfortunately chameleon.genshi is still pretty barebones, and wouldn't work for us at this time. I'm not sure there has been any development on it lately either.
More promising is kajiki (aka fastpt) which is very similar to Genshi, but it compiles to python byte code, so its speeds are roughly the same as Mako. We'd lose a lot of the power of match templates and would have to adopt a layout system similar to that of Mako, but it may be worth it for the performance. It's still in alpha, but appears to be actively developed, so if it keeps progressing we'll consider using it down the road.
So long story short we use Genshi because it's frickin sweet, and so far performance hasn't been an issue. When it does become an issue we'll look at switching, but for now we're going to focus on improving the platform itself!
Reply
You must log in to post.