Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Weby Templates: http://www.jperla.com/blog/post/weby-templates-are-easier-fa...

Weby Templates are used in production on websites that have garnered over 500,000 uniques a month. They are incredibly easy to work with. They are the "templates for lazy people". They have 3 main benefits:

* easier * faster * more flexible

* The main codebase is implemented in 100 source lines of code.

* Extensive libraries only add just a couple hundred other lines of code.

* It is simple.

* It ensures that all tags have closing tags.

* It is compiled and fast.

* It is unicode compliant and safe.

* You can be fully fluent within 5 minutes since it is just Python and a transparent library.

http://www.jperla.com/blog/post/weby-templates-are-easier-fa...



I am confused how these are "faster" than other templating languages, such as Mako. Don't all of the better templating languages "compile to bytecode"? It would seem that the large number of function calls that would be involved per tag would massively decrease the performance vs. something that was able to treat most of the content as opaque.


Thanks, I didn't find that when searching. Very similar idea, but a slightly more involved syntax. I see it uses string building rather than a lib like lxml which probably makes it faster.


This was the thread that I needed: http://hackerne.ws/item?id=1605909


Yea, my early iterations a few years ago looked more like your library does today. I learned a lot about building good APIs through experimentation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: