Permalink
Browse files

Finalize link to blogpost

  • Loading branch information...
1 parent 68f4176 commit a66a3f6c803d11982a49f69fca041760e3913aa5 @sandermak committed Nov 20, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 README.md
View
8 README.md
@@ -1,7 +1,7 @@
Embedding JSON with server-side rendering
=========================================
-This repository illustrates a technique outlined in the blog post ['blog title'](http://branchandbound.net/blog/). In short, it shows how you can have both a nice user experience (ie. no Ajax callback to wait for on after the initial render, Ajax requests for subsequent clicks in the page) without having to duplicate your rendering logic in both the server and the client. The trick is to embed the JSON of the initial data in your (server rendered) HTML. You can then use this embedded JSON in your client-side templating solution for the initial render, without an additional network-roundtrip.
+This repository illustrates a technique outlined in the blog post ['Unify client-side and server-side rendering by embedding JSON'](http://branchandbound.net/blog/web/2012/11/unify-server-side-client-side-rendering-embedding-json/?src=github). In short, it shows how you can have both a nice user experience (ie. no AJAX callback to wait for on after the initial render, but with AJAX requests for subsequent clicks in the page) without having to duplicate your rendering logic in both the server and the client. The trick is to embed the JSON of the initial data in your (server rendered) HTML. You can then use this embedded JSON in your client-side templating solution for the initial render, without an additional network-roundtrip.
There are three situations to try out:
@@ -17,14 +17,14 @@ By switching between these branches you can quickly compare the approaches and h
Running the examples
--------------------
-The examples are all based on a simple Spring MVC application template, using JSP for server-side rendering and JQuery for client-side work. You can build and run the examples using maven. Start them by executing:
+The examples are all in Java, based on a simple Spring MVC application template. It uses JSP for server-side rendering and JQuery for client-side work. You can build and run the examples using maven. Start them by executing:
git checkout <branch-to-run>
mvn tomcat7:run
After this, the application is available at http://localhost:8080/embedded-json-example/
-Don't forget to restart Tomcat after switching branches, or the changes in the Java code won't be picked up! Use the developer console of your browser to see what happens. Note that I added a 400ms delay in the Ajax calls, to simulate a high-latency situation. The higher the latency, the more pronounced the difference is between the initial render of the master branch and the client-side-only branch.
+Don't forget to restart Tomcat after switching branches, or the changes in the Java code won't be picked up! Use the developer console of your browser to see what happens. Note that I added a 400ms delay in the AJAX calls, to simulate a high-latency situation. The higher the latency, the more pronounced the difference is between the initial render of the master branch and the client-side-only branch.
-More detailed motivation for this trick can be found at http://branchandbound.net/blog/
+More detailed motivation for this trick can be found at http://branchandbound.net/blog/web/2012/11/unify-server-side-client-side-rendering-embedding-json/?src=github

0 comments on commit a66a3f6

Please sign in to comment.