Skip to content

Instantly share code, notes, and snippets.

@kostia
Last active August 29, 2015 13:56
Show Gist options
  • Save kostia/9079278 to your computer and use it in GitHub Desktop.
Save kostia/9079278 to your computer and use it in GitHub Desktop.
Re: 5 surprisingly painful things about client-side JS

Bad search ranking and Twitter/Facebook previews

  • Google & Co. should be feeded with https://prerender.io/
  • Facebook and Twitter should be feeded with extra content. Always. And it's easy to implement.

Flaky stats and monitoring

Dunno...

Slow, complex build tools

  • You're free in selecting your build tools, when developing a rich client-side website. There are plenty of them, all have their benefits and tradeoffs. Again: Angular has no hard dependency on Node related build tools.
  • Gulp is great. Grunt sucks. It's so simple as "Use Gulp, don't use Grunt". Also there's https://github.com/sindresorhus/gulp-plugin-boilerplate/
  • Your example Grunfile is completely dependent on Agular, but "rich client-side" != Angular.js.

Slow, flaky tests

It sucks, but not because of the client-side JS, but because integration tests sucks in general. That's why there are unit tests, which reduce the number of fragile integration tests.

Slowness is swept under the rug, not addressed

I didn't undestood the example with the sidebar and why it seems slow to the user.

Conclusion

Building content websites with client-side JS is indeed not yet well supported. Primarily because noone does it. Nevertheless don't mislead the reader. Most of the problems can be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment