Show HN: Spar - Single Page Application Rocketship
goboundless.github.com
Show HN: Spar - Single Page Application Rocketship
1–10 of 21 posts
Re: Show HN: Spar - Single Page Application Rocketship
#2Re: Show HN: Spar - Single Page Application Rocketship
#3Re: Show HN: Spar - Single Page Application Rocketship
#4I currently use http://middlemanapp.com/ to accomplish this. It works really well.
Re: Show HN: Spar - Single Page Application Rocketship
#5A nodejs stack makes more sense to me because the app itself is powered by JavaScript, not Ruby, and then I am truly decoupled from other languages. However, I can see why someone coming from Ruby would prefer Spar -- even Spine.app includes Sprockets support for Ruby devs.
Re: Show HN: Spar - Single Page Application Rocketship
#6Re: Show HN: Spar - Single Page Application Rocketship
#7Re: Show HN: Spar - Single Page Application Rocketship
#8Re: Show HN: Spar - Single Page Application Rocketship
#9The concept is great. I use Spine.app for this myself. A nodejs stack makes more sense to me because the app itself is powered by JavaScript, not Ruby, and then I am truly decoupled from other languages. However, I can see why someone coming from Ruby would prefer Spar -- even Spine.app includes Sprockets support for Ruby devs.
Re: Show HN: Spar - Single Page Application Rocketship
#10There is a massive gap here, and with any framework that is purely client-side. Here's what you get if you serve html from the server:
* SEO. You can't crawl a page that loads purely over Javascript. Google has an API to allow access to ajaxed-in pages, but that means modifying you code to fit exactly what each crawler needs. Not going to happen.
* Better accessibility. Yes, some screen readers handle Javascript now, but many don't.
* Page performance. Time-to-usability on a page served by a server is several orders of magnitude faster than when you load javascript, then load data, then render the page. If the server can serve html, you can start using the page while the scripts load and initialize in the background.
If performance isn't a big deal, you want to make awkward hacks to force SEO to work, and you don't care about reaching all possible people? Build a single-page-app and nothing else.
I'm not saying don't make a single-page app; I'm saying be smart about it.
You've got two steps out of three - building an API and a single-page app. The missing middle step is building a second server side app that reads from that API (RESTful, right?) and bootstraps the page, which is built using language-agnostic templates like Mustache. Then, you load your Backbone/whatever JS on top, which takes over, and points at your api. It's easy to do with something like Node that can even share the same code to build pages.