ASP.NET 2.0 Seminar Day 3

Weyhey !!! .. what a day ! Since today, I’m an official, Microsoft Certifiedattendee ! :D

Seriously now, this has been perhaps the most interesting day in this 3-day seminar. We got a closer look at Web Parts, talked briefly about a few changes in the ASp.NET Cache, and took a closer look at what’s new with application-level Security, focusing on Authentication & Authorisation and the new utilities related to that, that ASP.NET 2.0 offers.

Web Parts:

From the world of Sharepoint Services comes the concept of Web Parts. WP’s are just re-usable components that you can place anywhere in a page. Sounds simple, and it is but, it gives you A LOT of flashy features ….

In the practical, we places a WebPartsManager control inside a page, and defined page regions. Then , we drag’n'dropped a few web parts onto the page, and run it. As you’d expect, the parts appeared in their designated positions and all was fine and dandy.

But then, the guy put a web part editor control onto the page (actually, I can’t recall the name of the control right now, but I’mconfident you’ll find it if you start playing around beta 2 ), and run the page again. A drop down appeared, that gave you editing options like “Edit Layout“. Click on it and … oh my gosh, you can drag’n'drop the Web Parts around inside the page !!! 8-O

Add a Catalog control to the page, and you get a list of availble Web parts to add/remove/place on the page as well …

As you can understand, this Web Parts thing opens up the door for fascinating personalization, where you can have the user create her own layout as well as content for her personalized Web Site experience. Naturally, you can get the positions & web parts the user wants to see when she enters your web site and persist them onto the user’s profile with minimal coding. All I can say is that I was impressed, and it was the only time I got really excited in these past 3 days :)

Moving on to the Caching mechanisms in ASP.NET 2.0, to mention briefly something called Dependencies.

Dependencies is a way to inform the cache that it should drop cached content when a change in the underlying data source has occured. Of course, that will not work with every imaginable data source out-of-the-box. The example we saw used SQL Server 2000, which had some special functionality ‘installed’ using a little utility that comes with ASP.NET 2.0. It created the required stored procedures and tables to support dependencies.

Actually, what it does is place a trigger on the table you have a dependency on, and ‘make a note’ of changes that occur. The ASP.NET runtime polls this data every once in a while, thus getting notified of changes and dropping the dependent item from the cache.

I wondered whether in SQL 2005, with it’s built-in support for C# I could possibly replace this ‘polling’ behavior with a Callback delegate ? The guy said I probably could, but still i have my doubts :) I guess we’ll have to wait and see, won’t we ?

Moving on to Security then.

ASP.NET 2.0 comes with a slew of new controls for logging-in, creating users, it even has a ‘remind password’ control … :? … Underneath all that, there is a mini-framework that creates a user database for you ( we saw it on Access, but it also supports SQL Server and Oracle out of the box, and you can implement your own providers as well ).

So, after running another little ASP.NET utility that prepares tha database, you can go to the all-new administration web site in your IIS, and configure users, groups, roles and whatnot. It will all integrate fine with eachother, and you can have your web site supporting user registration in no time at all :) As I said before, these features are code-eliminators … and I’m not sure whether I like that or not, but I still have to admit that it does save you a lot of time and code.

Anyhow, at the end of the seminar, I’m feeling .. uncertain. It’s true that if you do wanna write code, nobody will prevent you from it. However, it would be an exercise in futility :D I’m still waiting to get my hands dirty with C# code, and explore the innards of the framework.

I guess that - as always - programmers will still be programmers, and we’ll find interesting code to write somehow :P

Bottom line … I don’t regret attending. It was informative, and it was good to preview all those new gizmo’s M$ will give us. Do try it out, ASP.NET 2.0 is a very nice framework.

Till next time, then, bye now !
O:]

Comments are closed.