Live data from Hacker News

Ask HN: Best tiny JavaScript framework?

news.ycombinator.com

21–30 of 46 posts

Re: Ask HN: Best tiny JavaScript framework?

#21
For virtual DOM I don't go full React, I just use Maquette with Jade templates.

http://maquettejs.org https://github.com/nextorigin/gulp-pug-hyperscript

For a small framework, I've been using SpineJS for years. https://github.com/spine/spine/

Example with Maquette:

https://github.com/nextorigin/maquette-mapper

Using focused, quality components has let me upgrade my stack piece by piece over the years while retaining backwards compatibility.

Re: Ask HN: Best tiny JavaScript framework?

#22
Do you need a framework at all? I think you could get away with just plain JavaScript and include Handlebars if you want a templating engine.

Maybe add Jquery if you want something just above plain JavaScript.

Edit:

Another benefit of Handlebars is that if you ever do decide you need a full framework, you can use Ember and leverage your Handlebars templates.

Re: Ask HN: Best tiny JavaScript framework?

#24

Why do you need such a tiny footprint?

I need a footprint that works well with mobile devices, slow internet connections, etc. Also, I prefer smaller frameworks as they have less cognitive load - I usually am more able to read the source code, understand the API, and so on.

I posted the suggestion above before reading this. I don't think you can get smaller than JavaScript + Handlebars. This is the route I took for pages that need to run in slow mobile devices.

You can even precompile your Handlebars templates as an optimization and include a smaller subset of the Handlebars library that is just the runtime without the compiler.

Re: Ask HN: Best tiny JavaScript framework?

#26

For virtual DOM I don't go full React, I just use Maquette with Jade templates. http://maquettejs.org https://github.com/nextorigin/gulp-pug-hyperscript For a small framework, I've been using SpineJS for years. https://github.com/spine/spine/ Example with Maquette: https://github.com/nextorigin/maquette-mapper Using focused, quality components has let me upgrade my stack piece by piece over the years while retaining…

Ooh, Maquette looks very interesting!

Re: Ask HN: Best tiny JavaScript framework?

#27
post #14

I like the dom wrapper this guy came up with: https://hackernoon.com/how-i-converted-my-react-app-to-vanil... I adapted it for myself here: https://gitlab.com/heycato/domjs/blob/master/dom.js

"VanillaJS is a framework written many years ago by a dude called Brendan that is rarely used anymore."

That is the funniest thing I've read all day.

Re: Ask HN: Best tiny JavaScript framework?

#28

Do you need a framework at all? I think you could get away with just plain JavaScript and include Handlebars if you want a templating engine. Maybe add Jquery if you want something just above plain JavaScript. Edit: Another benefit of Handlebars is that if you ever do decide you need a full framework, you can use Ember and leverage your Handlebars templates.

Yes, I am definitely considering just using plain Javascript. I just have a fear of maintaining plain Javascript applications - the hacks just seem to build up.

Then again, maybe I should just put the time in to make a well architecture and maintainable plain vanilla Javascript application. I'm definitely a fan of minimalism.

Post reply on HN