I had a lot of people ask for the slides and demos from my "Power Programming with Attributes" talk here at the Heartland Developers Conference. For anyone interested, you can get them here.

10 comment(s) so far

Nice! I'm diving into the code right now. I'll probably have questions for you tomorrow.

Matthew Dill wrote on Saturday, October 28 2006

Thanks for these presentations. The information was extremely valuable and well presented.

GO BUCKS!

Dave-

This presentation was awesome. Thanks so much for giving out the slides and demo code.

I was most intrigued with the Enumerations example, but I found having to manually add each enumeration at the UI an unnecessary coupling. Don't worry - I understand it was just demo code.

However, for those wanting to put this to real use, I found a way to iterate through the enumeration so as to lower coupling between the business layer enumeration and the UI-level drop-down list.

In the EnumsWithDesc.aspx file, in the Page_Load event handler, you can replace all of the statuses.Add(...) statements with the following:

// create temp array and iterate through enum
Array tempArr = Enum.GetValues(typeof(OrderStatus));
foreach (OrderStatus status in tempArr)
{ statuses.Add(status); }

Using this approach, one can grow or shrink the enumeration without having to also update the UI code populating the drop-down list.

This was a great presentation. Thanks for taking the time to bring it to HDC. I had one question I haven't been able to Google. I noticed in your code sample the following declaration.

decimal? myDecimal = 124m;

What effect does the question mark have in that declaration?

Thanks!

HC: The decimal? is what's called a nullable decimal.

Akin wrote on Monday, November 13 2006


Hi,

I will like to say your presentation at the Heartland Developers conference was spendid.

I did try running the solution for the Demo i.e AttributeDemos and all that seems to work is the CustomAttributes project , the others come up with an error:

The project type is not supported by this installation, do you have any suggestions?

Hi Akin,

Glad you liked the talk. I forgot to put in the blog post that to run the apps you need to install the Web Application Project type and its related hotfix (I use the web app type exclusively instead of the dreaded web site project type that is found by default). Links are below:

Install this first: www.microsoft.com/.../details.aspx />
Then this: msdn2.microsoft.com/.../aa336618.aspx&l />
That should do it.

Akin wrote on Monday, November 13 2006



Dave,

Thanks a lot for the very fast acknowledgemnt of my enquiry, i do really appreciate it.

Kent wrote on Friday, November 17 2006

Dave,
During the talk I asked you about the existence of a good SET of custom attributes for the rule validation. You mentioned that about 25 where enough to cover the needs of a large project. You mentioned a toolkit you were working on called EVIL that would contain those 25. Any update on the release of EVIL, or a pointer to the set of 25?

I see big potential for this approach. I could sit and code with the business users and they would know exactly what rules would fire. The source becomes the document, not some Word file that I have to translate.

Thanks
Kent

Kent - EVIL is something I'm still working on, just a matter of setting aside enough time to finish it off and get the first release out the door. Just keep an eye on my blog for updates.

Post your comment

Comment