I am mostly interested in applications for this project for developing / testing extjs app .
Can we use that for unit testing, for intellisense or for anything useful?
The typical use for it is to have it serve your HTTP requests for your application. It can serve your html, css, images, scripts, etc. It's ideally suited for quickly responding to Ajax requests that Sencha Apps make back to the server. Like to get records for a DataStore, Ext.Direct, and that sort of thing.
It could be used to implement a pure server-side MVC Web 1.x style site.
However, it's also a command line processor. So you can load up all your libraries that you use in your WWW server application and do some long running operation, like importing a million records into your database, add watermarks to all the images in a directory structure, etc.'
It's perfectly suited to run something like JSDoc toolkit, JSLint, and so on. In theory, any Unix command line program, including screen-oriented ones like VIM, could be written in JavaScript using SilkJS.
This has nothing to do with code running in the browser, although you could share entire .js files between server and client. I could see having a Validator class that could validate form input on both sides of the connection, for example.
There are JavaScript libraries that implement the DOM for server-side programs. For example, there's env.js. In theory, you could use SilkJS + env.js and use that environment for unit testing browser-side code.
The async transport definitions of modules & packages have the most traction in the browser world and would probably make the most sense.
I'm confused as to what is nebulous about the CommonJS effort...? We don't want to have to modify our code to work on the server and the browser. The ability to package up code and use it in multiple runtimes / runtimes.
in particular
define( ); require(); and the concepts of exports and module.
How a person goes about implementing that may be nebulous, but the movement itself is pretty straight forward. Personally I don't think the world needs another "flavor" of javascript with it's own set of quirks like .jst
SilkJS is a C++ program that links with the Google V8 JavaScript engine and several other libraries. It provides as simple and direct as it can, methods that make calling operating system and those other libraries' functions from JavaScript context.
Maybe I'm missing something but isn't that what Node already does?
Maybe I'm missing something but isn't that what Node already does?
There's quite a difference between NodeJS and SilkJS. There's not a built-in (C++/native) function or any in the .js library code that has a single callback in SilkJS. It's entirely synchronous and blocking style. You write code for it in the same style you would for most other server-side languages (PHP, ASP, Java, etc.).
One of the guys who installed SilkJS on his system sent me this:
I created a demo Ext-3.4.0 app using SilkJS and its ORM. The server-side code, apart from defining the database tables and the HTML for the application's page consists of under 20 lines to list, create, edit, and delete records from the ExtJS GUI.