Live data from Hacker News

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

moot.it

61–70 of 147 posts

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

#61

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…

I'm pretty sure Jeremy was not criticising the jQuery dependency, since his framework (Backbone) also depends on it. He is just stating that there's nothing actually in riot.js, it just proxies to jQuery. The project might as well just be a blog post with what I'd consider the only useful and non-hyperbolic aspect which was: > What people refer to as spaghetti is in fact a mixture of model and view code. To avoid it,…

Riot does templating, routing and separation of concerns rather beatutifully, I would say. Those are the things most frameworks are build for. What do you see missing?

The amount of Todo MVC code in Riot is actually smaller than in Backbone but like I say on the post the focus should not be on the code size but on simplicity – and this is why Riot advocates MVP a lot. Actually Backbone also seems like a MVP framework to me.

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

#63

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…

I would not call this a framework but a jQuery plugin with a hip name

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

#64
post #49

Earlier quoted context omitted.

plain jQuery is harder to maintain and scale hence why the javascript frameworks were built in the first place

Wrong. Frameworks were build to add structure to the application by taking advantage of the MVC or MVP pattern. By having all the view/model/presenter code stuffed together is the problem and is definitely hard to maintain.

how would you build a web component in riot.js? I would compare the complexity to an angular directive or ember web component. How could riot.js help me structure a phonegap/cordova app in which adding a library like jquery isn't necessary with tools like AngularJS that doesnt depend on it?

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

#65
post #52

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…

Well, you are doing exactly that -- correcting the positioning of an open source project. However I would like to point out that statement "beautiful demonstration of marketing" in a strict subset of English language would evaluate to False, if I am allowed to make such comparisons. Marketing is so much more than just positioning of a brand. Big promises of Riot.js is exactly that -- positioning. And positioning is i…

[deleted]

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

#66

Earlier quoted context omitted.

https://github.com/moot/riotjs/blob/master/riot.js#L12-L21 By only supporting simple single property accesses. All that this can do is print values from an object — no loops, conditionals, filters, methods, or anything else — like the others support. Think string interpolation, not templates.

Yeah. The idea is to support variable substitution (string interpolation) only. The loops are supposed to be done on the Presentation layer.

You should remove the need to wrap the replacement strings in {} so the templates don't need to be rewritten. As it stands now, you're requiring people to write a template once, than rewrite it, and then debug the final result. Better to just use basic HTML.

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

#67
post #53

Earlier quoted context omitted.

Thanks for the feedback. Maybe I can use some of that on my next update. These implementation details and issues are rather easy to address. I would not write my own event library from scratch if I can take advantage of jQuery. Can you elaborate what's wrong with proxying?

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.

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

#68
I love minimal code. When you try to do minimal, often what you end up doing is stripping away everything you don't need -- extreme YAGNI -- and getting to the core of something. Even if the result ends up being too minimal, it's often extremely educational.

To remove the jQuery dependency I'd suggest looking at this: http://minifiedjs.com/

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

#69
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 project looks cool but I wish its creator(s) was/were a bit more humble.

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

#70

Earlier quoted context omitted.

I'm pretty sure Jeremy was not criticising the jQuery dependency, since his framework (Backbone) also depends on it. He is just stating that there's nothing actually in riot.js, it just proxies to jQuery. The project might as well just be a blog post with what I'd consider the only useful and non-hyperbolic aspect which was: > What people refer to as spaghetti is in fact a mixture of model and view code. To avoid it,…

Riot does templating, routing and separation of concerns rather beatutifully, I would say. Those are the things most frameworks are build for. What do you see missing? The amount of Todo MVC code in Riot is actually smaller than in Backbone but like I say on the post the focus should not be on the code size but on simplicity – and this is why Riot advocates MVP a lot. Actually Backbone also seems like a MVP framework…

It seems the Presenter example is pretty broken (unless I'm just stupid). I don't see a `todo` variable defined anywhere, but it's used in several places. Perhaps `var model =` was just missed in a rename?

Also, the "toggle all" function uses a `filter` variable that's undefined AFAICT.

I'm not trying to knock the framework. I like what I see. Just a little hard to follow along when I'm not sure if the code is wrong, or my understanding of it is.

Post reply on HN