Live data from Hacker News

Riot.js – A 1kb client-side MVP framework

moot.it

141–147 of 147 posts

Re: Riot.js – A 1kb client-side MVP framework

#141

I like how this looks, I definitively want to try it out. With that being said : > Here's the shocking part: a 1Kb library requires the least keystrokes to build the Todo MVC application I'll decide on my own if it's shocking or not. Also I don't care that much about keystrokes, there's nothing wrong with verbose/expressive languages. I want my code to be readable and maintainable, and then concise if possible. This…

I still find it really surprising that I was able to write the Todo APP in least amount of keystrokes by using only 1kb of "framework" code. And I totally agree that the goal should be readability and maintainability – this is what the post is mostly about.

Except, that's not true - the Angular TodoMVC code is smaller and more expressive, and Angular's JS is actually smaller than Riot + jQuery.

I get what you're trying to do here but please don't resort to misleading statements to prove your point. This community sees right through it and every time you say things like this, you lose credibility.

Re: Riot.js – A 1kb client-side MVP framework

#142
post #128

Earlier quoted context omitted.

> Precompilation renders template rendering speeds. Not 100% sure what you mean but if you measure the time to render a HTML fragment 100 times the total time is 1 x pre-compilation + 100 x rendering. The pre-compilation has virtually no effect on the total time.

I mean that if you do the HTML parsing to JavaScript portion as part of your deploy, instead of in the browser at render time, then all you're measuring is string concatenation and HTML render times, which should always be the same. Template rendering speeds in that case mean nothing.

Exactly - with the proliferation of Grunt in most modern webapp builds, it is incredibly simple to pre-compile your templates in your production builds. In fact, it's so fast (and I get useful stacktraces when my tpls have errors) that I started precompiling templates in development, too.

I find the bottleneck is 99% the browser's HTML parser and 1% the actual templating library.

If somebody had any tips on how to bring down the "Parse HTML" time spent in the Chrome inspector (see Timeline), I would be interested to know. Tips other than, of course, "parse less HTML".

Re: Riot.js – A 1kb client-side MVP framework

#143

Earlier quoted context omitted.

And sadly, with great pain, I rest my case. --- But hey, if you want to try out a hot new framework that Fits in A Tweet™, I've got something special for you. Announcing Revolution.js It's a mere fraction the size of Riot.js, and provides over 100 times the functionality. Despite the unbelievable size, all the building blocks are there: a template engine, router, event library and a strict MVP pattern to keep things…

I seriously thought you could do better than this. I was expecting trolly responses from other framework communities but not from Backbone. I prefer reasoning and proper conversation instead of this hate speech that the framework communities are all over. I was hoping you were closer to a scientist. So far no reasonable arguments why Backbone is better. Is it just larger, slower and less effective? I was expecting yo…

[deleted]

Re: Riot.js – A 1kb client-side MVP framework

#144
post #130

Earlier quoted context omitted.

Riot has less boilerplate than Angular on the Todo MVC implementation.

> Riot has less boilerplate than Angular on the Todo MVC implementation. why are you lying and thinking you can get away with that ?

Because I'm counting file size and not line numbers. That simple.

Re: Riot.js – A 1kb client-side MVP framework

#145

While I'd usually prefer to be nice in the mornings ... starting off with those benchmarks got my goat. So. This sort of thing is a beautiful demonstration of marketing, big promises, and bombastic rhetoric in open source. But one of the best things about open source is that you don't have to take such claims at face value. If you actually look at the source, you'll find: https://github.com/moot/riotjs/blob/29ae687ca…

This*1000.

Re: Riot.js – A 1kb client-side MVP framework

#147

Earlier quoted context omitted.

I'm sure people study the source code of the frameworks a lot these days. Most of the things are related to structuring code in an understandable way. MVC and MVC are design patterns and do not necessarily need a framework.

MVC is not a design pattern or an architecture. It's just a way of organizing code. Inside the individual implementations of the model, view and control you may have varying design patterns, which is why we have so many different MVC frameworks/implementations. Another quick note: what you're calling a View in riot.js is actually a Template and your Presenter is probably more of a View than a Presenter.

DOM/HTML represents the "passive view": http://martinfowler.com/eaaDev/PassiveScreen.html in MVP and the Presenter layer makes all the manipulation of the view & widgets.

This is almost identical to Backbone which can also be interpreted as MVP, see:

http://lostechies.com/derickbailey/2011/12/23/backbone-js-is...

Post reply on HN