November 22, 2006

PreCompilation in ASP.Net 2.0

What is PreCompilation?
     Before looking into that, let us see, what happens in a web app when the first request arrives. When the first request for a website arrives, the worker process is started first, then the CLR initializes, all the aspx pages are parsed and compiled into intermediate language, methods are just in time compiled to native code. Due to these prcesses running , we face a performance problem, but this will not exist for the subsequent hits. In order to avoid this drawback, the all new ASP.Net 2.0 comes with a concept of PreCompilation.

     And now, what is precompilation? Using PreCompilation, we compile the website before hand and deploy it in the server, so as the first request arrives there will be not be any delay. Hence it drastically improves the performance of the website.

     There are two types of precompilation, In place Precompilation and Precompilation for deployment.

     In place precompilation eradicates the initial delay we face when your website is hit first time, while the Precompilation for deployment creates the executable version of your website, which you can deploy using FTP or XCopy.

     The aspnet_compiler.exe is the utility to precompile the web apps. To know all the available options for precompilation type aspnet_compiler /? in the .net command prompt.

November 21, 2006

Session State Management in ASP.Net

ASP.NET provides three ways of maintaining client-specific state: session state, cookie state, and view state. Each technique has its own advantages and disadvantages.
Session state is the most flexible and, in general, the most efficient. ASP.NET has enhanced session state to address some of the problems associated with it in previous versions of ASP, including the abilities to host session state out of process or in a database(SQL Server) and to track session state without using cookies.
Session state is maintained on behalf of each client within an ASP.NET application. When a new client begins to interact with the application, a new session ID (or session key) is generated and associated with all subsequent requests from that same client . By default, the session state is maintained in the same process and AppDomain as your application, so you can store any data type necessary in session state.
To know more about the Session State management, there is an excellent article posted in ASPAlliance, and the link to this is here.
For experts, the best practices to be followed in Session state management is here.

November 17, 2006

Alternate way to view source

This is really good Tip. What do we do when we want to view source of a web page? we right click the page and select view source, which will open the source in the source editor you have configured.

Just type the below mentioned line in the address bar of the IE.

javascript:'<xmp>'+window.document.body.outerHTML+'</xmp>';

This will list the source of the page in the same window of the web page.

November 11, 2006

ASP.Net AJAX Beta 2 released

ASP.Net AJAX Beta 2 is released... By the way what is this? This is a free framework for quickly creating a new generation of more efficient, more interactive and highly-personalized Web experiences that work across all the most popular browsers, which was earlier code named as 'ATLAS'.

With ASP.NET AJAX, developers can quickly create pages with rich, responsive UI and more efficient client-server communication by simply adding a few server controls to their pages. This new Web development technology from Microsoft integrates cross-browser client script libraries with the ASP.NET 2.0 development framework. ASP.NET AJAX provides developers building client-based Web experiences with a familiar development process and programming model that they already know from using server-side ASP.NET development. Because ASP.NET AJAX is integrated with ASP.NET, developers have full access to the built-in ASP.NET 2.0 application services and the entire .NET Framework.

To learn more visit the official ASP.NET AJAX Site.

November 10, 2006

Coding guidelines

While reading Brad Abrams archives, i read this excellent article on writing a readable and maintainable code. This article lists the guidelines to be followed to write a readable code. Although we write efficient codes, we sometimes forget one aspect of coding ie. readability. Read this article, and also dont miss out the comments too.

Open multiple programs at once in XP

When we need to open multiple programs at once, what do we do? We go to Start menu -> Choose All programs -> Select the Application you want to launch, again we start from the start from the Start menu. So what does XP provide us for this. Although this is a easy and simple tip, most people don't know this, so i thought of posting this here.

Here we go
1. Click the Start menu and point to All Programs.
2. When the menu opens, press and hold the Shift key and browse the menu, clicking the icons of the programs that you want to open. Each program launches without closing the All Programs menu.

Need more such tips? Buy WindowsXP Killer tips!!!

November 09, 2006

Does your code work?

Does your code work?
This question may some time irritate a programmer and he feels like slapping you. Then ask the next question
Can you prove the claim that your code works correctly in the next 10 minutes?
This really questions the developer's skill and his team's ability to deliver a quality software. Blake raises these questions in his recent post.

Just read this post, really excellent!!!

SlickRun - Really sweet

Slick run is a tiny desktop utility, which makes a developers job easier by reducing the mouse usage. How? This utility gives you an ability to give a short name to any application that is in your system, and when when you want that application to load just type the name in the SlickRun window. Again SlickRun window is not the regular window, but a small text box like interface, which is docked in the right hand corner of your desktop, just above the taskbar. You can download the app here.

This really makes my life more simple.

November 05, 2006

UTube.com sues YouTube.com

Universal Tube & Rollform Equipment Corp of Ohio, US, has its website hosted at the address UTube.com. Earlier this week, they sued the YouTube Inc!!! But why? Due to Google's recent acquisition of YouTube(spending $1.65 bn), the web traffic of utube increased manifold, causing the website crashing often and costing thousands of dollars a month. Read the full story from Sara Goo's blog from WashingtonPost.

However I dont think UTube will win this lawsuit. Yet another interesting lawsuit of the year.

November 04, 2006

Blog writing primer

How to write a blog? How to write a blog that really attracts people? Do you find yourself convinced with your blog? Have you expressed all your opinions/information completely? The answer for all this is here.

http://blog.outer-court.com/archive/2006-10-11-n47.html

This blog by Philipp Lenssen lists the rules for writing a good blog.


Windows XP Bootable Disc

Ever felt frustrated of not having a bootable windows XP disc, so that u can install XP with ease, instead of booting up with Windows 98 or other lower versions and then upgrading to Windows XP. Here is a link which solves this problem. You can create a WIndows XP Bootable disc with ease. Follow the instructions , you will end up with a WINDOWS XP BOOTABLE DISC.

http://www.tacktech.com/display.cfm?ttid=297

Great work by the authors, Hats off!!!

November 03, 2006

Regular expression's magic

I was working on a task, in which i need to load a XML document and get the values from the nodes. Bored of using the XMLDocument and XPathNavigator i was thinking of an effective alternative. It should be as powerful as XMLDocument and as light(in case of performance) as XPathNavigator, so the worthy alternative is obviously.. Regular Expressions. While trying to write the pattern, i googled to find a page which lists all the classes with a description and an example. It gives a quick overview of all the classes. http://regexlib.com/CheatSheet.aspx.

Does writing code matter?

An excellent article, that all the developers should read. The author says that developers instead of writing just codes, they should speak and analyze and inspire others to write code. Stop talking to computers and Start talking to the humans.
Read full article here.
Great eye opener.!!!

November 02, 2006

Custom caching with ASP.net

When i am grazing through the blogs, i saw a good post on ASP.net custom caching with ASP.net 1.1. This post was really informative, so i thought of sharing them with you. A article describing this concept in more detail is here.

Ca(t)che you later!!!