Hacker Newsnew | comments | show | ask | jobs | submit login
Eyeball.js - Lightweight Javascript MVC Framework (github.com)
29 points by elbart 1361 days ago | 19 comments



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

-----


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.

-----


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"?

-----


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.

-----


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.

-----


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

-----


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.

-----


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

-----


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.

-----


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?

-----


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

-----


assign it to whatever name you like...?

Javascript functions are first class citizens.

-----


one line to "fix" it -

var notCrapAtAll = window.o_O;

happy?

-----


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.

-----


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

-----


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

-----


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

Why does this variable name offend you so much?

-----


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

-----


o_O

-----




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: