Live data from Hacker News

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

moot.it

91–100 of 147 posts

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

#91

There isn't very much to see here, if anything. A few meaningless microbenchmarks, and some "plain old JavaScript objects" that hijack jQuery's event subsystem so they can emit events just like DOM elements. We've been doing imperative, evented programming in the browser for years now. Even if you're inclined to argue that this style of programming doesn't lead to a giant mess (and I'm inclined to believe that it doe…

This isn't just 'imperative, evented programming' though. It gives a clear answer on how to separate your code into concerns, although I agree that there isn't much forcing you to follow good practices.

The problem with the typical 'jquery-type' programming was that apps were essentially an ad-hoc collection of (sometimes massive) event handlers. I think the problem boiled down to:

* there wasn't much experience and consensus on how to organise javascript code (split it into module etc.)

* the DOM is global, meaning you can register event handlers to anything from anywhere (To make matters worse events bubble up and down the DOM tree)!

It seems like people immediately resorted to extremes to solve these issue - basically trying to abstract away the DOM and even javascript completely - whereas the solution could be something much simpler and subtler.

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

#92

Earlier quoted context omitted.

You say that like it's a bad thing. I like the idea that riot.js is small enough that it 'outsources' it's meaty functions to jQuery (a library you most likely have in your project already). It means fewer bugs and less work for you! More time to enjoy life. There are tons of very smart developers working on jQuery,why replicate their work on riot.js? If your project doesn't use jQuery feel free to use the right tool…

The component.io ecosystem encourages using only functionality that you actually need instead of bundling a heavyweight library like _ or $. It would be great to use a small component (like riot.js say) with other nimble components.

Well, it would be more than a little difficult since riot does nothing without the support of jQuery.

And, you know, the reason it's < 1k is that it doesn't really seem to do anything jQuery can't do with about the same amount of boilerplate.

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

#93

Earlier quoted context omitted.

You say that like it's a bad thing. I like the idea that riot.js is small enough that it 'outsources' it's meaty functions to jQuery (a library you most likely have in your project already). It means fewer bugs and less work for you! More time to enjoy life. There are tons of very smart developers working on jQuery,why replicate their work on riot.js? If your project doesn't use jQuery feel free to use the right tool…

The component.io ecosystem encourages using only functionality that you actually need instead of bundling a heavyweight library like _ or $. It would be great to use a small component (like riot.js say) with other nimble components.

why use riot when you could just pull in a router, an event emitter, and a model?

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

#94
This is a nice academic exercise but isn't very useful for real world apps. The logicless "views" alone make building anything complex impossible.

One of the reasons this is so light is that it forces you to write boilerplate code for models. I use libs to eliminate boilerplate, not force it upon me.

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

#95

Earlier quoted context omitted.

Since I was used as proof of the effectiveness of "puffery", I went to find out what that English word means: "promotional statements and claims that express subjective rather than objective views, which no 'reasonable person' would take literally". Well, I don't claim to take all my decisions based on pure reasoning. Intuition has a lot to do with my technology choices, because it's built on all my prior experiences…

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…

[deleted]

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

#96

Earlier quoted context omitted.

Since I was used as proof of the effectiveness of "puffery", I went to find out what that English word means: "promotional statements and claims that express subjective rather than objective views, which no 'reasonable person' would take literally". Well, I don't claim to take all my decisions based on pure reasoning. Intuition has a lot to do with my technology choices, because it's built on all my prior experiences…

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…

Nice one Jeremy :D

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

#98

Earlier quoted context omitted.

Since I was used as proof of the effectiveness of "puffery", I went to find out what that English word means: "promotional statements and claims that express subjective rather than objective views, which no 'reasonable person' would take literally". Well, I don't claim to take all my decisions based on pure reasoning. Intuition has a lot to do with my technology choices, because it's built on all my prior experiences…

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…

As the author of Backbone I can understand your rage. I think that instead of bashing Riot you should focus on reasoning the existence of Backbone instead. Riot is clearly not just a jQuery and people can realize that.

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

#99
post #53

Earlier quoted context omitted.

It looks like a nice little library to me and I think it would probably be a really reasonable choice for a lot of apps. It stays close to what people are already familiar with (jquery). It handles a pain point in terms of model data change notifications. I wouldn't take the criticism to heart. The bit about bragging about how fast and small it is will always create friction - especially when another big library is n…

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

That may be true, but Todo MVC is a minuscule "application"! It can be used as a way to compare libraries and frameworks in a very superficial way but when you're writing a large web application with many screens, a lot of state, many widgets, lots of routes, various persistence mechanism, etc.

It doesn't have enough features to require or demonstrate the abstractions needed to eliminate boilerplate.

That being said I like what you did with Riot which is basically use plain JavaScript as much as possible. And I also like to you bring attention to the fact that jQuery doesn't cause spaghetti: programmers cause spaghetti.

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

#100

Earlier quoted context omitted.

Since I was used as proof of the effectiveness of "puffery", I went to find out what that English word means: "promotional statements and claims that express subjective rather than objective views, which no 'reasonable person' would take literally". Well, I don't claim to take all my decisions based on pure reasoning. Intuition has a lot to do with my technology choices, because it's built on all my prior experiences…

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…

Issue #1:

Arguments object has no method `slice`.

Steps to repro:

Invoke the constructor.

I'll send a PR as soon as this makes it to Github.

--------

In all seriousness though, I completely agree with you.

Post reply on HN