Skip to main content

Posts

Showing posts from January, 2012

WCF REST versioning, JSON and Dynamic objects

As everyone knows JSON is a very light weight form of transport when it comes to the web, you can respond and consume JSON using WCF REST services, I have blogged about this in one of my earlier posts in 2008, but last month I got to work on this... WCF makes things very easy, if the client sends a JSON formatted string, WCF infrastructure will de-serialize this into a custom type that you have specified in your operation contract. For an example... [WebInvoke(Method="POST"....)] public void Save(Student student){} so if you send a JSON string like this on your POST body {Name : "Nairooz Nilafdeen", Age : 26} ...the WCF infrastructure will de-serialize the JSON string into the Student object (as long as the JSON key-value matches the properties in the Student type).. Now, the problem with this approach is when you send a JSON string that contains an additional property that is not available in the Student class, now WCF will not be able to de-serial...

Being a good Leader

I was clearing some of the files from the trash when I saw a few notes that I took for a leadership training...here I am writing a few pointers just to remind mt self... - Be confident on what you do. - What are your strengths? make a list, what are the things people have complimented you on - What are your weaknesses? Improve those - Master something, dedicate yourself to learning something new - Do the thing you think you cannot do - Do things other dont want to do, take boring tasks - Dont stop once the job is done, do more research see if you can improve the solution - Set goal for your own task - Dress like a leader - Admit mistakes, be honest - Keeping promises - Work on that temper - Dont critisize everything - Pay attention to what your peer is saying, stop what u are doing and listien to him, make eye contact - Dont interrupt your peer when he is saying something, let him finish, you lisitn to him - Dont try to impress the speaker by saying completeting what he is about to say...