DevConnections - Day Three
Posted on April 4, 2006 | 1 Comment | No TrackBacks
I am not a morning person. I officially decided that these events start too early in the morning when I was stumbling around in the dark, half-asleep, tripped, fell into the wall, and nearly broke my nose. Yes, I am that awesome. Thankfully the rest of the day was not as awful as the beginning.
Session 1 - Accessing Data with the ASP.NET 2.0 Data Controls
This session was a decent introduction to the new data source controls in ASP.NET 2.0. Data source controls are non-UI helper controls that enable 2-way databinding with little or no code. I've already been using ASP.NET 2.0 for a couple months now so unfortunately there wasn't much new here. If you're new to ASP.NET you can view the slides from this session at www.deeptraining.com/litwin
One off-topic remark that speaker Paul Litwin made was about the new ways to encrypt your connection strings (and anything else you want) inside of the web.config file. This is a great habit to get into since it easily adds another layer of security to your application. Mr. Litwin has a great blog on the subject that will help.
Encrypting/Decrypting Web.config Sections
Session 2 - Localizing ASP.NET 2.0 Applications
Let's face it. Not everyone speaks English. Localization in ASP.NET 2.0 provides easy mechanisms for adding multi-language support to your projects. I have to say that I'm incredibly impressed by how easy this is. Using ASP.NET 2.0 localization allows you to maintain one core set of your website files and then use standard resource (.resx) files to implement however many languages you'd like. You can also setup a global resources folder for content that is repeated on multiple pages.
Most of the built in controls are localizable and there's even an asp:Localize control which can be used to wrap static content, making it localizable as well. Creating a method for the user to select a locale is simple and can be easily stored in a database for authenticated users or via a cookie using the Profile object for anonymous users. There's even a pretty easy way to add a custom caching parameter to vary by locale.
If you have any intention of creating a website in more than one language, the ASP.NET 2.0 localization features should not be overlooked.
Though not there at the time of this posting, speaker Dave Sussman has promised to post the slides and demos on his site at http://www.ipona.com/samples/
Session 3 - Maximizing ASP.NET Performance with Data Caching
ASP.NET 2.0 has made some major improvements to it's caching model which this session delved into. Caching can be set at the page level, selectively turned on and off for specific user controls, and the new data source controls have configurable parameters to apply caching to individual datasets. The web.config file now also supports caching profiles which can be configured and set for each page so different types of pages can have different caching durations and parameters.
Perhaps the most significant improvement though is the addition of sqlCacheDependency. Many sites pull content from databases, which is then cached. If the content in the database is updated, the page will still show the old data until the cache expires. SqlCacheDependency provides a mechanism for the database to notify the webserver of the change to automatically expire the cache. This can function both in SQL2000 and SQL2005, although 2005 enhances the process with what's called the Broker Service.
The code and slides for this session can be found at www.daveandal.com/download
Session 4 - SQL 2005 Indexing Strategies: Finding the Right Balance
I took a break from the ASP.NET 2.0 sessions and attended this one on SQL Server Indexing. I'm not a DBA but as a web developer I'm often stuck doing those tasks anyways. Indexing is a topic I'm planning to cover in more detail in a later blog and I gathered a lot of information here that will be helpful for that.
For now, here're a few quick notes from speaker Kimberly L. Tripp.
3 Things you need for doing database development:
- Know your data - Knowing exactly what data you're storing helps you design for performance
- Know your users - Knowing how people interact with the data helps you index for optimal performance
- Know what really goes on - Users often lie or are uniformed about how things actually work so profiling the user requests and server responses will help you figure out an efficient strategy
4 Steps for creating indexes:
- Create your clustered index
- Create indexes on primary key (PK) and unique keys (UK)
- Manually index foreign keys (FK) - This improves key relationship management and may improve join performance
- Manually create your extra indexes for AND, OR, JOIN, and aggregate queries
Full-text indexing has been significantly improved in SQL Server 2005 and catalog indexes now build 400% faster. The Index Tuning Wizard (ITW) has also been replaced by the newer Database Tuning Advisor (DTA), which possesses many new algorithms to help SQL optimize and run more efficient queries.
Session 5 - Building N-Tier ASP.NET 2.0 Applications
About half of this session was interesting. The other half admittedly went over my head. I'm most definitely not an application architect but, like not being a DBA, this responsibility often falls on my head. N-Tier is "a software architecture methodology that defines distinct physical or process boundaries between application modules." When you hear people talk about separating the data-access layer from the business logic from the presentation layer, their talking about N-Tier architecture.
One of the main benefits of this is flexibility and ability to re-use code. If you build your app on SQL server and then need to port it to Oracle, you can do so very easily by only modifying your data-access layer. There'd be no need to actually change any of your .aspx pages.
This concept is still pretty new to me. I'm lucky if I have time to actually build the project. Who has time to create an architecture?
That's all for today. 4 more sessions tomorrow and then it's back to the office.





Great writeups on these sessions! It looks like we've been attending many of the same ones.
I'm enjoying reading about the one's I didn't get to. :)