got net?

Kevin Hazzard's Brain Spigot

About the author

Welcome to Kevin Hazzard's blog.
E-mail me Send mail

Recent posts

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Hampton Roads .NET User Group November 2009 Presentation

I presented a talk called "Enterprise Data Validation" at the Hampton Road .NET User Group this evening. The premise was simple. Data validation needs to happen in all the tiers of a modern application but the validation rules should be defined only once to avoid synchronization errors. In this talk, I showed how to extend SQL Server using extended properties to store regular expressions for data validation as column metadata. I also showed how to add a regular expression matcher to SQL Server using the SQL CLR and how to add check constraints to invoke the regular expression parser. Then I built a WCF service to query the validation metadata to make it available in other application tiers. I quickly assembled WCF service host and client showed how you could bring all of the elements together to create a working Enterprise Validation solution.

Download the SQL Scripts (20.06 kb)

Get the Slides

Attendees can Rate My Talk


Posted by kevin on Tuesday, November 10, 2009 11:37 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Dynamic Language Runtime Performance Demos

I spoke at the Charlottesville .NET User Group this week and at the Raleigh Code Camp. I cheated and did the same presentation to both groups. Call me lazy but, in the middle of planning our own Code Camp in Richmond, I really didn't want to prepare two separate talks. I did a talk back at CodeStock 2009 on a similar topic back in June 2009 but it's evolved a lot since then based on my own growth and understanding. You can find the code and slides below.

This talk takes about an hour and covers the basic concepts of metaprogramming and how the DynamicMetaObject class, the IDynamicMetaObjectProvider interface and the DynamicObject helper class work in the .NET Framework 4.0. The talk is very demo-centric, focusing on the code that support the concepts outlined in a few slides. The first demo focuses on helping you to understand the dispatch mechanism in the DLR and how you can implement your own classes that participate in the call binding process. It's a fairly simple fluent XML parser implemented using the DynamicObject helper class. While it's simplistic, it helps to introduce developers who are new to the DLR to the concepts of dispatch and binding in C# before diving into things Pythonic.

The second demo focuses on performance measurement. Having learned about the delegate and rule caching that goes on in the DLR's CallSite<T> and ActionBinder classes in the presentation, these tests show the effect of all that awesome work that Microsoft has done for us to enhance the performance of dynamic code. The result is that we see the caching yields about 5,000 times the performance of traditional static to dynamic language interoperability. Rather than the hundreds of transactions per second that we are accustomed to when doing dynamic language invocation from a context like C#, we now get millions of transactions per second. To put it all in context, the same transactions performed in pure C# are still about 4 times as fast as the DLR with delegate and rule caching. However, you have to admit that what the DLR provides today is pretty amazing. For many, this level of performance makes the use of languages like Python for scripting a large application feasible for the first time.

The question I most often get about this is, "When will the dynamic language performance be just as good as 'real' .NET code?" OK, so I take exception to the term 'real' there but I know what you all mean. I don't know the answer and it doesn't really matter that Ruby and Python performance be just as good as C#. Different languages have their own strengths and sometimes that includes performance. But when pure C# generates 6 million transactions per second, traditional thunking across to dynamic languages performs at a rate of several hundred per second, the fact that adaptive Inline Caching in the DLR helps me to yield close to 2 million transactions per second is pretty darned good. We're well on the way to my other favorite language, Python, becoming a first-class citizen in the .NET family. It takes education, of course, for people to know just how wonderful the DLR is which is the real purpose of my evangelism. I just love the DLR, if you can't tell already.

I am doing a Channel 9 geekSpeak next week on this topic and I'll refer to some of this material. And my talk at the October 2009 NoVA Code Camp will use an even further evolved version of this talk. Drop me a note and let me know what you think about this topic. Do you have success stories? Horror stories regarding dynamic language integration?

Slides for DLR Performance Talk September 2009 [PPTX] (184 kB)

Slides for DLR Performance Talk September 2009 [PDF] (680 kB)

Code for DLR Performance talk September 2009 [Updated 21 Sept 2009] (16 kB)


Posted by kevin on Saturday, September 19, 2009 4:20 PM
Permalink | Comments (2) | Post RSSRSS comment feed

A Survey of Popular .NET Inversion of Control Containers

UPDATE: Gaja Kannan attended this presentation and gave me a great link to a post by Torkel Ödegaard concerning IoC container performance. Interestingly, of all the IoC containers out there, Torkel picked the same products as I did (plus StructureMap) for his tests. You can find the post at http://www.codinginstinct.com/2008/08/castle-windsor-dependency-lookup-and.html. Thanks, Gaja, for the link! 

On Thursday, October 2, 2008, I gave a presentation to the Richmond .NET User Group entitled "A Survey of Popular .NET Inversion of Control Containers". It covered Microsoft Unity, Ninject, Castle Windsor and Spring.NET. I talked about the history of the development of Inversion of Control (IoC) and Dependency Injection (DI). I demonstrated the concept in a sample application (linked below). I also discussed Aspect-Oriented Programming (AOP) and how it can be used to create highly cohesive, loosely coupled applications. The slide deck and code is available at the links below.

Source Code (77 kB)   Slides (268 kB)


Tags: , ,
Posted by kevin on Thursday, October 02, 2008 6:30 PM
Permalink | Comments (4) | Post RSSRSS comment feed

Richmond Code Camp 2008.2 Program Handout

I've been so busy planning for Richmond Code Camp 2008.2 on October 4, 2008 that I've been unable to blog over the past couple of weeks. But, because of what I've been working on, the program handout for the Code Camp is ready now. You can download the Adobe Acrobat file from here:

http://richmondcodecamp.org/RCCDocuments/Richmond+Code+Camp+2008.2+Program+Handout.pdf

If you are coming to Richmond Code Camp, you can download this document and plan out your day by looking at the speaker bios, abstracts and schedule. Keep in mind that we may have to make last minute changes to the schedule but, it's looking pretty solid right now. If you still need to register, you can do so here:

http://www.clicktoattend.com/?id=131306


Posted by kevin on Monday, September 29, 2008 8:44 PM
Permalink | Comments (5) | Post RSSRSS comment feed

Richmond Code Camp 2008.2 Open for Business

If you follow my blog, you can see that I haven't been blogging much over the past two weeks. OK, I haven't been blogging at all. I switched jobs and I've been spending every spare moment besides getting ready for Richmond Code Camp 2008.2 on October 4th, 2008. The registration page for the code camp is up and running as well as a 15-minute survey of the presentation tracks. The survey is important to us because it will help to determine the probable popularity of each of the 43 presentations that our speakers have prepared. At the new Learning Technology Center at J. Sargeant Reynolds Community College, we have rooms that will hold as few as 15 attendees, some that will hold 50 and an auditorium for the really popular presentations that will hold hundreds of Code Camp attendees.

Please take 15 minutes to fill out the survey if you plan on attending the Code Camp, OK? And make sure you register early. We have a beautiful new venue with a lot more space that we had before but we also have 35 top notch local and regional speakers coming from 9 states to present to us. Invitations are going out soon to the Greater Richmond Technology Council members and to all of the faculty and staff of the local Virginia Community College System. So, if you plan to attend, don't wait to register.

For those of you who've been encouraging me to restart my posts on Exploring the F# Language, I promise that the next installment is on the way. Thanks for your encouragement.


Posted by kevin on Saturday, September 06, 2008 8:00 PM
Permalink | Comments (2) | Post RSSRSS comment feed

Josh Carlisle and His Best Friend Fred

Josh Carlisle spoke to the Richmond .NET User Group this evening on Sharepoint Development for ASP.NET Developers. He was carrying what looked like a flask of vodka with him which made me think, "This is a guy I've got to hang out with." It turned out to be Fred Bottled Water. Unfortunately, I didn't get a picture of Josh with Fred, but here are pics of both of them. Doesn't Josh look unusually happy? He swears it was water of "exceptional purity with a high degree of virginality." Yeah, right.

Josh Carlisle speaks to the Richmond .NET User Group on 7 August 2008

Josh's presentation was very good. He was a bit perplexed near the end because of SharePoint's pesky insistence on treating the term MasterPage differently from MasterPages (plural). Pfft! SharePoint is so picky like that. Anyway, we had a good time and Josh was just great. He really knows his stuff. He's welcome back to Richmond at any time. Maybe I could get him up here for Code Camp on October 4, 2008. We got to see Nas Ali, too, who travelled to Richmond with Josh, I think. Always good to see Nas. He confirmed with me that he will be speaking for us at the upcoming Code Camp. Nas is a good speaker and his talks are not to be missed.

Thanks again Josh for coming to Richmond!


Posted by kevin on Thursday, August 07, 2008 9:45 PM
Permalink | Comments (1) | Post RSSRSS comment feed

News Page for the Richmond Code Camp

I've added a permanent news page for the Richmond .NET Code Camp to my site. It has news and information you'll want if you're a .NET developer in the mid-Atlantic region.

http://www.gotnet.biz/Blog/page/Richmond-NET-Code-Camp-News.aspx

Check it out!


Posted by kevin on Tuesday, July 22, 2008 3:25 PM
Permalink | Comments (3) | Post RSSRSS comment feed

Accessing Web Services from Silverlight 2

