Live data from Hacker News

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

moot.it

21–30 of 147 posts

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

#21

[Retracted.] ... but, if you're going to test Underscore templates for speed, you need to use the `variable` setting to avoid the `with` block.

The actual loop with 200, 500, 2000 and 5000 iterations is here:

https://github.com/moot/riotjs/blob/master/compare/speed/ind...

The $.each has only 4 iterations and has no effect on the stats.

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

#23
post #9

key feature of many frameworks is that they break if you don't follow them carefully, limiting damage from 10x developer's hacked together code. does riot provide similar functionality?

That's the same thing with Rails.

You don't follow a rule, it doesn't allow you to do it. You need to go by the book there, so why not here?

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

#25

[Retracted.] ... but, if you're going to test Underscore templates for speed, you need to use the `variable` setting to avoid the `with` block.

I don't think that's fair since a templating engine could easily avoid the actual with statement but provide same convenience. Optimization should be done in the implementation (which is fully possible here) and not at the cost of API ergonomics.

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

#28
post #24

Precompilation renders template rendering speeds...moot. What a weird factor to use for choosing a template engine. Also there already is a popular unit test framework called riot.js

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

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

#29
post #9

key feature of many frameworks is that they break if you don't follow them carefully, limiting damage from 10x developer's hacked together code. does riot provide similar functionality?

That's the same thing with Rails. You don't follow a rule, it doesn't allow you to do it. You need to go by the book there, so why not here?

Rails is much more than just 4 methods.
Post reply on HN