Hacker Newsnew | comments | ask | jobs | submitlogin
Eyeball.js - Lightweight Javascript MVC Framework (github.com)
28 points by elbart 957 days ago | comments


phoboslab 956 days ago | link

The source doesn't look like something I would want to use. Example:

https://github.com/paulca/eyeballs.js/blob/master/src/module...

Also, how is a 350kb lib consisting of 150 files "lightweight"?

-----

wavephorm 956 days ago | link

Are you just hating or do you have legitimate critiques? What exactly about that source code makes you not want to use it? Not documented to your liking? And 350KB is really not that big for a full-featured framework, especially not if includes ruby scripts and validators.

-----

lobo_tuerto 956 days ago | link

Well, calling it lightweight when something _lightweigth_ like backbonejs is around (4.6kb production, 41kb development with comments), is begging to not be taken seriously. Naming aside.

-----

arctangent 956 days ago | link

The code linked to doesn't have any comments in it.

-----

wavephorm 956 days ago | link

Does a file containing one method need comments?

  initialize: function(model_name, callback)
It would be pretty pointless to add comments before every line of code like some people do:

  // here is a for loop
    for (var i...)
  // declare a variable
    var x = 0;
If there is supporting documentation about the operation of the method, which there is in that github page, then I fail to see what would be gained by adding verbose useless comments about typical code.

-----

phoboslab 956 days ago | link

"Does a file containing one method need comments?"

So, the whole whole jQuery source is just one function, because its wrapped in one?

It's not so much the lack of comments, but the whole formatting of the source. It's just hard to read.

On a lesser note, it also seems that the author is pretty new to JavaScript. Underscores in variable names instead of lower camel case, "wrong" bracing style etc. (I'm ok with this, when it's applied consistently - which it is for this lib).

-----

secoif 956 days ago | link

"You define a model by passing a name and function to the eyeballs ( o_O ) function (pronounced 'eep eep').

o_O('Post', function(){ })"

+1 for ridiculous faces in ur code.

-----

wccrawford 956 days ago | link

I'm a little sad they didn't take it further. Some silly sites out there (I can haz...) are just begging to be written in something like this.

-----

wiradikusuma 956 days ago | link

i haven't finished learning backbone and another mvc shows up :) anyway looking at the changelog the project has been around since last year. anyone has experience with it? how's it compared to popular lightweight frameworks like backbone and spine?

-----

paulca 954 days ago | link

I've been working on a refactor of this lately:

https://github.com/paulca/eyeballs.js/blob/refactor/eyeballs...

The initializer function is now 'oo' which works better all round I think. There's also a certain departure from its MVC root.

Finally, this library actually does predate Backbone. If backbone was around when I first built this, I probably would have gone ahead and used it.

-----

Void_ 956 days ago | link

o_O makes no sense at all. I won't have my code look like crap just because somebody found it incredibly hilarious.

-----

skeptical 956 days ago | link

assign it to whatever name you like...?

Javascript functions are first class citizens.

-----

threepointone 956 days ago | link

one line to "fix" it -

var notCrapAtAll = window.o_O;

happy?

-----

Bootvis 956 days ago | link

Yes, until I integrate code with others that use '^_^', or '<8)' or ... ad infinitum. An easy to type self explanatory name would help a lot.

Maybe the whole project is a joke but then it's a very elaborate one.

-----

skb_ 956 days ago | link

well '^_^' and '<8' are illegal identifiers, so that can't happen

-----

addandsubtract 956 days ago | link

(╯°□°)╯︵('Post', function(){ })

-----

threepointone 956 days ago | link

Wouldn't matter, because they'll have their own references as well.

Why does this variable name offend you so much?

-----

Bootvis 956 days ago | link

It does not offend me but I just don't like it and would not use it in my own code (which is indeed not necessary).

I don't like it because it's relatively hard to type and naming it in this way does not serve any goal. I'm not satisfied by just changing it because it will, at least, hinder reading of third party code and generate silly arguments between developers.

I'd rather have the developers of the framework suggest something easy to type like 'e', 'E', or 'eb'.

-----

rbreve 956 days ago | link

o_O

-----




Lists | RSS | Bookmarklet | Guidelines | FAQ | DMCA | News News | Feature Requests | Bugs | Y Combinator | Apply | Library

Search: