Demystifying The Code

REST in WCF Blog Series Index

As some of you know, I am in the midst of a blog series on REST in WCF.  Further, I have been hard at work on a series of screencasts on the same subject (in conjunction with Ron Jacobs).  My colleague Tim Heuer relayed to me that I didn’t have a single post that we can point a person to that provides links to all of the posts and screencasts.  I will keep this post updated with all of the info:

Blog Series:

[ Read More → ]

REST in WCF – Part VIII (HI-REST – Implementing Delete)

In Thursday’s post (Part VII), I illustrated how to implement insert/update functionality in a HI-REST service operation.  In this post, I will illustrate implementing a delete.  Unlike the previous post, there is little debate how to implement a RESTful delete.  Further, the lessons we learned in the previous few posts will make implementing the delete trivial.  I’m going to start motoring through…

[ Read More → ]

REST in WCF – Part VII (HI-REST – Implementing Insert and Update)

Introduction

In parts I – VI, I illustrated exposing fetch functionality in a LO-REST, AJAX-Friendly manner, as well as in a HI-REST manner.  I further illustrated how to consume both via an AJAX client.  In this post I am going to discuss and illustrate how to implement insert and update functionality in a HI-REST manner.  If you remember back to the point I made in Part I of this series, I suggested that there are many definitions of REST and put forth the idea of a REST continuum.  This is a healthy manner to discuss REST, in that it allows for many interpretations.  If I have learned anything over my years of coding is that there are always many ways to solve a business problem with code.  Not only are there many ways, but there are many correct ways.

[ Read More → ]

REST in WCF – Part VI (HI-REST – Consuming our GET service via AJAX)

In Part V of this blog series I completed the service operation exposed via HTTP GET in a HI-REST manner.  Because the service was exposed via GET and had a representation format of POX, we were able to easily test it using our browser.  That is all well and good for testing purposes, but we are going to need to call our service from a real client, at some point.  We have a variety of choices when deciding upon our clients… We could write an ASP.NET client, an AJAX client, a Silverlight client, a smart client, an office client, etc.  For the purposes of this blog post, I will illustrate how you can call this service from an AJAX client.  By the time I am done with this post, you will have a newfound respect for the client proxy generation functionality exposed by the enableWebScript endpoint behavior (described in Part III of this series).

[ Read More → ]

REST in WCF – Part III (AJAX Friendly Services, Consuming The Service)

In yesterdays post REST in WCF – Part II (AJAX Friendly Services, Creating The Service), I introduced a starter solution containing a few ASP.NET AJAX client library controls.  The starter solution was stubbed out, awaiting the implementation of an AJAX-Friendly WCF service and the client code to call that service.  I then went through and implemented an AJAX-Friendly service, taking advantage of the webHttpBinding and the enableWebScript endpoint behavior.

In this post I am going to implement the client-side code that consumes our service.  You will remember from the last post that Catalog.aspx (the main page in the application that contains the AJAX controls) had a stubbed out method GetData.  This method is called when the page is initialized.  It is also called when the user navigates between pages of products.  It is here that I need to add the code to call my WCF service. 

[ Read More → ]

AJAX Q & A Question 6: Question regarding Page Methods

Question:  In your presentation, you recommended not having web methods inside of ASPX pages in favor of having a centralized asmx web service. Doesn’t that mean every page would have a larger ovehead by having the client code to generate proxies for all methods?
Answer:
Before I begin answering the question, let me set some context around [...]

[ Read More → ]

AJAX Q & A Question 5: How do you add a script reference in an extender control as an embedded resource?

Download the ASP.NET AJAX Extender Sample Code here.
This question is referring to a Webcast on creating behaviors and extenders i did in may.  In that webcast, I created an client behavior by creating an AJAX class that implemented Sys.UI.Behavior.  This simple behavior did an image swap when the mouseover event was fired.  I will leave [...]

[ Read More → ]

AJAX Q & A Question 4 – In methods, how do I validate types of passed parameters?

ASP.NET AJAX has extended Function with a "private" static method called _validateParams for this purpose.  The _validateParams method is used throughout the ASP.NET AJAX client library to validate arguments/parameters.  You are free to use this in your code to validate parameters.  The following is a copy of the documentation for the private method.:
// <summary> [...]

[ Read More → ]

ASP.NET AJAX Client Library Question And Answer Series – Question 3 (How do you create static members and methods on an object in asp.net ajax?)

Question: How do you create static members and methods on an object in asp.net ajax?
Answer:
Members can be defined as attributes (fields) and methods in the context of oo programming.  So, in order to effectively answer the question, I need to illustrate how to create a public static field and method.  Take a look at the [...]

[ Read More → ]

ASP.NET AJAX Client Library Question And Answer Series – Question 2

Question: How does Register Class and initializeBase copy child methods into place?
Answer:
This question is probably referring to a warning I give in most discussions regarding calling initializeBase in the constructor function in an implementing class.  In the following screenshot, CallIt.Components.Employee inherits from CallIt.Components.Person.  The important thing to note from this example is the call to [...]

[ Read More → ]

Next Page »

Demystifying The Code