Home > .NET User Groups, General Software Development, Open Source > Presentations at WinProTeam – ADO.NET interfaces, Gentle.NET, LINQ, Refactoring

Presentations at WinProTeam – ADO.NET interfaces, Gentle.NET, LINQ, Refactoring

Unfortunately my co-presenters were not able to make the WinProTeam presentation due to unforeseen circumstances so I went it alone. This meant that the topics had to change a little but the audience seemed agreeable. The schedule for the evening changed to:

ADO.NET Interfaces

This is a favorite topic of mine since many people still seem to miss the boat with ADO.NET and use the boilerplate SQLConnection/SQLDataAdapter code everywhere. This presentation explores IDbConnection, IDbCommand, IDataReader and the trusty DataSet/DataTable. Using these interfaces makes your code much easier to support multiple database platforms (something that can be critical for an ISV / product vendor). The presentation also encourages adoption of a centralized Data Access Layer (DAL). We have a free, open source DAL called Thycotic.Data which is hosted on SourceForge.

Gentle.NET (adhoc)

This session was meant to be John Morales giving us the gory details on NHibernate – something that John is very excited about. Unfortunately my experience with NHibernate is limited to some simple samples that I toyed with. We have used Gentle.NET extensively and have figured out most of the gotchas. The two seem very similar to me so the audience was happy to hear about Gentle.NET instead. We walked through the concepts of mapping business objects to tables using attributes and then various calls through broker and ObjectFactory to retrieve and persist data. For the most part, we have been happy with Gentle.NET – we have written our own little helper class called GentleHelper which makes more complex queries a little easier. One of the downsides we have found with Gentle.NET is the cryptic error messages and the poor error handling at times (for example, retrieving a record by id when it doesn’t exist throws an exception).

Intro to LINQ

Ryan Olshan was meant to give this session and provided the slides in his absence. I was drawing on my memories of various sessions at the last PDC which discussed LINQ and DLINQ. Altogether very cool stuff which is set to change the way we think about accessing data in C#. After walking through Gentle.NET, LINQ definitely seems like a next generation technology – taking it to the next level. Unfortunately I didn’t have any demo code since Ryan warned that it can make Visual Studio unstable to install the 3.0 bits – something I didn’t want to learn the hard way.

Refactoring

This session was a big departure from the Data Access theme but it has been a very popular topic with many groups. It is all hands on with no slides – just coding. I use a version of Martin Fowler’s refactoring example which was ported to C# by our very own Bryant Smith. It involves refactoring a Statement method on a Customer class to add HTML capability – the idea is to refactor the code to gain:

  • understanding
  • ensure it communicates its purpose
  • make it more maintainable so that it can be extended for the new HTML capability

Jonathan Cogley isthe CEO and founder of Thycotic Software, a .NET consulting company and ISV in Washington DC. Thycotic Secret Server is a secure web-based solution to both “Where is the password for this router?” and “Who has the password for our domain hosting?”. Secret Server isthe leader in secret management and sharing within companies and teams.

  1. December 15, 2012 at 1:18 am

    I’ve recently started a web site, the information you provide relating to
    this website helps me greatly. Many thanks for the
    time & work.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: