MS-Ajax Client Javascript integrated within the Aptana IDE
Aptana has a cool Eclipse-based IDE for writing AJAX-y websites. It's got built-in support, via plugins, for most of the major Javascript Libraries. At the core of ASP.NET's AJAX support is the Microsoft AJAX Library 3.5 (direct download), a collection of Javascript classes that you can use in any application, whether it uses ASP.NET or not. The library is licensed under the Ms-PL, the least restrictive Microsoft license. It's the "do what makes you happy" license.
Anyway, I wanted it integrated into Aptana's Studio, so I took the client libraries and bundled them into a JAR file as an Aptana (Eclipse) plugin. You just download this one JAR and save it in the Aptana\Plugins folder and when you make a new Web Project, Microsoft Ajax 3.5 will appear in the list.
When you select (it's a checkbox, so you can add multiple libraries to one project) you'll get the Javascript and "intellisense" for the libraries, as well as a Hello World Sample...
...as well as integrated with the online Ajax Documentation
I think that JS components like MS-Ajax should be easily accessible in other IDEs that aren't Visual Studio, like Aptana.
The one big feature that I didn't have time to do was full Intellisense (Aptana calls it "Code Assist") as it'll require a custom ScriptDoc XML file to describe each method within the libraries. This means that you'll not get the extra documentation tooltip, but I'm working in it.
Bertrand has a post explaining what our format for JS metadata looks like. The Open Ajax Alliance has an IDE Charter that describes an interoperable way for IDEs to interact with libraries, publish metadata,etc. Microsoft joined the Alliance last year and passed the Open Ajax Interop Test last September. Bertrand has a whole category dedicated to Open Ajax. When these specs gets better figured out, we'll make sure this gets supported. I may write a tool in the short term to convert between our format into Aptana's if folks ask. Eventually, however, everyone will use the standard (after it comes out, you know how standard take time).
I've been talking with Aptana to get this support built in and possibly auto-downloadable, but for now, if you're running Aptana and you'd like MS-Ajax support, save this JAR (com.ajax.ms.3.5.21022.8.jar) into Aptana's plugin directory and restart the IDE.
Later, I'll show you how to do the inverse with Visual Studio, integrating Prototype and JQuery.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
@Joe, I somewhat agree, but I use JQuery and MS Ajax together as I found each has their own benefits. Overall, I use MS Ajax to make Ajax calls, but handle the results using JQuery.
JQuery
- easier to manipulate the Dom
- much easier to find your elements
- con: tedious Ajax calls from and to the .NET environment
MS Library
- easier to do ajax calls
- default authentication service and profile services
- Allows oo features for better organizations namely, namespace, inheritances, reflections and etc.
Like shown on Brennan's blog here. Sounds like he may have done it manually?
I like the way he uses a separate file so you don't have to update the actual source. This also allows for regeneration as the source changes.
I would love to hear your plans on generating these files.
Mike
Comments are closed.
P.S. I would ask for YUI too, but I'll just wait until after Microsoft acquires Yahoo! for that one. ;)