Tuesday, November 29, 2005

How to: Write Custom HTTP Handlers for the ASP.NET Applications

An HTTP handler is the endpoint that responds to requests made by an ASP.NET Web application. The ASP.NET requests are mapped to HTTP handlers based on the type of file extension used. Each handler processes either an individual URL or groups of URL extensions within an application. Mark has to say more about this here in his article

Tuesday, November 22, 2005

Implement Caching to Give .NET Applications a Performance Boost

One of the simplest way to improve the performance of a database-driven application is through caching. Retrieving data from a database is one of the slowest operations that a Web application performs. If it caches the database data in memory, it avoids accessing the database with every request—which simply increases its performance. Thiru Thangarathinam has to say more on this here...

Saturday, November 19, 2005

Essential JavaScript: 8 Cross-Browser Solutions

There's a core set of problems that every JavaScript developer will run across sooner or later. Tom Duffy shows you how to deal with eight of the most common situations here in this article

An Introduction to Game Programming with JavaScript

For those who are keen in developing games using Javascript, the article from Tom Duffy could of great help to charge you up. Click here to begin Game Programming in Javascript

Friday, November 18, 2005

Top 10 Tips for Designing Telephony Applications

Using Microsoft Speech Server, .NET developers can build telephony or voice-only applications quickly and easily. This article lists 10 tips to consider before designing these types of applications. Enjoy programming !!!

Thursday, November 17, 2005

Unregister Startup Script, the Workaround !!!

Just like many others, I was also hung up as how do I unregister a startup script. Well, the solution doesn't seems to exists (or I didn't find one). But a workaround for this behaves is just like unregistering previously defined script and then registering the new one. Here is how it goes..

First you need to define a form level variable of type System.Web.UI.Control to your web page like

Private ctrlToFocus As System.Web.UI.Control = Nothing

Then add a Page PreRender event to your web page like

Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.PreRender
Dim script As String = "<script language="javascript">" _
& "document.getElementById('" & ctrlID.ClientID & "').focus();" _
& "document.getElementById('" & ctrlID.ClientID & "').scrollIntoView();" _
& "</script>
If Not Page.IsStartupScriptRegistered("focusKey") Then
Page.RegisterStartupScript("focusKey", script)
End If

Now, where ever you have defined your startup script to focus to a control, replace that with the following

ctrlToFocus = <yourControlName>

Hope this helped to solve your problem !!!

Custom and User Controls in ASP.NET

To learn the basis of creating Custom Web Contol and using them to your web pages is made simple here in this article. An in-depth view of the creating and using custom controls for the web can be found here... Happy learning

Wednesday, November 16, 2005

Working with Client-Side Xml Data Islands via Server-Side ASP.NET code

Client-side Xml Data Islands and databinding have been around with Internet Explorer for a long time - way before .NET came on the scene. They have many useful purposes, including working with Exchange data via WebDAV, and being able to use a client-side Xml Data Island as the source for an XslTransform that displays data. The major issue with ASP.NET is how to get the Xml into the page. That's where it can become troublesome for ASP.NET developers. How do I get my data on the server, the way I normally would with ASP.NET, and then bind it to an Xml DataIsland so it's available on the client?

There are a number of techniques available for doing this; and Peter A Bromberg shows one simple way with which we could experiment further in this article...

Using Visual Studio .NET Wizards to Create an N-Tiered Application

There are many wizards in Visual Studio .NET (VS) that assist new users in creating applications. Unfortunately, they tend not to promote good programming habits--specifically there is not a separation of code into layers and they do not adhere to OOP standards isolating business logic. The default model of VS is to drag and drop data objects onto the form we are building. VS generates the code necessary, but mixes the data access code and the business logic code directly in the user interface form object. This limits the reusability of the code and tends to duplicate code where the same table data is used on more than one form.

Most architectures recommend more of an n-tiered approach where the code is separated into different layers. There should at least be a data access layer, business logic layer, and a presentation layer. When working with distributed applications (different parts of the application running on different servers) more layers may need to be added.

There are two primary advantages for separating the layers: code reusability and de-coupling code from the database. By separating out the data access and business logic layers, many different forms can be used to collect and display the information without rewriting or duplicating the code to access and use the information. The de-coupling helps keep your code from breaking when the database schema changes and makes it easier to even change data storage providers without much code change.

Mr. David Catherman has to say more on this here...

Monday, November 14, 2005

Dynamic page updates using XMLHTTP, the hidden layer of AJAX

XMLHTTP works by sending a request to the Web server from the client and returning an XML data island. Depending on the structure of the XML that is received, we can use XSLT or the XML DOM to manipulate it and bind portions of the page to that data. This is an extremely powerful technique.

To learn more on this beautiful technique to refresh your web page, go thru' this Microsoft KB 893659

Friday, November 11, 2005

Learning the Basics of AJAX Programming

The process of retrieving XML data asynchronously via JavaScript is known as Ajax. This is the Abbreviation of Asynchronous Javascript and XML and the application that uses this techology is mostly referred as Ajax application.

To know more about the basis of ajax and how to use this to your web application, read the following article How to Develop Web Applications with Ajax by Jonathan Fenocchi

Using Data Binding to Synchronize Properties

