Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Friday, 10 August 2007

ASP.NET AJAX ScriptManager in Web Applications

Today the buzz word is "AJAX". It's a great technique used to create interactive web applications. It makes the web applications responsiveness similar to client-side standalone applications. ASP.NET AJAX was released by Microsoft to easily integrate into web applications. The central component, ScriptManager control is the core of ASP.NET AJAX. Its primary role is the arbitration of all other ASP.NET AJAX controls on the Web Form and the addition of the right scripting libraries to the Web browser so that the client portion of ASP.NET AJAX can function.

Scripting with ScriptManager

ScriptManager reacts to events in the ASP.NET page lifecycle and uses those events to coordinate the activities of all the controls, options, and code employed by ASP.NET AJAX. ScriptManager will hook a particular event, get notified when it occurs, and configure a few settings depending on the environment; this process will repeat itself several times through the rendering cycle of your ASP.NET page.

The steps necessary to create a class based on the ASP.NET AJAX script extensions are:

  • Register the namespace with ASP.NET AJAX
  • Create a constructor method
  • Create a class prototype by filling in the member methods and their functionality
  • Register the class with ASP.NET AJAX
  • Notify the client script added by the ScriptManager that you have reached the end of the type definition (the call to Sys.Application.notifyScriptLoaded).

WorkFlow of ScriptManager

 

The workflow of the scriptmanager is shown in the figure. It gives an idea of how the scriptmanager registers and responds to events. You can find out more information about ScriptManager.

Tuesday, 10 July 2007

Microsoft Robotics Studio Launched

Microsoft has come up with a new Windows-based environment for academic, hobbyist and commercial developers to easily create robotics applications across a wide variety of hardware. It's named Microsoft Robotics Studio. It is bundled with a lot of samples and tutorials.

The main objective of Robotics Studio is to have a software platform for the robotics community that can be used across a wide variety of hardware, applicable to a wide audience of users, and for development of varied applications. Microsoft Robotics Studio aims three software areas:

  • A scalable, extensible runtime architecture for wide variety of hardware and devices
  • A set of tools that make programming and debugging robot applications easier
  • A set of useful technology libraries and samples to help developers program robot applications better

System Requirements

Microsoft Robotics Studio can be downloaded at Microsoft  Robotics Studio official site. The application is about 80 MB in size and can be installed in Windows CE, Windows Server 2003, Windows Vista, Windows XP. In order to install Robotics Studio, you need to install .NET Framework 2.0 SDK. Download .NET Framework 2.0 SDK. We can use Robotics Studio with Visual Studio 2005.  You need to have any of the Visual Studio 2005 editions.

You can find out more information about Microsoft Robotics Studio from

Wednesday, 27 June 2007

Visual Studio 2005 - Get your Free copy

You can grab a free copy of Microsoft Visual Studio 2005 offered by Microsoft. Visual Studio 2005 has an estimated retail price of $299.00. All you need is just register to Labcast and attend their Labcast series. These series helps you to get in depth knowledge from visual studio experts. Here are some of the labcast subjects

Learn how to

  • Modernize and simplify installation of Visual Basic 6.0 applications
  • Add new data-bound forms to Visual Basic 6.0 applications
  • Introduce simple background threading to Visual Basic 6.0 applications
  • View and edit SQL Server™ data
  • Create data-centric Web applications with your Visual Basic desktop development skill
  • Keep Microsoft Word documents in sync with your database

This offer is for a limited time and attend for any two labcast series and submit the evaluation form for each session, you could win a complementary copy of Visual Studio 2005. Try it out. If you are lucky, you would get the free copy or else you would gain knowledge on Visual Studio 2005. Anyway's, it is beneficial to us.

Tuesday, 26 June 2007

New Compatibility Feature in Visual Studio 2008


Recently, Microsoft has released it's new version of Visual Studio i.e., Microsoft Visual Studio 2008.  This new version is named as "Orcas". One of the new feature of Visual Studio 2008 is the ability to target multiple versions of .NET framework with your application. One of the problems with Visual Studio 2005 is that it only allows you to develop applications in .NET framework 2.0. It is not compatible to its earlier version of .NET 1.0.

