Hello, thank you very much for your comments! I didn't know before about the term "SPA" (http://en.wikipedia.org/wiki/Single-page_application) I guess a sign of being too "Conservative" (-: !
I am trying to re-implement a swing app with clojure script. Before seeing Clojurescriptone I was only considering "clojurescript" for creating widgets like navigation trees or content tables or wizards. Now that you all pointed me to SPA I looked at some websites using this technic and can see and admire the smoothness factor. On the other hand my users won't mind waiting a second or two for new content on main "context switches". So maybe I can use a hybrid approach. I just am a little afraid of depending too much on cljs . Not because of the language but I still think that the server is so much more predictable than the browser. Many Thanx! John Am Samstag, 11. August 2012 00:43:09 UTC+2 schrieb Brenton: > > Hello John, > > ClojureScript One is an example of a single-page application. This means > that you get one page load from the > server and everything else happens in the browser without any further page > loads. The initial page that > is loaded is dynamically generated on the server. Any other updates to the > page are performed from JavaScript > by manipulating the DOM. > > If you are making requests to the server for every new page then it makes > sense to dynamically generate HTML > there. The whole point of a single-page application is to make the > application more responsive by reducing both the > number of requests and the amount of data that is transferred over a > network. > > Imbedding HTML templates in JavaScript means that those templates are only > transferred over the network once. > > I hope this helps, > Brenton > > On Friday, August 10, 2012 6:21:00 AM UTC-4, john wrote: >> >> Hello, >> I am just trying to understand the best practices in "ClojureScript One". >> >> One thing that strikes me is that most html gets put (with the help of >> macros using enlive) in the actual cljs page. >> >> As someone who hasn't done web-applications for years I myself would have >> created as much dynamic html content >> as possible on the server. But yet "ClojureScript One" seems to prefer to >> have all html in maps and render it on the client? >> >> I also looked at Chris Granger's "crate" library and it seems to also >> follow this principle. >> >> Since I consider Chris Granger and Brento Ashworth to be web experts I >> would just like to know the disadvantages of having >> most html rendered on the server? >> >> Many Greetings >> John >> >> >> -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en