O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Limitations of filesystem-based template rendering 

When it comes to sharing template rendering responsibilities with the client, there are certain limitations in the template rendering workflow that we need to acknowledge. First, and foremost, template files are defined on the web server.

Let's consider an example that follows the classic web application architecture to fully understand the limitations we face. Here's an example of server-side template rendering using a template file, edit.html, taken from the Writing Web Applications article (https://golang.org/doc/articles/wiki/) from the Go website:

func editHandler(w http.ResponseWriter, r *http.Request) {  title := r.URL.Path[len("/edit/"):]  p, err := loadPage(title) if err != nil { ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required