This project is read-only.

AwesomeScript is now .NinJa (dotNinja)

A new version of AwesomeScript, now know as dotNinja, is being released soon. This current project will be closed soon with a new one started.

What is AwesomeScript?

AwesomeScript is a JavaScript framework with Intellisense in mind. It’s a wrapping framework that exposes methods and properties of HTML elements through property functions, fields and events. The key component to AwesomeScript is the reference functions. Referencing functions are dollar signs ($) followed by an element or object type. To refer to an anchor with the id “myanchor”, you simply use $Anchor("myanchor"). If you are using Visual Studio and you have included Awesome-vsdoc.js in the same directory as your Awesome.js, then Intellisense will display several functions and fields associated with the Anchor wrapper object, including Href(), Enabled() and Text().

Not only does AwesomeScript provide excellent Intellisense support, but it makes JavaScript feel like it has a stronger type language and it makes reading the code much easier. Code such as document.getElementById('input_id') is hard to distinguish between referencing a text box input, a checkbox or any of the other input tags. But $CheckBox(‘input_id’) makes it very clear that we are working with a CheckBox.

How is this different from other scripting frameworks?

This framework was built with Intellisense in mind. The framework also takes an Object Oriented Programming approach to wrapping the HTML elements so that they can be created as normal UI elements and not simply parts of an HTML DOM. It’s much easier to think of an input field as a TextBox and retrive the Text() property rather than the value. It’s a different way of web programming but it feels more natural for those who are trying to develop desktop style applications on a web platform. If you’re not using an editor that supports JavaScript Intellisense, you may not like working with AwesomeScript.

But AwesomeScript provides much more than Intellisense. It provides a stronger event model that supports parameterized function calls, event arguments passed to event handlers, Ajax (what framework doesn’t), querying arrays (similar to LINQ) and several controls.

Finally, AwesomeScript allows users to easily extend elements with the Extensions feature on every major element type. You simply use <ElementType>.Extensions.Add(newType) where newType is the constructor of a new type. The newType function will be passed a reference to the element as the first parameter. From here you can do whatever you please with the element.


How to read the documentation

Before you go diving in, here’s a few things to keep in mind about my documentation style. Each page will have the name of the object or topic. Objects will be followed by “inheritance”. There is no true inheritance in JavaScript the way most might be used to, but any “inheritance” object that follows an object can be guarantee to have the same applicable documentation.

An example is the Anchor. The Anchor has a few fields, functions and property functions unique to it, such as Href and Target. These are listed on its page, but the Anchor also has things such as BackgroundColor and Bold, these are not unique to the Anchor, but common to all Elements. Thus, the top of the Anchor page will show Anchor > Element. Clicking on Element will take you to the documentation that will also apply to the anchor. This is to reduce redundant writing and to help you find what you specifically want.



So far, the core of AwesomeScript (Awesome.js) has been thoroughly tested on 4 major browsers:

Google Chrome

FireFox 4

Internet Explorer 8 and 9


Older browser may have issues and are not guaranteed to be compatible. Awesome was designed to take advantage of only current day browsers that are easily and widely available. This is a bold move and the company I work for has even pushed its clientele to move forward and use the latest browsers rather than spending copious amounts of development time to cater to the small group that refuses to use the latest software.

Last edited Jun 15, 2012 at 5:50 PM by dahrkdaiz, version 36