Archives
-
Sticky notes plugin for Visual studio 2008
My good friend Pablo Galiano has released a pretty cool plug-in for Visual Studio 2008, Sticky Notes. In a few words, this extension allows you to attach sticky notes to your code, which can be personal notes (Only visible to you) or team notes (visible to the entire team).
-
Some issues added in codeplex for the WCF REST Starter kit
I just created some issues in codeplex for the features I discussed last week in these two posts:
-
Testing WCF REST Services
Many of the WCF services that we build today rely on the WCF context (OperationContext and WebOperationContext) for performing different things, specially REST services where the context is necessary for settings and getting Http status codes or headers. The fact that the WCF context does not expose interfaces or base classes complicates the unit testing a lot. In this sense, I like the approach taken by the ASP.NET MVC team, all the classes exposed by the HttpContext as properties are base classes, so they can be easily mocked.
In order to test a WCF service with what we have today, we have to either test the service as a black box (integration tests, which requires a lot of plumbing code to setup all the WCF infrastructure for the test, channels, host, client, etc) or create some wrappers to encapsulate the WCF context behavior, as I mentioned in this post "Unit tests for WCF services" -
Adding Conditional Get Support to the WCF REST Starter kit
Some weeks ago, I discussed how important "Conditional Get" can be for some scenarios, specially when we want to make a better use of the network traffic.
-
Dynamic Content Type - A nice to have feature for the WCF REST Starter Kit
One of the missing features in the WCF web model is the ability to have a single operation definition and switch the content type for the response according to some runtime setting (Which could be the Accept or Content-Type request header for instance).
-
WCF Workflow services in business applications
It's pretty interesting to see how useful workflow services can be sometimes, specially for business applications that require orchestrating several back-end services calls.
-
My durable WCF RESTful calculator
A durable service in WCF is by a definition a service that can persist all its internal state across calls in some durable storage. For every operation, the service state is retrieved from the storage, the operation is executed and finally the state is persisted again in the storage. Therefore, there is not need to keep the service instance idle in memory while waiting for client calls. It is equivalent to a long run session, which make this feature something ideal for long-running processes like workflows (In fact, workflow services are mount on top of this feature),
-
Open Source alternatives in .NET for building RESTful services
Usually all my posts about REST are about WCF or mention this technology in some parts. Today, I decided to take a different approach and discuss some of the projects available today for building REST services, Resourceful and Dream framework (Both available for mono as well).
It is worth mentioning however that the WCF team has made an excellent work introducing the new Web Model in .NET 3.5, it has definitively helped a lot to adopt this kind of service in the .NET platform. In my opinion, there are still some aspects in WCF that could be improved, -
Using the WCF OAuth channel with an ADO.NET service
As I promised in my previous post "OAuth Channel for WCF RESTful services", it is now time to show this new channel in action with a real service. To make this sample more interesting, I decided to base this implementation on an ADO.NET service that provides information about contacts.
-
OAuth channel for WCF RESTful services
While OpenID and WS-Federation focus on delegating user identity (or a collection of identity claims), OAuth was designed to address a different and complementary scenario, the delegation of user authorization. In few words, OAuth allows a client application to obtain user consent (as access tokens) for executing operations over private resources on his behalf.
-
Routing to the right workflow service instance through URI templates (REST workflows part III)
Continuing from my previous posts "REST and Workflow services play well together I" and "REST and Workflow services play well together II", in which I created a new binding to send the workflow context as an http header, I've applied some modifications to that sample to support also routing through URI templates. This is very helpful for scenarios where client applications are not necessarily aware of the existence of a workflow services on the other end, so the context information is reconstructed from the resource URI using Uri templates.
-
Conditional Puts in REST
Conditional puts is a technique generally used in a REST architecture to inform clients about possible conflicts when multiple updates are performed simultaneously over the same resource version. It basically works as fist-write / first-win approach, a client can only commit an operation only if the underline resource has not changed in the meanwhile, otherwise it may receive a http conflict error.
-
Adding documentation to WCF Restful services with the REST Starter Kit
Automatic documentation is another cool feature introduced in the WCF REST Starter kit. While documentation is an important aspect in the development process, unfortunately there is not an standard mode or guidance yet about how this should be done for REST services. This new feature comes to help a little in this aspect of the process.
-
Using SqlCache dependencies with the new WCF WebCache attribute (REST Starter KIT)
Let's begin from a hypothetical example that we want to publish a simple product catalog as an ATOM feed. The product table schema in our database was initially designed as follows,
-
REST and Workflow services play well together - Part II
In my previous post "REST and Workflow services play well together", I mentioned that Http Cookies were one of the built-in mechanisms for transferring the workflow context across calls between the client and the service. While cookies work well for http services, from my point of view, simple Http Headers naturally fit better in a REST architecture. As consequence, I decided to extend the WCF channel stack to support a new a custom channel (Or custom binding) for transferring the workflow context as a http header.
-
REST and Workflow services play well together
REST is not just about CRUD interfaces for your services, a complete long-running workflow can be modeled through the basic verbs as well. As my friend Jesus mentioned, the article "How to get a cup of coffee" represents an excellent source about this topic.
-
Conditional gets in REST
According to the Http specification, any Http GET request should be idempotent and safe. In this context, these principles have the following meaning:
-
Codecamp Buenos Aires 2008
The next Microsoft Codecamp will take place in Buenos Aires on Saturday, October 4th.
-
Implementing an identity provider and relying party with Zermatt and ASP.NET MVC
Zermatt is the framework recently released by Microsoft to develop claim-aware applications. You can find some announcements here and here.
-
Dependency injection made easy for the ASP.NET MVC
I decided to write this post to show how cool is Autofac for doing dependency injection in the ASP.NET MVC framework. Autofac, for me the Moq stepbrother in the dependency injection arena because of its very-easy-to-use fluent interface and nice support of lambda expressions, comes with a built-in ASP.NET module to automatically intercept the creation of the controllers and pass the required dependencies to them, the only thing a programmer has to do is to provide instances of those dependencies or expressions to build them.
-
Combining JQuery Validation with ASP.NET MVC
One of the most nicest things about JQuery - in addition to the powerful mechanism it provides to manipulate the HTML DOM - is the great number of very useful plugins available out there.
-
WCF - Issue with Secure Conversation in Web farms
While I was working for one of my customers, we ran into a very strange problem when they tried to deploy some WCF services in a web farm using cookie sessions (In order to enable secure conversation in this kind of scenario, cookies must be used to track the state of the Secure Conversation Tokens).
-
Microsoft Technight - Buenos Aires
Tonight, Daniel and I will be presenting a session about "synchronization on the web" in the Microsoft Technight event (Microsoft offices in Buenos Aires).
-
Streaming large content with WCF and deferred execution
I will use this post to discuss an scenario that you may run into while working with WCF, a service that returns a lot of objects (Or large data) to the client applications. This scenario is not about transferring files, that is a completely different story, and I already discussed it some time ago in another post.
-
Unit Tests for WCF (and Moq) Part II
-
Unit tests for WCF (And Moq)
As you may know, testing WCF services is not as simple as referencing a service implementation and start writing unit tests against it. If the service we want to test has a high dependency with the operation context, which is an static class, testing that service can be a very complicated task.
-
Overview of FeedSync support in the Microsoft Sync Framework
If you have not heard about "FeedSync" yet, it is the official name of an open and interoperable standard for representing synchronization metadata in a XML format. This specification was formerly called by Microsoft as "SSE" (Simple Sharing Extensions), and its name was changed to "FeedSync" prior to the first release version.
-
Federation Over TCP With WCF
One of the discussions that we had during the last summit with the rest of "Connected Systems" MVPs was the possibility of supporting a Federation Scenario over TCP in WCF. For many of us that scenario was possible in theory, but unfortunately no documentation or samples existed to support it. In fact, WCF only comes with pre-built binding for federation scenarios, the "WsFederationHttpBinding" binding, which is completely tied to Http.
-
My first MVP summit
As a MVP rookie, the only thing I can say is that the event met all the expectations I had before traveling to Seattle, the wait was worth it. I could attend a lot of interesting sessions about WCF, WWF, and OSLO among others, which gave me a complete picture about where Microsoft is headed in the future with respect to Service oriented applications.
-
Windows Live Contacts API
With the boom in social networking, many web sites have started offering new tools for building or expanding your initial network of contacts.
-
MVP Again 2008!!!
I am so excited, this is third time I received the Microsoft MVP award. Thanks to all people involved in the evaluation process and my MVP lead Fernando Garcia Loera.
-
Authenticating users with Supporting Tokens in WCF - Binding Extension
A couple of months ago I described a useful authentication pattern for Web applications based on supporting tokens, one of features provided by WCF. After that, Dominick Baier wrote a nice and intuitive article showing this pattern in practice with real code examples, something I could not include in my last post for time reasons :(.
-
Single Sign-On scenarios with Federation
Before reading this post, if you know the basic concepts and ideas behind the implementation of an STS with WCF, go ahead and jump to the next paragraph. Otherwise, I recommend you to read the following post Implementing a Secure Token Service with WCF first.
-
WCF - Syndication Extensions
Syndication support was one of the nice features introduced in the latest WCF drop (3.5). At first glance, I can say the APIs are great, allowing you to write a syndication feed in matter of minutes without worrying much of some underline implementation details pertinent to RSS or ATOM.
-
Authenticating users with Supporting Tokens in WCF
A web application used by a great number of users calls a Web service by sending messages across a network, sometimes through one or more intermediaries. The web service needs to identify the user logged in the web application somehow to update data or initiate a business processes. Some of the data within the messages is considered to be sensitive in nature so it need to be protected.