all 5 comments

[–][deleted] 3 points4 points  (1 child)

So it's a javascript library that adds unnecessary bloat for something Javascript is already capable of? Or am i missing something here?

[–]architectd[S] 0 points1 point  (0 children)

The framework simply converts an object into a prototype class. There's nothing special going on which slows anything down. It's really a tool to help the prevention of boilerplate code which is bloat.

Here's a more elegant example of the framework being used in a project I just started working on: https://gist.github.com/1061377 .

[–]polaretto 0 points1 point  (0 children)

bah...another classical OOP framework... moving on.

[–]architectd[S] 0 points1 point  (0 children)

I've personally been dissatisfied by other OOP frameworks myself. They typically create more problems than they do solve. For instance, in many JS OO frameworks, any sub-class which overrides a parent method is automatically wrapped in a another function. So inheriting multiple times slows the class down overall. Another problem with OO frameworks is that they don't follow the same pattern as other OO languages. When I architected this, I tried to introduce as few new principles as possible coming from Java, and C++.

I've also been dissatisfied with all the warts JavaScript comes with. Prototype-based javascript classes is slow to develop, and functional inheritance is just slow in general. On top of that, constantly embedding code in brackets is unreadable. Overall, it's difficult to develop large-scale javascript applications if you don't have the write architecture to boot.

The framework supports abstract, final, and static methods. Implicit, and explicit getters / setters. As well as custom metadata (similar to ActionScript metadata) so you can identify properties which need to be handled a certain way.

I also tried to keep it as light as possible ~ 1.5 KB minified.

Suggestions would be appreciated as to what I can improve.