Wednesday, April 27, 2011

Consuming WCF / ASMX / REST service using JQuery

(...) In this article I will explain how to consume a WCF / ASMX service using jQuery. The scope of the article is limited to creating & consuming different kind of services using jQuery. I have segregated this article into 7 topics based on the service consumption.

Calling ASMX Web service using jQuery
Calling WCF service using jQuery and retrieving data in JSON Format
Calling WCF service using jQuery and retrieving data in XML Format
Calling WCF service using jQuery and retrieving data in JSON Format (pass multiple input parameters) & ( Get multiple objects as output using DataContract)
Calling WCF service using jQuery[ Get Method] and retrieving data in JSON Format
Calling REST based WCF service using jQuery
Streaming an image through WCF and request it through HTTP GET verb..
(...)

http://www.c-sharpcorner.com/UploadFile/sridhar_subra/116/

Wednesday, April 6, 2011

Remedial JavaScript

Direct from the master :-)
(...)The JavaScript Programming Language suffers from premature standardization. It was rushed to market and then instantly had a huge user base and, soon after, a formal international standard. There was no time during its development to polish the language. As a result, it still has some rough spots. (...)


I specially like

if (!String.prototype.supplant) {
   String.prototype.supplant = function (o) {
      return this.replace(/{([^{}]*)}/g, 
           function (a, b) { var r = o[b]; 
                return typeof r === 'string' 
                    || typeof r === 'number' ? r : a; } );
      }; 
   }

http://javascript.crockford.com/remedial.html

Tuesday, April 5, 2011

Singleton Design Pattern

(...)The intent of the Singleton pattern as defined in Design Patterns is to "ensure a class has only one instance, and provide a global point of access to it".(...)http://www.dhtmlkitchen.com/learn/js/singleton/

Essential JavaScript Design Patterns For Beginners

(...)A pattern is a reusable solution that can be applied to commonly occurring problems in software design - in our case - in writing JavaScript applications. Another way of looking at patterns are as templates for how you solve problems - ones which can be used in quite a few different situations.
(...)

http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/

JavaScript Module Pattern: In-Depth

(...)The module pattern is a common JavaScript coding pattern. It's generally well understood, but there are a number of advanced uses that have not gotten a lot of attention. In this article, I'll review the basics and cover some truly remarkable advanced topics, including one which I think is original.(...)

http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth

Sunday, April 3, 2011

Music mashing with YouTube, YQL and Open Data Tables

(...)Grab the top 20 chart singles from the BBC web site, look up each song on YouTube and get the most popular matching videos. Show them in the chromeless player and set it so that they play automatically and users can skip ones they don’t like.(...)

http://www.bassett-jones.com/music-mashing-with-youtube-yql-and-open-data-tables/