Live data from Hacker News

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

moot.it

71–80 of 147 posts

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

#71

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…

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.

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

#72

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.

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

#73
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 does, even if you are the most disciplined of programmers) I still don't see the benefit of adding this 1K of JavaScript to my page at all. I can duplicate $.observable with a vanilla jQuery object.

To call this the "most powerful client side framework for building large scale web applications" is downright laughable.

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

#74
GOSPEL ARTIST POSES NUDE!

Evon Latrail is the author of a children's book "When Mommy Went to Heaven". She wrote/recorded a few songs; "Lord Bless My Enemies" and "It Is Time" happens to be two of the titles. She even has a song entitled, "Can't You See (Abortion Is Murder). She went Pro-life after having a abortion! Really???? Now here is a photo of her posing in chocolate as a "Swamp Girl". The word Hypocrite is floating around somewhere. This story has made front page news in the local paper. How can this so called "Gospel Artist" be a role model is she's posing news? For more on this story.....Go to Google or YouTube and search, Evon Latrail.

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

#75

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…

Actually, while I was reading Riot's home page, I was wondering if it was some kind of joke...

EDIT: ok, now I understand. It is a joke, because all this long article boils down to just one sentence, repeated throughout the article itself: "You don't need a framework for that."

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

#76

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…

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 knowledge. I've learned that often keeping it simple is a good thing. There´s a tendency to over-architect and over-abstract, and the cognitive overload of the full stack, end-to-end, is significant.

For front-end JavaScript applications, I've been favorable to AngularJS and Knockout. I've looked into Backbone but it promotes a style of programming I'm done with and I want to have no relation to ever again, so I wouldn't consider Backbone an alternative either way.

So I don't feel diminished or discouraged by negative remarks to say that I'll try Riot's style in the next small app I'll build. It's targeted at mobile, it already depends on jQuery, and I was worried to add another large (for 3G) dependency to it.

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

#77

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'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.

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

#78
post #30

Seems really nice, but I would not call this a framework. Just like Backbone, it is more of a library than anything else.

The lack of framework-ness is what makes it interesting: you're not handing your entire app's architecture to a framework and hoping for the best. This library knows its place, and it is happy to be there, instead of spreading itself all over your code and claiming it is helping you.

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

#79
It looks like the meat of $.observable is mostly just passing thru to jQuery https://github.com/moot/riotjs/blob/master/riot.js#L29-L54 I don't really have an opinion on whether this is good or bad but it's worth noting that jQuery is doing the heavy lifting here.

A couple code notes:

* why, in the observable function, are you switching functionality not by the name of the function called ('on','emit', etc.) but by the index of that function name in the array on line 32? This strikes me as brittle because adding to or rearranging that array would cause the whole function to fall apart. It's also harder to read- I'm looking at `if(i == 2)` rather than `if( fnName === 'emit' )`. Does this yield a significant performance gain or is it just to juice the final "weight" of the library (* Using `name` & `names` as variable names makes the code harder to read, as it doesn't give any meaningful context about what the variable stores (besides the fact that it probably represents a thing that has a "name"). It looks like in this case it represents event names but more descriptive variable names would eliminate this ambiguity & it would make no difference to the code weight after minification.

I bring these things up because this lib looks cool & I like the "you can easily read the whole source" point, but this obsession with brevity (that's what it looks like at least) causes code readability to suffer & greatly diminishes the benefit of being able to "easily read the whole source." Make the code more readable & more people will use the project & contribute. :)

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

#80

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…

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 organized.

Revolution.js is simpler and faster — in fact, on a completely different scale. In fact, it's so small and so fast that I can share it with you right here:

    function Revolution() {
      var a = arguments;
      return jQuery[a[0]].apply(jQuery, a.slice(1));
    }
New frameworks like Riot.js persuade false beliefs with shiny websites and finely crafted marketing without transparent, scientific analysis. They solve hypothetical problems and cause new problems instead.

At this point you might ask — "Hey, wait a minute, what's the deal? Isn't that just wrapping jQuery, and adding nothing?". To which I would answer, yes, exactly.

This is a Revolution against the status quo! Revolution is a manifesto for vanilla JavaScript and jQuery.

Post reply on HN