May 12

Yes, its coming! The boys and Redmond can’t wait to release all these service packs. I have Scott Guthrie’s blog post in front of me and read it carefully. As for now these two downloads are still in beta but will be released soon in final stage. So far you can download it from here.

There will be some improvements that really concern us. I will closely follow these few:
- ASP.NET Data Scaffolding Support (ASP.NET Dynamic Data)
- ASP.NET Routing Engine (System.Web.Routing)
- ASP.NET AJAX Back/Forward Button History Support
- ASP.NET AJAX Script Combining Support
- Visual Studio 2008 JavaScript Script Formatting and Code Preferences
- Improved ExtJS formatting support!
- Application Startup and Working Set Performance Improvements

As well as some Data improvements:
- SQL 2008 Support - VS 2008 and .NET 3.5 are being updated to include support for the upcoming SQL 2008 release. Visual Studio 2008 data designers, projects and wizards now fully supporting connecting and working against SQL 2008 databases.
- ADO.NET Data Services (formerly code-named “Astoria”)

VB.NET update:
You can now add “XML to Schema” items to Visual Basic projects. On adding these project items a wizard will open that allows you to create a XSD schema set from a variety of XML sources. This schema set is then added to the project and it enables VB XML intellisense.

A XSD browser is also now included with VS 2008 SP1 and allows you to browse XSD schema sets. With the final SP1 release, developers will be able to right-click on XML element names (either in XML properties or XML literals) in the VB code editor and select “Go To XML Schema Definition” - this will open the XSD browser and display the schema set (and select the current element) for the VB project.

May 06

crockford-cover.pngHi again, yesterday I came across this free chapter and cant miss to share it with you.

It comes from Douglas Crockford’s forthcoming “Javascript: The Good Parts”. In this volume, Douglas articulates a philosophy of coding in JavaScript that builds up on and extends the content of his popular video series and articles. The premise, as Douglas puts it: “Most programming languages contain good parts and bad parts. I discovered that I could be a better programmer by using only the good parts and avoiding the bad parts.”

Here is Chapter 5: Inheritance

Apr 30

I just can’t miss that one! It comes from Matt Berseth’s blog where he describes how GridView, DetailsView and ModalPopup Controls can be nicely working together.

GridView, DetailsView and ModalPopup Controls in Master-Detail

Here is a quick quote from his post:
“I am sure everyone is pretty familiar with Master/Details style of editing data, but just in case - here is how my page works. The grid shows 12 rows of customer data. The far right column in the grid contains a hyperlink that when clicked brings the detail view of the row into focus so the corresponding row can be edited. The detail view is a popup control and contains a Save and Close buttons. When close is clicked, the detail popup is dismissed and the user goes back to viewing the main grid. When they click Save, some simple validation checks are run (all are RequiredFieldValidators for this sample) and the new data values are persisted, and finally the detail popup is dismissed and the main grid is refreshed so that it displays the changes.”

You can find the rest here. Matt has done a wonderful job sharing also the source code.

Apr 21

New Ext JS 2.1
Couple of days ago new version of Ext JS become available for download. The changes are here:
* Full REST support
* Added Ext.StatusBar Component and Samples
* Added Ext.Slider Component and Samples
* Added Example to demonstrate Remote Loading of Component Configs
* Added Grid Filtering Sample
* Added Layout Browser Sample
* Added Spotlight Sample

View full list of changes here.
Download from here.

Apr 13

SQL Server best practicesNever under estimate the load on SQL Server because it might affect overall performance.
Pinal Dave shared with us his view on 14 best practices. Here is his list if anyone wants to add something write a comment below:

1. Store relevant and necessary information in the database instead of application structure or array.

2. Use normalized tables in the database. Small multiple tables are usually better than one large table.

3. If you use any enumerated field create look up for it in the database itself to maintain database integrity.

4. Keep primary key of lesser chars or integer. It is easier to process small width keys.

5. Store image paths or URLs in database instead of images. It has less overhead.

6. Use proper database types for the fields. If StartDate is database filed use datetime as datatypes instead of VARCHAR(20).

7. Specify column names instead of using * in SELECT statement.

8. Use LIKE clause properly. If you are looking for exact match use “=” instead.

9. Write SQL keyword in capital letters for readability purpose.

10. Using JOIN is better for performance then using sub queries or nested queries.

11. Use stored procedures. They are faster and help in maintainability as well security of the database.

12. Use comments for readability as well guidelines for next developer who comes to modify the same code. Proper documentation of application will also aid help too.

13. Proper indexing will improve the speed of operations in the database.

14. Make sure to test it any of the database programming as well administrative changes.

source

Apr 08

