Wednesday, June 27, 2012

If you are new to performance and load testing, you need two things: knowledge of testing practices and knowledge of testing tools. .NET Performance Testing and Optimization: The Complete Guide by Paul Glavich and Chris Farrell provides both of these.

.NET Performance Testing and Optimization provides a solid overview of good testing practices, as well as practical information on how to use various commercial testing tools that are currently available.

The first three chapters cover principles of testing, such as which metrics you can measure, what information each metric provides, and when to care about each metric.

Glavich and Farrell describe the different types of tests and the goals of each. Performance Testing, for example, measures the speed at which an application responds to user input and events. Load Testing measures the number of concurrent users an application can reasonably support. Although they are often confused, the goals are different and the important metrics for each are different.

The rest of the book describes in detail various types of tests you can perform. Glavich and Farrell even provide step-by-step instructions to perform these tests with popular commercial products.

For those new to performance testing, for those needing a refresher on performance testing, or for those who want to know how to use commercial products to perform performance testing, .NET Performance Testing and Optimization  is a good source of information.

Wednesday, June 27, 2012 9:47:00 AM (Eastern Standard Time, UTC-05:00)
 Monday, June 25, 2012
Monday, June 25, 2012 9:47:00 AM (Eastern Standard Time, UTC-05:00)
 Tuesday, June 19, 2012

If you are in or near Michigan or northwest Ohio this week, you have a rare opportunity to learn from the creator of one of the most popular Aspect-Oriented-Programming (AOP) frameworks on the market. PostSharp inventor Gael Fraiteur will conduct a user group tour this week, primarily talking about AOP, using PostSharp for his examples. During the day, Gael will be stopping at area companies to educate them. AOP provides a way of adding functionality across a variety of classes and methods without cluttering said methods with a lot of extra code.

Originally from Belgium, Gael now resides in the Czech Republic, so it’s not often we get to hear him in-person.

Gael’s evening schedule is:

Date Group Location Link
Tue June 19 Northwest Ohio .NET User Group Toledo, OH http://nwnug.com/ 
Wed Jun 20 Great Lakes Area .NET User Group Southfield, MI http://migang.org
Thu Jun 21 Greater Lansing .NET User Group Okemos, MI http://glugnet.org/

I hope you can make it one of these nights.

Tuesday, June 19, 2012 9:29:00 AM (Eastern Standard Time, UTC-05:00)
 Monday, June 18, 2012
Monday, June 18, 2012 9:04:00 AM (Eastern Standard Time, UTC-05:00)
 Saturday, June 16, 2012

I attended my first Tech Ed conference in Orlando this week. I was fortunate to have the opportunity to work for INETA at the conference. In exchange, INETA covered my admission and expenses which would have been prohibitively expensive if I had to pay them myself.

My INETA work involved the following:

  • Working at the Community Leadership Summit the day before Tech Ed
  • Staffing a booth on the Expo floor
  • Volunteering at Birds-of-A-Feather sessions
  • Meetings throughout the week to talk about board business
  • Preparing a sponsor prospectus for the INETA Champs program

This was a small price to pay and I enjoyed most of these tasks. I got to meet some of the other board members in person for the first time and I had a chance to spread the word about user groups to a broad audience.

I gave a presentation at the Community Leadership Summit on attracting volunteers to a user group.

Two of my Birds-of-a-Feather topics were accepted at this conference, so I served as a moderator for these. The topics were "Getting Involved in my Local Developer Community: How is it a Win-Win? " and "Is Windows Azure a Contender for my Next Application?" Attendance wasn't particularly high at these sessions (possibly due to the 530PM and 830AM time slots) but the attendees participated in an active exchange. One exciting aspect of these sessions is that they were streamed live online and INETA volunteers monitored a Twitter hashtag to accept comments and questions from beyond Tech Ed.

Attending Tech Ed gave me the opportunity to spend some time with some members of the Visual Studio team and ask them some questions about the testing tools in VS Ultimate. I've been struggling with some aspects of this for my current project and I now have a better understanding of the capabilities and limitations of these tools.

