Tutorial Using jQuery with ASP.NET

 

Over the course, various jQuery Plug-Ins will be used and discussed along with gradual integration with traditional ASP.Net 2.0 web applications components (i.e. Master Pages, User Controls, and ASP.Net AJAX).

Yahoo! Search BOSS C# Implementation

 

Written by Scott Watermasysk

image

Implementation supports all of the Boss API except for spell checking. This includes Image, News, and Web searches. Search results are returned in three formats: Xml, JSON, and an object set.

Here are a couple examples.

Example 1: Search for “Telligent”:
var result = new WebSearch(“BOSS_ID”).Query(“Telligent”).Get();

Example 2: Search for “Telligent” and limit the results to 5 and get the second page of results.
XElement result = new WebSearch(“BOSS_ID”).Query(“Telligent”).Take(5).Skip(5).GetXML();

Example 3: Search for “Telligent” but limit it to it to a couple of sites:
string json = new WebSearch(“Boss_ID”).Query(“Telligent”).Site(“simpable.com”).Site(“telligent.com”).GetJSON();

Example 4: Search for “Telligent” mentions in the news for the last week.
var result = new NewsSearch(“Boss_ID”).Query(“Telligent”).Age(7).Get();

Example 5: Search for “Telligent” images:
var result = new ImageSearch(“Boss_ID”).Query(“Telligent”).Filter(false).Get

Download Assembly and Source.

Via Yahoo! Search BOSS C# Implementation : Simpable

Dynamic Data in a Nutshell

 

What is ASP.NET Dynamic Data?

image

http://www.asp.net/dynamicdata/

Fundamentally, Dynamic data is new controls for DetailsView, FormView, GridView, or ListView controls along with a lot of meta-infrastructure classes to make it possible. The design uses convention over configuration in a number of places, and this marks, IMHO, the recognition of a simpler way to do things.

If you can point at one thing in Dynamic Data and say, “that’s it!”,  it’d be DynamicControl. it’s a control that takes metadata from your Database model (LINQ to SQL or LINQ to Entities in v1, other POCOs (Plain Old CLR Objects) or ORM’s possibly in v.Next) and selects from a FieldTemplateUserControl.

Here’s a comment from Peter Blum left on ScottGu’s Blog.

Dynamic Data introduces a new web control called DynamicControl. It can be used in FormView and ListView controls to provide a UI based on database-level schema. When using GridView and DetailsView, you add a DynamicField, which is a replacement for the BoundField that internally has a DynamicControl. (Thus has all of the features of a DynamicControl.)

This results in your Grids and data entry forms being built around tables and columns of your database with whatever smart data entry controls you like, such as the AJAX Control Toolkit’s MaskedTextBoxExtender on a textbox or your favorite third party controls. The database schema also determines the validators for this column. That avoids errors implementing the right validators or updating them when the database schema is modified. (No more “how do I validate a BoundField?” issues!)

To me, Dynamic Data is a major step forward in developing data entry oriented web applications for ASP.NET.

One of the demo’s that is often shown is Dynamic Data’s “scaffolding” feature. Basically, you point the wizard at a database and “poof” you’ve got a nice DataGrid Admin-like site. However, to dismiss it as a scaffolding tool is just the mistake I made when I first saw it.

How does it work?

Goto  Putting ASP.NET Dynamic Data into Context

Related Links

A List of LINQ Providers

 

LINQ Providers

Via http://blogs.msdn.com/charlie/archive/2006/10/05/Links-to-LINQ.aspx

Snippet Designer for Visual Studio 2008

 

Features

  • A Snippet editor integreated inside of the IDE.
    • Access it by opening any .snippet file or going to File -> New -> File -> Code Snippet File
    • It uses the native Visual Studio code editor so that you can write the snippets in the same enviorment you write your code.
    • It lets you easily mark replacements by a convenient righ click menu.
    • It displays properties of the snippet inside the Visual Studio properties window.
  • A Snippet Explorer tool window to search snippets on your computer.
    • It is located under View -> Other Windows -> Snippet Explorer
    • This tool window contains a code preview window which lets to peek inside the snippet to see what it is without opening the file.
    • Maintains an index of snippets on your computer for quick searching.
    • Provides a quick way to find a code snippet to use, edit or delete

explorer.png

  • A right Click “Export as Snippet” menu option added to C#, VB and XML code editor to send highlighted code directly to the Snippet Editor

export.png

Via Snippet Designer – Home

Windows Communication Foundation (WCF) 3.5 REST Starter Kit

Windows Communication Foundation (WCF) REST Starter Kit

The WCF REST Starter Kit is a set of features, Visual Studio templates, samples and guidance that enable users to create REST style services using WCF. It provides features that enable or simplify various aspects of using the http capabilities in WCF, such as caching, security, error handling, help page support, conditional PUT, push style streaming, type based dispatch and semi-structured XML support. The WCF REST Starter Kit also provides Visual Studio templates for creating REST style services such as an Atom feed service, a REST-RPC hybrid service, Resource singleton and collection services and an Atom Publishing Protocol service. In addition, there are samples, documentation and other guidance that help to use these new capabilities.