This isnt really new technique but when it comes to optimizing ASP.NET web pages everything is appreciated. We all know that when we put script content after UI content we will get speed improvement. But when we deal with dynamic script tags its not easy to accomplish it. Omar is getting into this describing a nice technique to filter the HTML output and get all script tags and put it at the back. Here is a link to his post.
Check out a part of his great post here:

ASP.NET ScriptManager control has a property LoadScriptsBeforeUI, when set to false, should load all AJAX framework scripts after the content of the page. But it does not effectively push down all scripts after the content. Some framework scripts, extender scripts and other scripts registered by Ajax Control Toolkit still load before the page content loads. The following screen taken from www.dropthings.com shows several script tags are still added at the beginning of

which forces them to download first before the page content is loaded and displayed on the page. Script tags pause rendering on several browsers especially in IE until the scripts download and execute. As a result, it gives user a slow loading impression as user stares at a white screen for some time until the scripts before the content download and execute completely. If browser could render the html before it downloads any script, user would see the page content immediately after visiting the site and not see a white screen. This will give user an impression that the website is blazingly fast (just like Google homepage) because user will ideally see the page content, if it’s not too large, immediately after hitting the URL.

Faster page loading in ASP.NET

From the above screen shot you see there are some scripts from ASP.NET AJAX framework and some scripts from Ajax Control Toolkit that are added before the content of the page. Until these scripts download, browser don’t see anything on the UI and thus you get a pause in rendering giving user a slow load feeling. Each script to external URL adds about 200ms avg network roundtrip delay outside USA while it tries to fetch the script. So, user basically stares at a white screen for at least 1.5 sec no matter how fast internet connection he/she has.

These scripts are rendered at the beginning of form tag because they are registered using Page.ClientScript.RegisterClientScriptBlock. Inside Page class of System.Web, there’s a method BeginFormRender which renders the client script blocks immediately after the form tag.

And here is how the HTML code looks like after manipulation:
Faster page loading in ASP.NET
Script tags are moved after the “form” tag when the filter is used

You can grab the Filter class from the App_Code\ScriptDeferFilter.cs of the Dropthings project. Go to CodePlex site and download the latest code for the latest filter.

Mar 30

Today will post about two things. One is hot fix available for VB performance issue in VS2008. It addresses performance issues in the following scenarios:

- The IDE takes a long time to build/rebuild the solution.

- You experience a slow response time when you press F5 to start debugging.

- You experience a slow response time in the Code Editor.

- You experience a slow response time in IntelliSense.

The performance issue is caused by having large files in your project that contain XML documentation. You’re most likely to run into these large files when using designer-generated files for web references and/or datasets. If you’ve found that turning off the option under the Compile tab in project properties for “Generate XML Documentation File” improves your performance, then this hotfix should address your issue.

Download it here.

The other is this useful tool called GhostDoc which enables you to generate XML description of your functions in VS 2008. I use this when coding in VB.NET though the VB.NET support is still experimental. This free add-in uses customizable templates to generate consistent, English-readable documentation based on the current context. To use it, right-click (or use CTRL + SHIFT + D) to document the current element:

Coding in VB.NET with VS 2008

This generates the following documentation (note GhostDoc split the property name into words and created a sentence from it):

Coding in VB.NET with VS 2008

Download GhostDoc from here.

Mar 23

Since 10th of February we started poll which aimed to determine what is your favorite development IDE. So after month and a half we can say that Visual Studio 2008 is being adopted quite well as 39% of all 80 votes goes for him. Second place goes to VS 2005 as it was the first to be able to use framework 2.0. Its interesting to note that 9% of all(or 7 votes) goes to the old school VS 2003! Here is the final result:
Most used development IDE is VS 2008!
Looking for your votes again so we can determine which is your favorite programming language!

Mar 10

The Emulate IE7 Button on IE8
As I mentioned earlier there is this button on top of the window. Its very good to have that one since IE8 is in very early stage of development. This will make our life easier when developing and testing web pages. What it does is that when pressed it causes IE8 to use the IE7 user agent string, version vector and layout modes.

Mar 05

Download IE8 from here!Install Internet Explorer 8

Internet Explorer 8 can be installed on Microsoft Windows Vista® Service Pack 1 (SP1), Windows Vista, Windows XP® Service Pack 2 (SP2), Windows Server® 2008 and Windows Server 2003 Service Pack 2 (SP2). Downloads are available from the following locations:

Internet Explorer 8 Beta 1 for Windows Vista and Windows Server 2008 

Internet Explorer 8 Beta 1 for Windows Vista x64 Edition and Windows Server 2008 x64 Edition

Internet Explorer 8 Beta 1 for Window XP SP2

Internet Explorer 8 Beta 1 for Windows Server 2003 SP2

Internet Explorer 8 Beta 1 for Windows Server 2003 SP2 x64 Edition and Windows XP SP2 Pro x64 Edition