tin tin.. ASP .NET Whidbey.. My First Experience unleashed!

Published 22 July 04 11:37 PM

Well... I had the CTP of VS 2005 about a month ago and meanwhile I have explored it a lot. I never had time to discuss what I liked about this brand new mean-machine by Microsoft... here I go...

Right now here I will be discussing how VS 2005 makes easy the development of data driven, n-tier based application development.

If anyone remembers the cool dashing data wizards of Visual Studio .NET 2003... Those who were supposed to help developers in practicing RAD... but they had following major problems...

  • The connection string generated was stored in VB files. If you had to switch the database from development to production, you have to update the whole application and recompile the code.
  • Similarly, if you generate dataset using the OleDBDataAdapter wizard, and you bind the DataSet to a grid, then you have to write DataGrid.DataBind() otherwise nothing shows up on the page.
  • And finally, the MOST bothering thingy: the code generated was purely two tiered code. Genuinely merging the Presentation Logic, Business and the Persistence.

First surprise, while running the Data Connection wizard you have option to save the connection string into your very own Web.config file!

About addressing the second part of the problem, grids now are automatically data-binded and no line of code is required.

Now about the last one… I think you will be waiting to hear about it… While running the “Configure Data Source…” wizard for GridView, there you can mention your Business Objects and their respective functions which are supposed to fetch data from database or request from Persistence tier. While binding itself, the GridView will create instance of that object and call that function and get the data and bind itself with that data! You can even mention methods which are responsible for deleting/updating the data in your business object and GridView will automatically call them!

The great thing about GridView is that you can even pick dataset from Session! Now you don’t even need to code about it. Similarly, while generating database queries (the WHERE clauses), you can not only use (in data configuration wizard) values from Session, but also from Query String (which is quite amazing to see)… also, but not limited to some Drop Down List’s value! This way, filtering data based upon value in a drop down list is just a minute’s work.

Similarly in GridView, the Paging, Sorting, Editing, Deleting etc is just a click away!

So thats all for tonight folks... see ya with more!

Fahad Khalil
(After learning something...)

Anonymous comments are disabled