I was invited to a Q&A with Microsoft VP Jason Zander in which we heard about some directions Microsoft is taking in the future. Unfortunately, I signed a non-disclosure agreement, so I can say nothing about this event except that I'm very excited about this future.

I competed in the Speaker Idol contest, hosted by Carl Franklin and Richard Campbell. Because I won, I now have an invitation to speak at next year's competition.

Of course, I also recorded 5 interviews that I plan to publish on Technology and Friends over the next few weeks.

The busy schedule above left some time to attend sessions. My favourite sessions were Web Sites on Windows Azure
and Building HTTP Services with ASP.NET Web API. I saw some exciting new technologies in these sessions that I can use in my work soon.

Of course, there were many hallway conversations and a chance to meet technologists from all over the world, which is always an opportunity to learn.

My notes on the sessions are below:

Web Sites on Windows Azure

Presenter: Bill Staples

10 free web sites

Supports Classic ASP, .NET 2.0,

Usage info on dashboard

App Gallery: Create blog in WordPress on Azure

WebMatrix 2 (in beta)

Install & download WordPress site

Publish automatically syncs with Azure (no configuration needed)

Publish via

  • FTP
  • Web Deploy
  • Git
  • TFS

Essential Tips for the Windows Azure Startup

Presenter: Michele Leroux Bustamante

  • Avoid web.config for
    • Settings that vary between staging, production
    • Use Web.config transformations
  • Caching
    • Co-located caching (% on each VM)
    • Shared caching (on one VM)
    • Same API
  • Queuing
    • Service bus queues
      • unlimited lifetime
      • 5GB max storage
      • Duplicate detection
      • Guarantee order
    • Storage queues
      • 7 day expiration
      • 100TB max storage
  • Diagnostics
    • Trace.TraceWarning
    • Listeners in webrole<trace><listeners>
  • Monitor from Outside
    • Monitoring Service
  • noSQL Kool-Aid

If the learning curve for noSQL is great, only use it for "obvious" data (e.g., profile, location data).

  • Enable Social Logins. Simplify signup
  • Don't ask users for too much info
  • Estimate costs
    • Calculate projected costs and revenue based on expected usage in advance
    • What is break-even point?

Beyond Master-Detail: Interaction and Navigation Patterns for Modern User Experience

Presenter: Billy Hollis

List

Hicks Law: Too many choices slow down user

Add 'FIND' capability

Launchpad

Make important buttons bigger

Combinations

Different patterns at different parts of the app

Wizard

Lots of new users

Complex but rarely use

Spreadsheet

Flexible Sort

Allow drag/drop columns

Context switchers

Toolbars & Ribbons

Usually action-oriented

Ribbon designed for en-users (not devs)

Most users don't like toolbars

Galery

Visual array of items

Multi-select

Dashboard

Visualization & navigation

Queue

Next item on top. No naviagation.

Don't use confirmation'

Underused.

Can increase productivity dramatically

Configurator

See changes as you select them

Timeline

Vertical or horizontal layout

Metaphor

Interface resembles something familiar in the real world

May be cute the first time, but gets old over time

Map

Items laid out in real world

Use lat-long

May use geocoding to get lat-long from address.

Viewport

Semantic zoom: Change view as you zoom in & out

For multiple levels of detail

Book recommendation: Mobile Design Pattern Gallery by Theresa Neil

Building HTTP Services with ASP.NET Web API

Presenter: Daniel Roth

VS 2012

MVC app

Scaffolding to create CRUD methods around entity

GetById

If not found, throw httpException (not found/404)

Post

Create new entity

Return HttpResponse

Url pointing to new entity page

ASP.NET Roadmap: One ASP.NET – Web Forms, MVC, Web API, and more

Presenter: Scott Hunter

In release mode, all js files are combined and minified

Put validation on model. Enforced in client script.

Migrations

  1. Inherit from DbMigration
  2. Up() method
  1. Update columns in db

HTML 5 emitted

e.g., <input type="datetime" … />

Page.cshtml

Page.mobile.cshtml <-- Displayed when Page is requested on mobile devices

Signal R

  1. Inherit from Hub
  2. Send() method
    1. Clients.addMessage

Real-time communication with server

Design for Non-Designers

Presenter: Jennifer Smith

Good design makes a product useful, usable

Dieter Rams:

Good design

  1. is innovative
  2. Makes a product useful
  3. Is aesthetic
  4. Makes a product understnadable
  5. Is unobtrusive

Putting things in boxes is not good design

Keep UI focused

Before starting

My ___ app will be the best at _________

Talk through app using low-fidelity prototype

Recommended design tools

Illustrator

SketchFlow (Expression Blend)

Use rule of thirds (Divide into thirds, horizontally and vertically)

Golden Region

Viewers look at apps, pages, pictures, etc via Fibonacci (spiral in)

"Dead center is dead wrong"

White space is OK.

Fonts

Use sans serif fonts

Counter size = space inside 'e' or 'p'. Larger is better

Saturday, June 16, 2012 11:42:00 AM (Eastern Standard Time, UTC-05:00)
 Friday, June 15, 2012
 #
 

This week, at Tech Ed North America, I participated in something called "Speaker Idol".

Speaker Idol is a contest organized by Richard Campbell and Carl Franklin of .NET Rocks Fame. The contestants are speakers who have never spoken at Tech Ed before and the grand prize is an invitation to speak at Tech Ed next year. Each speaker delivers a 5-minute presentation and a panel of judges rates that presentation afterward.

I entered the contest and delivered a short talk on Data Visualization. The judges liked my presentation but made a number of suggestions about providing more real-world examples.

I won the first heat, which placed me in the finals. The competition in the finals was intimidating to say the least. There were three other contestants: Jeff Fritz (who was the runner-up in the first heat), Seth Juarez, and Jim Holmes. I only met Jeff this week, but I've seen Jim and Seth deliver many presentations and they are both excellent, so I knew I needed my A-game.

Fortunately, the judges liked the fact that I took their feedback and my finals presentation included some practical examples at the end of my presentation. One of the judges paid me a very high compliment, saying that he planned to change the way he did some things based on what he learned in my talk.

When it was over, I came in first place overall.

Speaking at a major contest like TechEd has been a personal goal for a long time, which made it gratifying. Having it happen among competition like that makes me suspect divine intervention was involved.

I'm very excited about this and I wanted to share it right away.

In a few days, I'll have a full brain dump on my experience  at Tech Ed North America.

A crown made by one of the judges

Friday, June 15, 2012 9:09:00 AM (Eastern Standard Time, UTC-05:00)
 Thursday, June 14, 2012

Here is a video of Michael Collier's "The Hybrid Windows Azure Application" presentation at the 2012 Detroit Day of Azure.

Azure | Video
Thursday, June 14, 2012 9:43:00 AM (Eastern Standard Time, UTC-05:00)
 Wednesday, June 13, 2012

Here is a video of Joe Kunk "Windows Azure Data Marketplace" presentation at the 2012 Detroit Day of Azure.

Azure | Video
Wednesday, June 13, 2012 9:29:00 AM (Eastern Standard Time, UTC-05:00)
 Tuesday, June 12, 2012

Here is a video of John Ferringer's "Office 365" presentation at the 2012 Detroit Day of Azure.

Azure | Video
Tuesday, June 12, 2012 9:28:00 AM (Eastern Standard Time, UTC-05:00)
 Monday, June 11, 2012
 Sunday, June 10, 2012

Here is a video of Jennifer Marsman's "Writing Your First Azure App" presentation at the 2012 Detroit Day of Azure.

Azure | Video
Sunday, June 10, 2012 10:26:00 AM (Eastern Standard Time, UTC-05:00)
 Saturday, June 09, 2012

Here is a video of Jennifer Marsman's "Azure 101" presentation at the 2012 Detroit Day of Azure.

Azure | Video
Saturday, June 09, 2012 1:22:00 PM (Eastern Standard Time, UTC-05:00)
 Friday, June 08, 2012

