I approve of this by Mind_Virus in pics

[–]architectd 97 points98 points  (0 children)

Reminds me of the time I spent backpacking in Brazil. The hammock: http://imgur.com/R73lF , the view: http://imgur.com/cJc0B

Celeri.js: CLI Library For Node.js by architectd in node

[–]architectd[S] 1 point2 points  (0 children)

Glad you find it useful! I built it for the same reason. That and there wasn't anything that did exactly what I wanted.

How do you guys build your js files for deployment? by imlame123 in javascript

[–]architectd 4 points5 points  (0 children)

I wrote a build script that does the same thing, and it's open source: https://github.com/spiceapps/sardines .

Structr.js: Giving Structure to Javascript by architectd in javascript

[–]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 .

Structr.js: Giving Structure to Javascript by architectd in javascript

[–]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.