Category: Spludo
log4j like logging in node.js (from Spludo)
One core feature of spludo, is the powerful logging system. This system is entirely independent from spludo, so you may use it in your own (even non-spludo) nodejs project with ease.
Like described in the tutorial about configuration, you can easily add logging facality to every prototyped class:
2
3
4
5
6
7
// ...
}
extend(true, DocsManager.prototype, Logging.prototype);
DocsManager.prototype.logging_prefix = 'DocsManager';
It's important to add #logging_prefix, otherwise the methods won't know which class originally had the function implemented.
Usually you use it with just one parameter:
Spludo update 1.0.1 released
I had a very nice talk to some folks at my company about the spludo framework. Thanks for all the positive feedback!!
Today I want to give you guys a small update to spludo, which contains some of the neat features I was previewing on friday:.
2
3
4
5
* added "spludo-gen controller" (wizard to create a new controller)
* views can now be in sub folders
* added partial + partials in .ejs
* .ejs-Views recompile the view as soon as it is changed
There is also a very short topic about how to use partials with spludo in the user guide.
Removing @since and @author from JavaDoc
Today I was polishing up the release for spludo and I removed all @author + @since tags from the javascript doc.
In first place, I thought I might keep them in. But, I was unsure about a good guideline how to keep them up to date.
Let's take for instance @since. What does this exactly mean. It may mean when the function or class was added. But what if the signature changed? Is this a different function or still the same? Are this still the same @authors?
I came to the conclusion that they are hard to maintain and git/subversion give me the info I need in a way more convenient way. So I removed them with this commit.
NodeJS Webframeworks Benchmark August 2010
Since now I am releasing spludo pretty soon, I wanted to check out how performance is against other web frameworks for node.js.
I made a previous test for this already, running nodejs 0.1.98.
This results are against: nodejs 0.2.0. To keep it fair (and little expressive) I just took the hello world application from each framework and benchmarked those with apache benchmark.
Concurrency Level: 32 (was 256 in the previous test)
Results:
2
3
4
expressjs 1.0: 6480.42 [#/sec]
(fab): 8203.74 [#/sec]
spludo 7454.60 [#/sec]
Concurrency Level: 1
Results:
2
3
4
5
expressjs 1.0: 3497.71 [#/sec] (was 2744.79 in 0.9)
(fab): 4199.95 [#/sec] (was 4271.43)
spludo: 3923.69 [#/sec] (was 3866.12)
The source code for all sample applications may be found at the public gist post.
The Test PC was a i7-920 Quadcore with HT and 8GB DDR3 RAM and a single node.js instance running.
JsBehaviour 1.0 released
This is a tiny library I have been using to create inline dynamic effects at docsforit without inline javascript. Since it is not spludo (serverside javascript mvc framework) specific and works as long as mootools is available, I release it for the public today.
How does it work?
The idea behind JsBehaviour is pretty simple. Put a class (jsb_) on all elements which should be enriched/enhanced by javascript. Additionally put a class jsb_keyword on the element to define which behaviour should be applied to the element.
Each behaviour can register on such keyword by using this
method. As soon as the dom is loaded
is executed. You might even overwrite your Request.HTML method to do the same.
Hope you enjoy to work and tweak this little piece of MIT-licensed software.
Download @ DracoBlue.net and js-behaviour@dracoblue.
Demo + Spludo-Integration at "Editing the sections" on docsforit (double click on the content, this is all done by using JsBehaviour!!).
Hello World Benchmarks for Nodejs Web Frameworks
Since I am releasing spludo pretty soon, I wanted to check out how performance is against other web frameworks for node.js.
To keep it fair (and little expressive) I just took the hello world application from each framework and benchmarked those with apache benchmark.
Concurrency Level: 256
Results:
2
3
4
5
expressjs: 3998.17 [#/sec]
(fab): 6588.95 [#/sec]
picard: 4648.41 [#/sec]
spludo 6780.38 [#/sec]
Concurrency Level: 1
Results:
2
3
4
5
6
expressjs: 2744.79 [#/sec]
(fab): 4271.43 [#/sec]
picard: 4755.03 [#/sec]
spludo: 3866.12 [#/sec]
The source code for all sample applications may be found at the public gist post.
The Test PC was a i7-920 Quadcore with HT and 8GB DDR3 RAM and a single node.js instance running.