Here is a recording of Brent Stineman’s keynote presentation at the 2012 Detroit Day of Azure.

Azure | Video
Friday, June 08, 2012 11:55:00 AM (Eastern Standard Time, UTC-05:00)

I published some of these links last month, but Microsoft has released links for even more free stuff. Check out the cool stuff by clicking the links below.

Friday, June 08, 2012 7:28:00 AM (Eastern Standard Time, UTC-05:00)
 Thursday, June 07, 2012

Next week, I will attend my first Tech Ed conference. I don't really know what to expect. Although I attend a lot of conferences, the great majority are small to medium community-run conferences. Larger conferences like this are usually out of my price range. Fortunately, I'll be doing some work for INETA at Tech Ed, so they will pick up my ticket.

I have scheduled a few things.
I will be delivering two Birds-of-a-Feather sessions: Getting Involved in my Local Developer Community: How is it a Win-Win? on Tuesday evening and Is Windows Azure a Contender for my Next Application? on Wednesday morning.
I will be working at the INETA booth, answering questions about how our organization helps user groups.
I signed up to compete in Speaker Idol, a contest in which each contestant delivers a 5-minute technical presentation. Winners of each heat advance to the final round and the grand prize winner is invited to speak at Tech Ed 2013.

I will also be working and presenting at the Community Leadership Summit the day before Tech Ed.

Looking through the web site, I see that Tech Ed offers a great many technical presentations and workshops. I hope to attend some of these. But, more importantly, I hope to have a chance to talk with a lot of smart people and add to my toolbox.

Thursday, June 07, 2012 9:50:00 AM (Eastern Standard Time, UTC-05:00)
 Wednesday, June 06, 2012

Once again, I have filled my summer with conferences and user groups. Here are the presentations that are confirmed.

Date Event Topic Location  
Jun 10 Community Leadership Summit Getting Others Involved: Building a Leadership Team, Recruiting Volunteers & Growing Your Membership Orlando, FL Link
Jun 12 Tech Ed North America Birds of a Feather: Is Windows Azure a Contender for my Next Application? Orlando, FL Link
Jun 13 Tech Ed North America Birds of a Feather: Getting Involved in my Local Developer Community: How is it a Win-Win? Orlando, FL Link
Jun 28 MADExpo Keynote Panel: Raising Geek Kids Hampton, VA Link
Jun 28 MADExpo Effective Data Visualization: The Ideas of Edward Tufte Hampton, VA Link
Jun 29 MADExpo Effective Data Visualization: The Ideas of Edward Tufte Hampton, VA Link
Aug 1 Ann Arbor Computing Society How I Learned to Stop Worrying and Love jQuery Ann Arbor, MI Link
Aug 13-15 That Conference Overnight Campouts In The Cloud: How to use Azure Storage Wisconsin Dells, WI Link

In addition, I intend to compete at Speaker Idol at Tech Ed. This is a technical presentation contest hosted by Richard Campbell and Carl Franklin of .NET Rocks fame.

Wednesday, June 06, 2012 9:27:00 AM (Eastern Standard Time, UTC-05:00)
 Tuesday, June 05, 2012

The .NET Framework provides configuration files - app.config and web.config - to store application-wide configurable information.

But these are just text files, so they can be read by anyone with the proper permissions. What if I want to store sensitive information in this file, such as a password or a connection string?f

Fortunately, the .NET Framework also provides a mechanism for encrypting parts of a config file. This functionality is available in the System.Configuration namespace in the System.Configuration assembly, so you will need to set a reference to this assembly (Project | Add Reference | .NET tab) and add the following line to the top of your class file
using System.Configuration;

The ConfigurationManager.OpenExeConfiguration static method accepts the name of an assembly and returns a Configuration object that can be used to manipulate the config file. It is important to remember that, when a project is built, the project's app.config file is renamed to {AssemblyName}.exe.config and copied to the bin\Debug or bin\Release folder (depending on the build configuration). It is the {AssemblyName}.exe that is passed into the OpenExeConfiguration method and it is the config file under the bin folder that will be affected by our code.

For example, the following code creates a Configuration object to read and manipulate the config file associated with the MyAwesomeApp.exe assembly

string appName = "MyAwesomeApp.exe";
Configuration config = ConfigurationManager.OpenExeConfiguration(appName);

We can call the Configuration object's GetSection method to get a reference to a particular section of the config file. For example, if we want to work with the connectionStrings section, we use the code

var section = (ConnectionStringsSection) config.GetSection("connectionStrings");

Now we can check to see if the section is already encrypted (IsProtected property), encrypt the section (ProtectSection method), or decrypt the section (UnprotectSection method). The following code encrypts the connectionString section

string appName = "MyAwesomeApp.exe";
Configuration config = ConfigurationManager.OpenExeConfiguration(appName);
ConnectionStringsSection section = config.GetSection("connectionStrings") as ConnectionStringsSection;
if (!section.SectionInformation.IsProtected)
{
    section.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
}
config.Save();


The code below decrypts the connectionString section

string appName = "MyAwesomeApp.exe";
Configuration config = ConfigurationManager.OpenExeConfiguration(appName);
ConnectionStringsSection section = config.GetSection("connectionStrings") as ConnectionStringsSection;
if (section.SectionInformation.IsProtected)
{
    //it is so we need to remove the encryption
    section.SectionInformation.UnprotectSection();
}
config.Save();

The final step is to write changes back to the file by calling the Configuration object's Save method.
config.Save();

Below is the unencrypted config file

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <connectionStrings>
    <add name="MyApp_Dev" connectionString="Data Source=Server01;Initial Catalog=AwesomeDB_Dev;Integrated Security=True"/>
    <add name="MyApp_QA" connectionString="Data Source=Server01;Initial Catalog=AwesomeDB_QA;Integrated Security=True"/>
    <add name="MyApp_Prod" connectionString="Data Source=Server01;Initial Catalog=AwesomeDB;Integrated Security=True"/>
  </connectionStrings>
  <appSettings>
    <add key="CompanyName" value="The Awesome Company"/>
    <add key="CompanyPhone" value="313-555-4321"/>
  </appSettings>
</configuration>

And here is the same config file with the connectionStrings section encrypted
<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <connectionStrings configProtectionProvider="DataProtectionConfigurationProvider">
    <EncryptedData>
      <CipherData>
        <CipherValue>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA/NM6tBoQfE2WAlH0NVuRWQQAAAACAAAAAAAQZgAAAAEAACAAAADdZOBg8ugEiLd8RlHk95C+fuXUTC706/hDeZT2XN8G0gAAAAAOgAAAAAIAACAAAABEW5bTk3uNJDoKMt26yvD+YY1v0fqe2et8KWeJOewx3UADAADGEgVw4K4nlwQjjKpu6BZYMYXeB1eovlbYrEbg/A+Kk6UhqBTdAqt6UmW/6B4M2pXWpP9VqDTDfr7GKEK06qDdXRnYfGYH1JAg2xPoI3aeA5DQP6HAIbSymXejw/B+s47L4rTT2R4PvfRfMYiMppxCrEh+eopKdvcg34JsD+o6Il+6a4TiTiYLzQ9BESoxepfY9pqaADFrLChPYzwjymAqfsAFE/n++APjb7aktViu5+AI+QM3RDEhDFzsP7Wy+UkGsPrIoyMUaLMFNibK7LZFiBL6+VHZEur+4xyI+Uu+UH194oBOX1g77nBzuTsivNgH7048JhbzeSk9mjOZrGACX433vC6neqGaJ42sC9sC16JX9CGEZrnipeoyEeR0RT1H3A38Xasn9lYkUyE3LBIJ1k0iZJoAAnCvXfmSzXoXsHjpvmmlst3SAo24TL7WsdaVliBR/6i5N6AswTOemjvFe0Rhb5zoeGX36aI4SD71DYaLxqss1MVm5gc6CEsringGeHbFRqu/kTylA6xgr8rfL/eTcjQs2zRIUTzc4/DUSsyNIUWQ0+z+BDoR/AGTSx7v2OKp2vpmHLf7kn3DxYITlpDV6voJrbmpMx9lN3Z7DYQD4vNLczGPHpKbBCEXDHNw1E7QDrQaz38Ka4pRKnCRa/GL7X8euA82bYaJmEmUEBqhcZg3mQHR31X5tUbZ3HkvMxEUcRmJITpj29V6RKEmugkWmxl3OCJzuZ3vcUSgKnQIAJkqr3YBuZR3YJjDCo7i5EElFAcpv89rM2RtSVNC7i6KLJLsISjOgzD5CktrDjgMZLtxN6BdyljvWNj0L29APvSxd5ovxgCOKXE2UYpH3l4HgX78P82wx1vBNhO5UmqP7xdz1jTi9cGP6HHNiv8qJZjlTOO2/afnDDYt/pKJqWWTRUhJiZZipC+dQ6bBYOhMZbclROzptu0fIYwqdeDxPcXalN3kjIXW4kwblSd4TxmCO01JD9eL+MFT/PSaipj7CqaAHTnpL0n40jV4WK4EaxUTuXi0/NXBUjMFw4ZTdlEnLv1jjCKZ+r2Q1YbrrI286PATrwLDbYsVVGEefp8vBsOD7xfHmIPeYolbEOq2QAAAAHoGwcm8HT1RS0pXvgOjRR37Gy1BLfG/5xsYdZqOB9nT6xthVULhqwPlAsFwDXLfNZQLnpZiocwHDf07DeQiNK8=</CipherValue>
      </CipherData>
    </EncryptedData>
  </connectionStrings>
  <appSettings>
    <add key="CompanyName" value="The Awesome Company"/>
    <add key="CompanyPhone" value="313-555-4321"/>
  </appSettings>
</configuration>

Here is a complete code snippet for getting a config and toggling the decryption of the connectionStrings section

string appName = "MyAwesomeApp.exe";
Configuration config = ConfigurationManager.OpenExeConfiguration(appName);
ConnectionStringsSection section = config.GetSection("connectionStrings") as ConnectionStringsSection;
if (section.SectionInformation.IsProtected)
{
    section.SectionInformation.UnprotectSection();
}
else
{
    section.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
}
config.Save();

One of the nice things about using these libraries to encrypt config file sections is that we don’t need to change our code that reads the values in this section. For example, the following code

string connectionString = section.ConnectionStrings["MyApp_Dev"].ConnectionString;
.Net | C#
Tuesday, June 05, 2012 10:01:00 AM (Eastern Standard Time, UTC-05:00)
 Monday, June 04, 2012
Monday, June 04, 2012 9:01:00 AM (Eastern Standard Time, UTC-05:00)
 Sunday, June 03, 2012

If you are planning to attend Tech Ed North America or if you will be in the Orlando, FL area June 10, I recommend you check out the INETA Community Leadership Summit.

This free event will bring together leaders in the developer community to exchange ideas with one another. INETA is hosting the event at the Orlando City Hall on Sunday June 10 from noon to 5PM.

As part of the Summit, I will moderate a discussion titled "Getting Others Involved: Building a Leadership Team, Recruiting Volunteers & Growing Your Membership". This is based on my experience helping to grow the Great Lakes Area .NET User Group over the last couple years. Expect lots of interactions and a chance to listen and to share ideas. Other moderated discussion sessions will include “How to start a user group” and “Working with sponsors”.

In addition, this is a great chance to meet the INETA Board of Directors and other influencers in the development community.

The Summit is free and there is even an after-party hosted by Grape City, but you must register in advance at http://inetals2012.eventbrite.com/.

You can find more information at http://ineta.org/summit2012/.

Sunday, June 03, 2012 10:06:00 AM (Eastern Standard Time, UTC-05:00)
 Friday, June 01, 2012

Here is Steve Smith’s presentation on Common Design Patterns at the May 2012 Great Lakes Area .NET User Group (GANG).

Friday, June 01, 2012 10:00:00 AM (Eastern Standard Time, UTC-05:00)