This project is read-only.
What is DynAjax ?
DynAjax is a development framework based on C# .Net / ASP .Net on server side and Prototype on client side (Javascript useful library) that permits direct call of server side C# methods from client side Javascript.

Who is DynAjax for ?
Every C# / ASP .Net developpers who want to add efficient and easy to use Ajax to their web applications and professional developments (I created it for my own professional needs / use).

What can DynAjax do ?
Imagine you're developping a professional web application and you need to save a text typed by user into the database without posting HTML Form and reloading the entire page. Obviously, you'll use the Ajax technology for that.
What about defining entire XmlHttpRequest (Ajax) request and check the response codes etc. to send data and be sure it has been saved correctly ? it's boring.
With DynAjax, you can save this text via the following JavaScript code (suppose you get a public method called 'saveText' into your class 'myClass' that returns the string "ok" if everything was fine) :

var response = MyClass.saveText(myText);
if (response == "ok") {
--- code here ---

Very simple to use, isn't it ?
Visit Examples page to get a lot of sources / use samples

What kind of data can be returned by DynAjax to client JavaScript ?
Data of almost any type can be returned by server. Actually, data are transmitted in JSON format (an exchange format between JavaScript and other languages, including C# .Net).
This format permits you to exchange following data types:

* Strings
* Numbers (int, decimal...)
* Booleans
* Arrays
* HashTables
* Complex objects (made of Properties, Arrays, HashTables, Arrays of other complex objects etc.)
* "null" value

As you can see, almost everything is possible: you can, for example, if you need to develop a site like eBay, call a method that return a list of Product instances to display on user search - you just have to iterate on list and have access to all Product instances properties as you were in C# code.
Please visit Json description site if you want further informations about this format.

What about security ?
DynAjax provides security checks on all methods you can call remotely.
Actually, each method has to be defined into an XML configuration file and you can specify wether it needs - or not - authentication on your application.
Thus, hackers (for example) aren't able to call remote methods without granted access.

Is it difficult to install / set up DynAjax into my web application ?
No, DynAjax is based on 7 files :

* DynAjaxHandler.aspx and DynAjaxHandler.cs - the Ajax handler that will receive and dispatch all DynAjax calls
* dynAjaxScript.aspx and dynAjaxScript.cs - the dynamix JavaScript part of DynAjax (it's JavaScript, though its extension is .aspx)
* prototype.js - the prototype framework
* Newtonsoft.Json.dll - a Json library for .Net
* dynAjaxConfig.xml - the DynAjax configuration file (in XML format)

These 7 files must be copied into your web application directory, and only the dynAjaxConfig.xml needs to be updated to suit your needs.
Pretty easy, no ?
Take a look at Web application setup page for more informations.

How do I configure my methods definition ?
You can visit this Wiki page: configuration, everything's explained.

Who supports this framework ?
Me (Mr Benoît BEGUIN) and my company Feel free to contact us at to get informations, report bugs or suggest new features.

Last edited Feb 17, 2008 at 10:14 AM by magicben, version 1


No comments yet.