I presented tonight (10 July 2008) to the Richmond .NET User Group. We had a pretty good turnout, I'm guessing 40 to 45 developers. I gave this same presentation at my office today as a dry run and as a training opportunity within the company. It's so good to see the developer community eager to learn. I've attached my slides and the three demonstrations projects I used in this post. I'll be giving this same presentation to the Charlottesville .NET User Group next Thursday (17 July 2008). The abstract we put on both user group websites follows:

Silverlight is a client-side technology. So it’s not really a part of your SOA strategy, right? You may want to think twice about that. SOAP and WSDL support are coming to the web desktop via Silverlight. And Silverlight has good client support for REST+ JSON/POX and RSS/ATOM-based web services, too. During this discussion, we’ll dive into data serialization, security and cross-domain access policy capabilities inside Silverlight 2 Beta 2. We also talk about the nuances and pitfalls of provisioning your web services for an Internet audience. This presentation will be heavy on coding, demonstration and interactive discussion.

Powerpoint Presentation (289KB)

Twitter solution showing how to invoke a cross-domain RESTful service by way of an in-domain SOAP service bypassing the cross-domain access policy problem. (842KB)

REST solution showing how to create RESTful services in WCF and how to consume RESTful services in Silverlight (307KB)

Silverlight syndication solution showing how to consume cross-domain RSS and Atom feeds using the SyndicationFeed class. (11KB)


Posted by kevin on Thursday, July 10, 2008 10:39 PM
Permalink | Comments (3) | Post RSSRSS comment feed

MVP Award for 2008

I received Microsoft's MVP Award yesterday. I tried blogging about the experience at the end of the day but I didn't feel that I was ready to do it. The MVP Award is an unusual and very different kind of designation in the professional world. Many professional awards are about recognizing accomplishment. But the Microsoft MVP Award is about recognizing service. When you are singled out in this way, it's the community's method of saying, "Keep up the good work."

I've achieved many certifications in my career. I've held certifications from Sun, Oracle, IBM, Microsoft, HP, Siemens, Cisco and a few others. But I've never advertised them publicly because they were all my doing. I studied. I worked hard. I passed the certification exams. And I was a better developer and software architect for doing it. But, as a professional, I think those things are expected of me. So there was really no sense in wearing those certifications on my sleeve, in my opinion. To paraphrase the old adage, the proof is IN the pudding, not ON it, if you know what I mean.

The MVP Award, based on community and industry service, is not something you apply for. You get nominated by other MVPs and you go through a process of demonstrating what you've been up to for the past year. A review board checks you out (you can't hide from the search engines) and determines which MVP area of expertise you would fit into. Then, they determine among the other candidates in your group if your contributions to the community are exemplary. My MVP area of expertise is Visual C#, by the way. I think they picked the correct area for me because I know, love and promote the dickens out of C#. It's my favorite programming language in my career of 25 years so far.

It's a bit overwhelming to get the kind of support you need to win the MVP Award. When you receive "the magical e-mail" as some have called it, there's a stark moment of realization that you're standing on the shoulders of so many others who contributed to it. No MVP has ever achieved the title on his own. And I'm certainly no different. That's the way communities work. We lift each other up. I want to recognize a few folks who have lifted me up and encouraged me along the way to serve better within the Microsoft developer community:

These folks are my role models. In particular, I want to recognize Andy Leonard. If we weren't about the same age, I'd call Andy my techno-Dad. He's a father figure to all of us in the mid-Atlantic user group community, I believe. Andy is humble and brilliant, a rare combination. He's also the hardest working person I know. If I could follow Andy's lead to 50% efficiency, I know I would be successful, too. We are sorry to be losing him to Atlanta soon but he's leaving us in great shape. Thank you, Andy.

I send out a heartfelt thanks to these folks and the cast of hundreds who pour their time and energy into making the user groups, Code Camps and DevCamps throughout the mid-Atlantic region great successes. My profession would be just a job if it weren't for all of you. I look forward to serving you all in the year to come.


Tags:
Categories: C# | Prof Dev | User Group
Posted by kevin on Wednesday, July 02, 2008 6:30 AM
Permalink | Comments (10) | Post RSSRSS comment feed

Going to CodeStock

CodeStock LogoOK, I broke down and registered for CodeStock. That'll be a long drive. But the schedule looks awesome. This is a Code Camp on steroids in Knoxville, Tennessee. Lots of heavy hitters coming in to speak this time: Jeff Prosise, Alan Stevens, Steve Andrews, Todd Anglin, Rachel Appel, James Avery and many more.

Looks like I'll be riding there and back with Justin Etheredge. Spending some time with Justin will make the time go by faster.

The date is 9 August 2008 and the cost is $25. Hope to see you there.


Categories: User Group
Posted by kevin on Sunday, June 22, 2008 7:55 PM
Permalink | Comments (0) | Post RSSRSS comment feed