Hacker News new | past | comments | ask | show | jobs | submit login

Good summary, I made xtemplate with many of these ideas in mind. For example:

- Uses html/template which escapes content by default. This was already useful; e.g. the author name field is supposed to be a plain string according to the rss spec, but the google blogs include <name><company><department> tags which were automatically escaped by html/template. It's also easy to input raw html if desired, which I do after sanitizing it with the `sanitizeHtml` func (which uses the bluemonday lib) when displaying article content.

- It improves on file-based routing, by yes rendering matching files, but also by allowing you to add templates anywhere to handle any kind of request by matching method and path parameters.

- By default errors abort the request, but you can use the `try` function to get access to an error (if any) and handle it in-template.

- You don't need shared memory if you can query the db in 0.1ms :)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: