Skip to main content

Posts

Showing posts from November, 2011

What! C# could do that!! @ironshay demoing my ElasticObject implementation in @LIDNUG presentation

This is cool, Just found that @ironshay has featured my ElasticObject in his @LIDNUG web cast, to show C# dynamic features.Elastic Object is a C# dynamic object implementation I’ve done some time back, which isAn easier, fluid way to work with data formats – like XML and JSON. Presently, we’ve some support for XML. Cleaner code though it is duck typed A hierarchical way to maintain loosely typed data.ElasticObject post and source code here, and pretty cool presentation from Ironshay (embedded below).

KsigDo Task Pad – Real-Time UI View Model syncing across users with ASP.NET, SignalR, Knockout MVVM and EF

Real time data syncing across user views *was* hard, especially in web applications. Most of the time, the second user needs to refresh the screen, to see the changes made by first user, or we need to implement some long polling that fetches the data and does the update manually. Now, with SignalR and Knockout, ASP.NET developers can take advantage of view model syncing across users, that’ll simplify these scenarios in a big way, with minimal code. This post discusses how to implement a real time to-do pad, which will sync data across users accessing the application. This means, users can make changes to their tasks (add/remove/update etc), and other users will see the changes instantly. The focus is on the technique, I’m not trying to build a fabulous user experience here.What is KsigDo?KsigDo = Knockout + SignalR To-do app.Code: Source code is here in Codeplex, keep it handy.  Update: Michael Dunlap modified the KsigDo code to work with the new version of SignalR. Available Here in …

HTML5 is on a killer spree, Web Sockets May partially “kill” HTTP as well

We’ve already seen HTML5 killing few technologies on the presentation side – Adobe Just killed Flash for Mobile, and Microsoft ‘Positioned’ Silverlight as a tool for LOB apps and Phone apps instead of a cross platform presentation layer. As most organizations are now focusing on HTML5 as part of their next gen strategy for what ever reasons (mainly cross platform), it is pretty obvious that there is going to be wide spread adoption from all major user agents – and more importantly, a lot more tooling and frameworks will evolve for developing HTML5 applications (You might have already explored previews like Expression Blend for HTML5 if you are in the Microsoft World, along with improved support for HTML5 in VS). The evolution of HTML5 will definitely bring in a radical shift in the way we develop web applications as we have already seen – and a nice little part of the parcel is Web sockets - which allows you to implement full duplex TCP based communication between the user agent (brow…

Implementing Chain of Responsibility Design Pattern in C# using Managed Extensibility Framework (MEF)

This post is about implementing Chain Of Responsibility design pattern, and few possible extensions to the same. If you are new to design patterns, I suggest you should start with Practically Applying Design Patterns  – Thought ProcessComing back to Chain of Responsibility - If you have a scenario where you need to chain multiple handlers to handle an incoming request or command, you better use Chain Of Responsibility. A typical example is your girlfriend requesting you something –  If she is requesting/commanding you something like “Do you want to come with me for my best friend’s Bachelorette party?”, you will handle it directly. But if she is requesting/commanding you some thing like “Buy me a Porsche”, you say “Sorry Honey, I don’t have the money. Better you ask your dad for this, I’ll call him for you” –i.e, you pass the request to the next handler, in this case your girl friend’s Father. To sum up, in the above example, your girl friend is the client who is making the request, a…

The CQRS dilemma and related random thoughts

I was very skeptical about CQRS (Command Query Responsibility Segregation) some time back, how ever after working on a CQRS implementation for the past few months for a customer in the telecom domain, I see better light. For some reason, there is a wide spread perception that CQRS is only for complex domains, how ever I think any true business system can benefit from CQRS principles. Here are few quick thoughts, mostly rants.What is CQRS?The basic idea of CQRS is pretty simple, this is from the CQRS summary post by Greg YoungStarting with CQRS, CQRS is simply the creation of two objects where there was previously only one. The separation occurs based upon whether the methods are a command or a query (the same definition that is used by Meyer in Command and Query Separation, a command is any method that mutates state and a query is any method that returns a value).When most people talk about CQRS they are really speaking about applying the CQRS pattern to the object that represents the…