Download WCF REST Starter KitDownload

Learn about WCF REST Starter Kit

Via Windows Communication Foundation (WCF) REST Starter Kit

In the case of REST Singleton Web Service, using jQuery to do AJAX is as simple as:

<script type=”text/javascript”>
    $(function() {
        $.getJSON(“http://localhost:62537/Service.svc/?format=json”, null, function(json) {
            $(‘#result’).html(json.Value);});  
    })
</script>

ASP.NET Dynamic Data

 

In a nutshell this enables you to really quickly build data driven web-sites that work against a LINQ to SQL (and in the future LINQ to Entities) object model – and optionally allows you to-do this without having to build any pages manually.

The best way to see this in action is to watch David Ebbo’s awesome 17 minute screen-cast:

Via New ASP.NET Dynamic Data Support – ScottGu’s Blog

Uploading Silverlight 2 Content to Silverlight Streaming

 

 

Here’s a basic walkthrough:

  1. Create your Silverlight 2 application using Visual Studio or Expression Blend, do all the usual test / debug steps, etc.
  2. Create a manifest file named manifest.xml, that describes how you want the control to be hosted. Here’s a simple sample you can use as a template:
    <SilverlightApp>
      <version>2.0</version>
      <source>PopTheBubble.xap</source>
      <width>400</width>
      <height>300</height>
      <background>white</background>
      <isWindowless>false</isWindowless>
    </SilverlightApp>

  3. Zip your application .xap and manifest.xml files together into one file.
  4. Go to silverlight.live.com and upload the application.
  5. You’re done! Now you can embed the resulting content in any web page with an iframe or the sample code provided.

Via Uploading Silverlight 2 Content to Silverlight Streaming

Also look at Configuring a Web Server to Host Silverlight Content

Using OAuth with the Google Data APIs

 image

Contents

  1. Introduction
    1. Audience
  2. A little terminology
  3. Getting started
    1. Registration
    2. Signing Requests
  4. OAuth Playground Tool
    1. Choose your token Scopes(s)
    2. Modify OAuth Parameters and Settings
    3. Acquire the access token
    4. Using the access token
  5. Conclusion
  6. Resources

Introduction

Recently, all of the Google Data APIs adopted support for OAuth, an open protocol that aims to standardize the way desktop and web applications access a user’s private data. OAuth provides a means of performing API authentication in a standard and secure fashion. If you’re starting out, or just curious about OAuth, look no further. This article will give you a basic foundation of the concepts. I’ll also discuss the details of Google’s OAuth implementation. This document is also meant for developers that are familiar with using AuthSub, especially in registered with enhanced security mode. As we go along, I’ll try to highlight the similarities and differences between the two protocols.

Some users have suggested that OAuth has a high learning curve. Compared to Google’s other authentication APIs, I would agree. The advantage of OAuth will be apparent when you expand your app to use other (non-Google) services. Writing a single piece of authentication code that works across different service providers, and their APIs, sounds pretty good to me. You’ll thank yourself later on for learning the protocol now.

The OAuth Playground is a tool that I created to help developers cure their OAuth woes. You can use the Playground to help debug problems, check your own implementation, or experiment with the Google Data APIs.

Via Using OAuth with the Google Data APIs – Google Data APIs – Google Code

Also see the Google Authentication API – OAuth Authentication for Web Applications

Contents
  1. The Authentication Process
    1. Tokens and Token Management
  2. The OAuth Endpoints
    1. OAuthGetRequestToken
    2. OAuthAuthorizeToken
    3. OAuthGetAccessToken
    4. Revoking an OAuth Access Token
  3. Working With OAuth
    1. Setting Up OAuth Authentication
    2. Signing Requests
    3. Migrating from AuthSub to OAuth

Yahoo! Search BOSS C# Implementation

 

image

The implementation supports all of the Boss API except for spell checking. This includes Image, News, and Web searches. Search results are returned in three formats: Xml, JSON, and an object set.

Here are a couple examples.

Example 1: Search for “Telligent”:
var result = new WebSearch(“BOSS_ID”).Query(“Telligent”).Get();

Example 2: Search for “Telligent” and limit the results to 5 and get the second page of results.
XElement result = new WebSearch(“BOSS_ID”).Query(“Telligent”).Take(5).Skip(5).GetXML();

Example 3: Search for “Telligent” but limit it to it to a couple of sites:
string json = new WebSearch(“Boss_ID”).Query(“Telligent”).Site(“simpable.com”).Site(“telligent.com”).GetJSON();

Example 4: Search for “Telligent” mentions in the news for the last week.
var result = new NewsSearch(“Boss_ID”).Query(“Telligent”).Age(7).Get();

Example 5: Search for “Telligent” images:
var result = new ImageSearch(“Boss_ID”).Query(“Telligent”).Filter(false).Get();

There is built in support for language, region, content type, etc filters as well.

Download Assembly and Source. Via Yahoo! Search BOSS C# Implementation