Windows forms controls have a DataBindings collection that contains the defined data bindings for the control. This is most often used to bind controls to a data source but it can be used for other purposes as well. For example, suppose your form contains a number of controls that have the same background color. When the color of one changes, the color of the other should change as well. By defining a binding between the controls' BackColor properties, this will happen automatically, making it unnecessary to write code that changes each control individually. Change one and all the others follow suit.

The following code, for example, binds the BackColor property of TextBox2 and TextBox3 to the same property of TextBox1:

Me.TextBox2.DataBindings.Add("BackColor", Me.TextBox1, "BackColor")Me.TextBox3.DataBindings.Add("BackColor", Me.TextBox1, "BackColor")

When you want to change the BackColor of all three textboxes, all you need to do is change the property for TextBox1:

Me.TextBox1.BackColor = Color.Red

By using data bindings you can achieve all sorts of useful synchronization effects. This tip is from paitken

Thursday, November 10, 2005

An Overview of Visual Basic 2005

Summary: Get on overview of the new features in Visual Basic 2005 including, My Visual Basic, IntelliSense, Edit and Continue, AutoCorrect, Just My Code, Windows Forms enhancements, and more.
This article has been updated for the final release of Visual Basic 2005.

This post is from Ken Getz of MCW Technologies, LLC and to know more click here...

Wednesday, November 09, 2005

Sql Server User-Defined function to return the given string in Proper Case

This function is to you from Richard Oznebaugh

     SET @PROPER = ''
     SET @NUMBER = 0
          SET @PROPER = @PROPER +
          SET @NUMBER = @NUMBER + 1
     -- USAGE:
     -- SELECT dbo.ProperCase('STRING IN ALL CAPS')

Function Pointers in Javascript

One of the most powerful features of the JavaScript language is every data type is treated as an object. The JavaScript datatypes include numbers, strings, arrays, objects, and functions. While most of these variable types should be familiar to JavaScript programmers, it is the function data type that is the most often confused and misunderstood. Below we show you how JavaScript treats a function no different than any other data type.

var stringDemo = "This is a string"
var functionDemo = new Function("alert('I am a function!');return false")

document.write("<B>" + typeof stringDemo + "</B><BR>" + stringDemo)

document.write("<BR><B>" + typeof stringDemo + "</B><BR>" + functionDemo)

Running the above code generates the following output:

This is a string

function anonymous() { alert("I am a function!"); }

In this example we did not execute the functionDemo. Instead, we referenced the function object which caused the default method to be called. The default method on

a function is the toString() function. The toString() function returns the contents of the object. The function is accessed as a data type and not executed because of the absence of the (). Without the () you are referencing the data type itself, with the parenthesis you execute the function. Therefore, to execute the functionDemo you would call it as follows: functionDemo().

This highlights a very common bug that can cause you to spend countless hours debugging unless you understand the distinction between executing functions and accessing them. If you accidentally omit the () to execute the function you will often get no visible script error other than your application does not run as expected.

By treating the function as an object JavaScript becomes much more powerful as you can assign and manipulate it just as you manipulate other variables. When you treat functions as variables you are manipulating function pointers. For example, you can assign a pointer to our new functionDemo to another variable the same as you assign any other variable:

// Assign a reference to the function
referenceFunctionDemo = functionDemo

// Executes the function

// Assign return value of the executed function.
saveResultOfFunction = functionDemo()

This is a part of a article from Scott Isaacs.
To know more click here...

WinFX: Windows Presentation Foundation (WPF) and XAML

In this article, Glen gives a brief introduction to Microsoft's new Windows markup language, XAML, and also gives a simple example on how to use this new technology.

If you have ever seen a Microsoft Windows Presentation Foundation (WPF, formerly ‘Avalon’) application run, you will be sold on how it will revolutionize the computer user experience. The first word of out of my mouth when I saw a demo was “Cool.” Since .COM went .BUST, almost everyone in the information technology (IT) space has been waiting for the Messiah of IT to present itself. In WPF, it has arrived and will change the way we do business. Glen Sollors has to say more on this in his article here...

Custom Traffic Maps with Yahoo Traffic RSS, MSN Virtual Earth Maps and Remote Scripting

It seems that Yahoo has resurrected their traffic data and now provides reports on most major cities in RSS format. The other interesting thing that came about recently is the rollout of MSN Virtual Earth, the API, and the Developer help pages and site. Google Maps is great, Virtual Earth could be even better. Why? A very simple Javascript-based API, lots of good features, and in some cases, the maps and aerial photo tiles are better than Google's. Plus, you don't need a license key. The commercial license requires only that you include the MSN widgets on your map, which eventually will be used to serve ads. If you want to see what it all looks like, visit the MSN Virtual Earth site here. Peter A. Bromberg has to say more on this here...

Tuesday, November 08, 2005

Asynchronous client script callbacks

This is an excellent article on Client script callback published by Mr Paul Glavich. Use the following link to more on it...


Monday, November 07, 2005

Object-Oriented Programming with JavaScript, Part I: Inheritance

Although JavaScript is a scripting language, its support of object-oriented programming is quite impressive. Even though there are no classes and instances, there are objects, prototypes, and implicit inheritance. The following article published at webreference.com details how to emulate inheritance and how the superclass-subclass relationship is formed. Prototyping is the key to understanding the inheritance concept. To know more click here...