More work on .NET Wrapper Controls for ExtJs

As I mentioned in my previous post, I've started implementing some .NET wrapper controls around the ExtJs javascript toolkit to make it easy to use in ASP.NET and especially in mojoPortal.

So far I've implemented ExtPanel, TabPanel, Tab, SplitPanel, and Viewport server controls. I just updated this site  with my latest code and created a ExtJs Complex Layout Demo page using my controls. I spent some hours thrashing before I got it working but its very fun implementing these widgets once you do get them working it seems like magic. The layout possibilities are just awesome. I love the way you can collapse any panel to hide it and can resize them by dragging the borders.

Of course I'm sure I will continue improving these controls and will undoubtedly find bugs when I start trying to use them for real applications but they will get polished up as I use them for real features. I'm just trying to get some useful baseline proof of concept implementations working now.

I found a .NET project for ExtJS this morning but it depends on the MS AJAX framework. Although we can use the MS AJAX framework in mojoPortal, I'm choosing to implement mine without that dependency. I'm also choosing not to embed the javascript in the dll but instead just have a setting to the base path for the ext javascript files. I do see the convenience of embedding but I also see that putting a lot of javascript inside a dll increases its size and dlls have to be loaded into memory on the server which is probably not a problem on beefy machines but in shared hosting with limited resources its more optimal in my opinion not to have it in the dll.

I'll be posting more demo pages as I complete the wrappers for more ExtJs widgets.

Comments

Tom

re: More work on .NET Wrapper Controls for ExtJs

Saturday, November 3, 2007 11:33:37 AM

re: More work on .NET Wrapper Controls for ExtJs

Saturday, November 3, 2007 12:10:14 PM

If you're having any trouble posting a comment, please clear your browser cache. When I updated this site it got the new version of FCKeditor and you may have trouble if the old javascript files are cached on your machine.

Cheers,

Joe

re: More work on .NET Wrapper Controls for ExtJs

Saturday, November 3, 2007 5:57:20 PM

@Joe: Are you wrapping Ext 1.1 or 2.0?

re: More work on .NET Wrapper Controls for ExtJs

Saturday, November 3, 2007 6:10:16 PM

2.0

Joe

Tom

re: More work on .NET Wrapper Controls for ExtJs

Sunday, November 4, 2007 8:52:40 AM
Tom

re: More work on .NET Wrapper Controls for ExtJs

Sunday, November 4, 2007 8:54:33 AM
Aaron

re: More work on .NET Wrapper Controls for ExtJs

Sunday, November 4, 2007 3:57:14 PM

For some reason this post got me really exited with possibilities.  I have a couple questions.

Do you plan on having dependencies on mojoportal?

More importantly, when so you paln on sharing the bits?

re: More work on .NET Wrapper Controls for ExtJs

Sunday, November 4, 2007 4:50:20 PM

I'm building the Ext controls in the mojoPortal.Web.Controls project which is a separate VS project and can be used outside of mojoportal with no dependencies on the core of mojoPortal, though my primary goal is to use these controls in mojoPortal so I will be implementing the features I need as I need them I certainly encourage others to use them.

The bits can be obtained at any time from svn trunk. I do typically release the mojoPortal.Web.Controls as a separate download to make it easy to use outside mojoPortal so whenever I make the next release of mojoPortal I will also make a release of the controls. A release its just a pre-compiled package, anyone comfortable building their own source code in VS can get the code at any time.

I did a good chunk of work today in refactoring and added a starter implementation of the ExtGrid. I'm merging this work to trunk right now and it should be available in the next few hours in svn trunk.

Cheers,

Joe

re: More work on .NET Wrapper Controls for ExtJs

Saturday, November 10, 2007 10:43:33 AM

Interesting project I must admit all though I think you will experience problems. Mostly because ExtJS is written to do all it's stuff on the client-side which I think might be difficult to fit in with a "server-centric" model of WebControls...

Believe me, I've tried... ;)
Not with ExtJS though but with another library called PWC (Prototype Window Control) which basically proved impossible to wrap in an intelligent way without loosing all the benefits of either the server and/or the client...
It was in fact my "first attempt" of starting Gaia Ajax Widgets...

BTW, I happen to work for a competitor of ExtJS which have a library called Gaia Ajax Widgets which already works 100% on Mono. This is in addition a GPL library(Dual Licensed), have you tried our library?

re: More work on .NET Wrapper Controls for ExtJs

Saturday, November 10, 2007 11:06:59 AM

Hi Thomas,

I can't use anything licensed under GPL as it is not compatible with CPL due to the viral nature of GPL. LGPL is ok.

I agree with your point about server side vs client side. Although most of the demos for ExtJs and other javascript toolkits show a lot of example creating everything in the page directly with javascript I think this approach is a very bad idea. It is much better to attach the javscript gui goodness to existing html markup in the page so that if javascript is disabled or not available the page can still function just without all the gui goodness. So I am building my controls this way so they still work even without javascript. It just degrades the ui experience to a more plain but still usabel html ui.

So my approach is to attach ExtJs javascript to markup redered by .NET server controls. This works well but takes a little more care to implement.

This is also an accessibility issue. If a feature cannot function without javascript its not accessible. I am trying to make mojoPortal the most accessible CMS both on the public front end side and in the backend administration and content management side.

Best,

Joe

re: More work on .NET Wrapper Controls for ExtJs

Friday, November 16, 2007 5:57:20 PM

I tried doing something like this when I first started using ExtJs - creating some kind of markup to generate the Javascript. It took about 2 projects and 3-6 months to realize it just made the whole project more difficult to maintain, and did not help that much. I concluded that writing everything in Javascript pretty much as documented is far more efficient, and maintainable in the long run.

re: More work on .NET Wrapper Controls for ExtJs

Saturday, November 17, 2007 6:28:25 AM

Hi Alan,

Well no offense but the completely javascript approach is completely innaccessible. Maybe you don't care about that but did you know that in the UK its illegal to have an innaccessible web site? Did you know that Target was recently sued because their ecommerce site was not accessible?

I'm not writing markup to generate javascript at all. The markup I'm using is plain old html generated by ASP.NET and then I attach the javascript in the usual ways by using ExtJs contructors that receive the ids of the markup elements. Its not undocumented there are some examples and plenty of ExtJs api documentation that helps, but the majority of their examples do seem to use the pure javascript approach which is not accessible because it can't function at all if javascript is not available.

Best,

Joe

Comments are closed on this post.