I disappeared into some new technologies...

by ishaih 5/15/2008 4:29:11 AM

I've been MIA from my blog for a while, too many new technologies and libraries that I want to learn...

I've been playing around with upgrading the application the AJAX search page sample was based on to use WCF and EXTJS.

The WCF part was easy, it's not that different from ASMX when you want to do basic stuff. The main difference is you have to create a data contract, which can be done by simply adding a [ServiceContract] tag to the class and [OperationContract] tags to each exposed method.
The better way is to create a separate interface that will be used for the data contract, but if you want to upgrade an existing ASMX service, you might want to take the easy way out...
The other thing you have to do is add the serviceModel section to the web.config.

The cool thing about WCF is that I no longer have to worry about how the data is converted to JSON, with WCF it's simply a definition in the web.config, so changing between XML and JSON can be done at any time without changing code and deploying it. Also, you can have more than one access point to the same class, so you can actually return both formats from the same code.

Changing my code to WCF took a couple of hours, half of it to learn about WCF basics and the rest to copy over the code to a new class, but WCF can go a lot further with it's extensibility.

WCF also let me create the javascript proxy classes including classes for the data contracts (server side objects I want to send to and from the client side). So I don't need to use the Asp.Net AJAX GenerateScriptType anymore.

EXTJS - An AJAX and UI JavaScript Library
This is currently the best UI library out there. initially I wanted to use their grid instead of the WebFX grid I've been using, but after a short time playing with it I decided to try and create a while application with extjs for the entire UI.

This library supports using other libraries for the communication layer, so if you're already using prototype or jquery, you can use extjs just for the UI components. It does have it's own AJAX implementation, so you don't have to use other libraries and if you don't need anything else from these other libraries, it's best not to use them (too heavy and eventually too many libraries will have to mean conflicts)

So I started a new project without the MS Asp.Net AJAX. Passing objects between the client and server was easy with the WCF data contracts generating javascript classes for me, which is why I haven't blogged for a while.

the extjs community is excellent, there are a lot of additional UI controls and plug ins created by the community.
One of them is a form generation class that creates a form from some json. I created something similar for my search pages (with a lot more layout support that was required by the specs). The class is called MetaForm you can find it at Saki's extension page along with some other great controls.

I will eventually return to that series of posts and recreate it, if I don't jump to some other technology by then (I have been thinking about doing something similar with silverlight, we'll see where that goes).

As always, web technology is moving fast and new things are coming out all the time, it's hard to keep up...

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Comments

6/3/2008 7:27:12 AM

RJ

This is exactly what I'm doing this week... could you post a small demo project of extjs and MFC? I just want to see something displaying and updating a DB using the new webservices. This will help my learning curve greatly.. thanks

RJ us

Powered by BlogEngine.NET 1.3.1.0
Theme by Mads Kristensen

About the author

Name of author Ishai Hachlili
I've been developing web applications using Microsoft technologies for over 10 years. This is my way of doing things, it might be a little different...

E-mail me Send mail

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Pages

    Recent comments

    Authors

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2010

    Sign in