Showing posts with label REST. Show all posts
Showing posts with label REST. Show all posts

Wednesday, August 19, 2009

Power of WCF

WCF (Windows Communication Foundation) is Microsoft's unified programming model for building service-oriented applications that communicate across the web and the enterprise. WCF clearly demarcates development and implementation. There are various Hosting options available and is independent of the run-time environment in which the service is deployed, they are:-
  • Self-Hosting in a Managed Application
  • Managed Windows Services
  • Internet Information Services (IIS)
  • Windows Process Activation Service (WAS)
All the development part lies in the code while the implementation like the binding can be handled in the config file as Microsoft has abstracted a lot of plumbing work reducing the implementation time. By this way developer can concentrate on core logic and WCF takes care of data delivery in the most reliable, secure and high performance fashion depending on situation.

WCF has an integrated Logging mechanism that helps you log traces. In other technologies developer has to write custom solution but in WCF, all that you need to do is to enable trace by changing the config file.

To achieve security mechanism in WCF you have 3 implementation choices:

  1. Transport: Transport security depends on the mechanism that the binding you've selected uses.
  2. Message: Message security means that every message includes the necessary headers and data to keep the message secure.
  3. TransportWithMessageCredential : This choice uses the transport layer to secure the message transfer, while every message includes the rich credentials other services need.
After the launch of modeling edition I feel it gets easy to delegate work in a team. An architect can create a Data Contracts/Relationships, Message Contracts and Service Contracts. After that only the facade layer has to be made with some tweaks here 'n' there. In this way lot of architecture intricacies can be hidden from developer.

WCF does not replace MSMQ, COM+ or Web Services, it provides a declarative infrastructure for all forms of communication to and from the Windows platform. Using WCF, communications happen at designated service endpoints, and an endpoint can implement different protocols (such as Web Service, WS-* SOAP style services), encodings (such as Text, Binary & MTOM), and transports (such as MSMQ, Http, etc.).

With .net 3.5, it becomes even easier to provide RESTful endpoints (JSON, POX, RSS and ATOM). So the real powerful leverage shall be building services that can be consumed by a ASP.net web client as JSON while simultaneously being accessed by a business partner through a php web client using the SOAP protocol (with its full complement of WS-* implementations such as WS-Security, WS-ReliableMessaging, etc.)

Thursday, July 9, 2009

Php consuming WCF Service

At last now I have Php client talking to WCF Service... Now this is something special, Technology should always be platform and language dependent.

I have a WCF Service consumed by ASP.net client RESTfully and the same service is talking to php client in a SOAP way.

Perhaps i am not an expert in wcf right now so am more thrilled ;) Just a stepping stone.

Wednesday, June 24, 2009

WCF-JSON with ASP.Net-Jquery Client

As i have already shared that i have been working on making a wcf service layer and that shall interact with open source UI layer... Has a milestone now, earlier we used to make a wrapper layer which used to act as intermediate layer cuz i dint wanted any change in actual HOST project and behaviors of the same.

Now we shall get rid of old JSON layer and our new RESTful host will start serving us.

Tuesday, June 23, 2009

Ideas and More Ideas!!!

I want to make a framework where i make wcf based REST services and consume it in various UI framework including php, jsp Etc, depending on the situations. I have already started the basic framework...

I feel that shall be the best use of REST... I need to start working harder now.

Friday, March 6, 2009

Mission jQGrid is Complete!

So at last everything is complete with jQgrid. Along with busy delivery pipeline i managed to clear all the remaining hurdles and now Grid talks to WCF Services, passes JSON Stream has following features.

-- Multi select (Check box)
-- Master details
-- Grid as sub-grid
-- Add/Edit row
-- UI Date picker
-- Searching data
-- Inline Editing
-- Controlling server errors
-- Multiple toolbar search
-- Search Big Sets

Right now the REST services are talking to our local wcf services. Will make a demo thing and post soon. This surely helped me a lot, jQGrid Help.

Tuesday, January 13, 2009

JqGrid with WCF REST Service

We have WCF services implemented for thick and thin clients. But as the dynamicity increased we started to wrap those services around REST based WCF Services majorly for Web Client. Now am slowly getting rid of any ASP.Net code written at client. I know its pretty mean of me, but I don’t feel the sense to do it.

I am waiting for ASP.Net MVC to be integrated nicely in VS and then probably think of something in ASP.Net. There might be a situation where in we have client totally independent of any web technology :) That will be powerful for sure. Future is WCF Services and client rich applications that how I look at it. 

I started to implement my Services with jqGrid yesterday and could complete the services part and Client Grid in hours but it took time to integrate it all and see my data rendering in Grid. I won’t blame on poor documentation of jqGrid but yeah it took 6-7 hours for me to implement the same. I can't whine now cuz its working and working fine now. I found no place where this combo was even attempted. So wanted to contribute for the community as well...

I will upload the whole solution after some cosmetic improvements. If someone needs any help, post comments.

Script Code -------------------------------


HTML-------------------------------------------------------

    


    


REST Service -----------------------------------------------

 [ServiceContract(Name = "CandidateService", Namespace = "JsonCandidateService")]  

    public interface IJSONCandidateService

    {

        [OperationContract]

        [WebInvoke(Method = "GET",

                 ResponseFormat = WebMessageFormat.Json,

                 BodyStyle = WebMessageBodyStyle.Bare,

               UriTemplate = "Candidates/{criteria}"

        )]

        JQGridCandidatesResponse GetAllCandidates(string criteria);

    }

Thats it for now, shall upoad the full solution soon. Happy jQuerying :)