Project Description
The MVC Contrib for Business Application is a collection of libraries and helpers focused on Business Applications based on ExtJS (using a fluent syntax) connected with server side technologies as Astoria, WCF Rest, etc. It should be also compatible with
WebForms (it does not use user controls, so is compatible with Razor, Spark, etc.)
News: MVC 3 sample available.
How it works
Using a fluent syntax, all ExtJS power can be used to make a functional UI for Business Applications, for example: (this is a MVC 3 with Razor View Engine example, but should work in any MVC version, WebForms and even on CGI, if we provide helpers compatible
with all those technologies)
@using MBA.FluentExt
@using MBA.FluentExt.Ext
<script type="text/javascript">
function btnSomething_Render(button)
{
setTimeout(function ()
{
button.setText("Changed after 3 seconds");
}, 3000);
}
</script>
@X.ExtScript( // Render the following components as a var <id>=new <ctor>(<config>); inside a <script> tag
X.Button("btnSomething") // We are creating a button with id = btnSomething
.Text("MyButton") // This will be the button text
.ToAdvanced() // For some not-so-common config options, we toggle to advanced mode (you can revert this back using .ToBasic()). Notice that this exists only for a simplified intellisense. Both basic and advanced components are the same ExtJS Button.
.Scale(ButtonScale.Large) // An advanced config option to set the button scale
.RenderTo("divContainer") // Render this button to a element named divContainer
.ToBasic() // We can revert to basic button =)
.Listeners( // and add some javascript listeners
Listener.On(
Button.Click, // On click...
Raw.Script("function(){alert('Button click!')}") // ..do something amazing
),
Listener.On(
AdvancedButton.Render, // Advanced events also exists
Raw.Function("btnSomething_Render") // this time we just call a simple javascript function
)
)
)
<div id="divContainer"></div>
ExtJS only supports a few server-side technologies to read/save data: Ajax, WebServices and Direct (kind of WebMethod).
Plans are to do some adapters to make CRUD and Business Code using Ajax to a MVC Action (or WebForm handler), Astoria (ADO.Net Data Services), WCF RIA Services and a custom "make all magically" provider, something like ASP.Net Dynamic Data.
The final idea is to bring all the power of the
ExtJS framework to .net, with full intellisense, documentation, etc., provide various methods of data access (some automatic, some completely user customizable), be extensible and scalable. All that will make the developer focus on the application itself,
not on the framework.
Technologies, Methodologies & etc.
ExtJS: Is, by far, the most complete JS framework for business application UIs. It has A LOT of power and flexibility, but is a pain to use due to its JSON nature (almost impossible to get intellisense for the initial configuration of the components).
It also mixes well with many other frameworks, as jQuery, Yahoo, etc. If you don't know ExtJS yet, try the web site (http://www.sencha.com/products/js/)
Fluent Syntax: There is already some project that use Web Controls to ExtJS, but that wouldn't work in any view engine besides WebForms (ex. Razor). The Fluent Syntax allows a complete intellisense, the documentation (through XML Comments) and usability
in both MVC and WebForms, regardless the view engine choosen.
Extensibility: It will be possible to extend the default components of ExtJS through the Fluent Syntax classes to create user controls without the need to write a single JS line.
Wanna help?
You can help a lot by giving ideas, using the discussion features or assuming on of the
many tasks available =)
(This is a draft. If you find some error, please point it out, as my english is far from perfect (I'm brazilian) =) )