Here comes the nice feature in Orcas. So, if you have an application which is built on .NET framework 2.0, and if you have installed visual studio 2008, you can continue to work on the application built on .NET 2.0. If you want to upgrade your project from .NET 2.0 to 3.0 and .NET 3.5, you can achieve this by simply changing the target framework version in the project properties. This doesn't mean that there wont be upgrade issues to think about, but at least you don't have to change tools and upgrade your projects to see what happens when you upgrade to the latest framework - which should make the upgrade process significantly easier.

Thursday, 14 June 2007

Testing AJAX applications with Fiddler

Testing AJAX web applications is very difficult. Ajax relies mainly on requests to the server  ( and responses received from them). We can't test what is sent and received from the server. The way to solve these problems is to use HTTP Proxy.

A HTTP proxy is a small program which intercepts between the client requests and responses to and from the server. The browser sends a request and the HTTP proxy receives the request. It then sends the request to the server and when it is processed, the response is sent back to the HTTP proxy. It is then sent to the browser. In addition to the interception job, it also records the information transfer. Fiddler is one such HTTP proxy tool which is used for testing and debugging Ajax applications.

                              

Fiddler, a free tool is an HTTP proxy for WINInet, which is the Internet Communication library used by many desktop applications, including Internet Explorer. Once installed, Fiddler automatically begins intercepting HTTP traffic to and from your computer.

Download Fiddler

Configuring Fiddler

If you want to get fiddler to listen to the requests too, go to Tools > Options > Connection > Connection Settings and check "Manual Proxy Configuration", "Use the same proxy for all protocols" and enter 127.0.0.1 port 8888 and click OK.  Note that this will pose problems if you close Fiddler as your proxy is gone, to solve the problem change back to "direct connection to internet".

Using Fiddler

The Fiddler window has two main regions. The left region shows all the requests that were sent from the machine. Each request is represented in a line. The line includes the response status, the protocol used (usually HTTP), the host name, the URL, the caching type, the length of the response, and the content type.

The right region has three tabs which are Performance Statistics, which displays information relating to data transmission rates, including the number of bytes sent and received as well as the types of data received. The Session Inspector tab provides information about the request and the accompanying response. The Request Builder tab allows you to manually construct a request and observe its response.

Another main feature of Fiddler is it has the ability to set breakpoints for HTTP requests and responses. As the request breakpoint is set, the Session Inspector tab is filled with information about the request. We can change the request before it is sent to server. Similarly, before the response is sent back to browser, we can edit the response.

Ajax debugging with Fiddler

  • Ensures that correct data is being sent to the server
  • Ensures that the data is sent in correct format and contains correct data
  • Checks whether correct response is received from server
  • Setting breakpoints for the request and response helps in finding out the error easily

Once you've recorded a session in fiddler you can then select the requests you're interested in, right click them and save them as a Visual Studio Web Test. You now have an XML file with the .webtest extension, ready to be imported into Visual Studio. Web Tests are used for testing the applications in Visual Studio 2005. You can know more information from my previous post Web Tests with Visual Studio 2005

You can find the Fiddler demonstration videos at this link

Source Via [Wrox Article]

Wednesday, 13 June 2007

Web Tests in Visual Studio 2005

Visual Studio 2005 and the .NET Framework 2.0 has a set of tools and functionality that will help the application development needs of today's large scale applications. It introduced a brand new set of tools for web and load testing. A load test of a Web application might span multiple machines and simulate tens of thousands of users, but at its heart it is a collection of Web tests.

Visual Studio 2005 enables web testing and makes it easy for the developer without writing any code. A Web test simulates how an end user might interact with a Web application. Typically, you create Web test by recording HTTP requests using the Web Test Recorder in a browser session, but you can also build Web tests manually using the Web Test Editor.

Recording a Web Test

Create a new Web test in Visual Studio. The Web test launches Internet Explorer, activating the integrated Web Test Recorder. Test recorder is used to record the actions you perform while you browse a Web site. The Web Test Recorder does not capture traffic sent between the client and server. This type of tool is sometimes called proxy recorder.

See for more information on Web Tests