6 ms·
Single page apps in depth
- RyanZAG 13y agoNice book, but seems to be very focused on 'this is the one true way'. There is very rarely ever 'one true way' for all problems, and the reasoning given for each choice isn't solid enough to consider it a closed problem. It would have been great if there was a small part of each section given to a short discussion of other alternative options that could be taken if the first approach isn't working out for the team. eg, the book's requirement to use specific libs like CommonJS
- spindritf 13y ago> seems to be very focused on 'this is the one true way'. Good. I hate when the goal (of building something, of answering the question) is obscured by the author's need to show how knowledgeable or insecure they are and share 15 different ways to do something. Not every piece of writing is a philosophical treatise. Though sure, a short list of alternatives wouldn't hurt. The justifications for our choices OTOH expand quickly because humans seem to be really good at those[1]. EDIT: fixed, thanks. [1] http://www.overcomingbias.com/2013/04/talkative-sell-silent-buy.html http://www.overcomingbias.com/2013/04/talkative-sell-silent-...
- as_if 13y agoAlso you can make the decision on your own. * read a book * extract what you think is good * throw the rest of information away
- alinajaf 13y ago> Not every piece of writing is a philosophical treaty I think you might mean treatise.
- pekk 13y agoSimply allowing more than one way to do something does not mean that you have a "need to show how knowledgeable or insecure [you] are".
- markdown 13y agoIf it's a beginners book, one way is always the best.
- spiffytech 13y agoProvided that one way is both achievable for beginners, and a healthy practice to continue in the absence of further development. You don't want beginners thinking some terrible practice is how they are supposed to build things, just because it was the only workable thing you could use to introduce them to the topic.
- danradliff 13y agoYou could import it in http://www.dotdotdot.me http://www.dotdotdot.me and start annotating it.
- Joeri 13y agoI didn't read it that way. The author goes to some effort to point out the reasoning behind the choices made, and also goes in-depth explaining the options between client-centric and server-centric designs, and where the trade-offs are. While it's true that only one type of implementation is discussed in detail, it would be impractical to discuss the popular frameworks without getting lost in pointless detail.
- scott_w 13y agoIt's excellent for someone, like me, who's new to JavaScript development. Until you can build up a frame of reference, it's difficult to understand why one approach works over another, even when someone spells it out for you. An article that just says "this works and is easy" is sometimes what you need to just start writing some damn code.
- jader201 13y agoDoes someone know of any sites that implement this pattern, or even better, well known sites that implement this pattern?
- pbiggar 13y agoIt's not well known, but https://circleci.com https://circleci.com is a one-page JS app that seems to be very similar to the book. The datasource is slightly different (we use Knockout, and so follow their pattern, with simple jquery for "saving" and loading), but otherwise it's surprisingly similar.
- cnp 13y agoA big amz product coming out soon follows this pattern to a t!
- aymeric 13y agoI use knockout.js too and I had a look at your code: although you seem to follow a lot of best practices, I noticed your code is not minified. Any reason why?
- pbiggar 13y agoAh, yes. We use a dieter [1] for our asset pipeline, and it supports minification using Google closure compiler. Unfortunately, this breaks Twitter Bootstrap. I did some measurement and I think we can save 19% through minification using uglify (once you included gzipping). That means its not currently worth the few hours of making it work and verifying that it doesn't break anything (versus other ways we can spend our time). Probably. [1] https://github.com/edgecase/dieter https://github.com/edgecase/dieter
- jere 13y ago>1. Modern web applications: a overview An overview, please. Sorry to nitpick grammar, but seeing that in an early header leaves a bad impression.
- manojlds 13y agoCan't believe something like that creates bad impression in tech materials, but I have always been surprised with myself about how my impression changed due to grammatical mistakes.
- jere 13y agoI wouldn't avoid the book because of that, but I don't know about others. Such mistakes might make one think the author is uneducated, sloppy, or both. In a free ebook and with english as a second language (guessing that is the case), it's totally excusable.
- rhizome 13y agoIt has to do with attention to detail, and for me it raises the possibility that I can't trust the technical aspects of the writing. For sure that's a grammar-bigotry on my part, I'm not proud, but I simply look askance a bit after seeing that kind of thing.
- dgesang 13y agoDon't be ashamed for being right.
- IznastY 13y agoNotice the table of contents makes use of 'an overview' instead of 'a overview'. May have been just a simple mistake.
- deleted 13y ago[deleted]
- pkmishra 13y agoThanks for sharing.
- brian-frichette 13y agoVery opinionated, but very good opinions. Thanks for sharing.
- crabasa 13y agoI hate to judge a book by its cover, but shouldn't this ebook have been a single page app itself?
- m2mapps 13y ago1. Are there any popular apps that consist of a single page? 2. What is the most lucrative single page app out there?
- tzury 13y agoGmail, Facebook, Google+, Twitter
- ep103 13y agoDoes google docs count?
- thekingshorses 13y agoFacebook
- mixu 13y agoIf you find the book helpful - great! I'm glad. I can definitely see a lot of faults in my own work but I don't have infinite time to fix them, which is why the book is on Github ( https://github.com/mixu/singlepageappbook https://github.com/mixu/singlepageappbook ). There are things that I would definitely discuss differently if I wrote the book today - since things have developed a quite bit in the past year and half. I'll probably start working on a second edition late this year to rewrite the parts that I find most annoying in my book. I need to finish and ship a bunch of open source stuff before that though.
- visarga 13y agoExcellent work. This is why I love our internet age. A single person can have a huge impact on many people, and he/she doesn't need to have massive media behind.
- alpb 13y agoHave you considered making it in ePub format? It would be a really great!
- mixu 13y agoIt's actually available in mobi (Kindle) and epub on the front page, see the side bar at http://singlepageappbook.com/ http://singlepageappbook.com/ or direct links: http://singlepageappbook.com/mixu-single-page-apps.mobi http://singlepageappbook.com/mixu-single-page-apps.mobi and http://singlepageappbook.com/mixu-single-page-apps.epub http://singlepageappbook.com/mixu-single-page-apps.epub
- akurilin 13y agoAny chance you could at least outline what you think the biggest changes in the past year and a half have been, for those of us who read the book? What are the things you would have written about differently?
- cnp 13y ago+1. I'd be so interested in hearing your answer as well.
- onto 13y agohttps://www.dropbox.com/s/z4872dg21mvuizs/single_page_apps.pdf https://www.dropbox.com/s/z4872dg21mvuizs/single_page_apps.p... PDF for tree-killers
- mangoman 13y agoI haven't gone through much of the content, but I was expecting a site about single page apps...to be a single page app. I mean, I understand that there is probably a wealth of information on the site, but it not being a single page app is kind of a bummer. It feels a little less credible, but more importantly, it feels like a missed opportunity to show "What You Could Build If You Read This Site".
- lowboy 13y agoMVC is not a good architecture choice for reference material like a book or a blog. So it wouldn't be that useful, IMO.
- shanselman 13y agoI love that it's all on a single page.
- ninetax 13y agoThank you so much for this book. Your writing is clear an concise. I am starting out with angular and this is just what I need, not another piece of angular documentation.
- eladbl 13y agoOne thing always bothers me with single page application is SEO implications. Is there a real way to use SPA without killing your SEO?
- STRML 13y agoAirbnb gets around this by rendering their backbone.js views server-side, then pushing them out upon page load. They call it 'Rendr', which they have released [1]. [1]: https://github.com/airbnb/rendr https://github.com/airbnb/rendr
- cheapsteak 13y agoAside from Airbnb's Rendr (and I've heard DirbyJS does something similar), you could also build your SPA on top of your server-rendered pages. After pageload, hijack the click events from your navigation controls and have it fetch and render content via ajax. It's certainly not "DRY", but it's easier to implement for existing content-focused sites.
- cnp 13y agoThis has been the single most important book I've read in my JavaScript career. It's priceless, and really pushed me towards daily best-practices that I would have otherwise been unaware of coming from a different language. Thank you!
- michael_scheibe 13y agoI highly recommend mixu's talk from HTML Developer Conference last year covering similar content to his book: http://www.youtube.com/watch?v=BqDJqKGfIiE http://www.youtube.com/watch?v=BqDJqKGfIiE
- dm03514 13y agoMixu, I have recently read your book front to back. I am new to javascript development and javascript MVC frameworks. I found your book to be both informative and concise. It shed a lot of light on the major aspects of single page JS and what the frameworks are trying to address. Thank you for your time
- aswath87 13y agoCoincidentally, I just made a single page app today! http://liveconsciously.me/ http://liveconsciously.me/
- akurilin 13y agoReally enjoyed the material, thanks for writing it. Hopefully the community can keep it fresh and relevant as the tech evolves, since it's on Github. It seems to have worked really well for Addy Osmani's Backbone Fundamentals, I'm sure we can do the same for your book as well.
- Surio 13y agoHmm.. I remember this discussion from before... Yup. Here's the previous discussion(s). http://news.ycombinator.com/item?id=4172837 http://news.ycombinator.com/item?id=4172837 http://news.ycombinator.com/item?id=4677497 http://news.ycombinator.com/item?id=4677497