Welcome

You have reached the blog of Keith Elder. Thank you for visiting! Feel free to click the twitter icon to the right and follow me on twitter.

Codemash 2.0.1.0 – Speaking, MCing and Podcasting

Posted by Keith Elder | Posted in .Net, MVP10, Speaking | Posted on 08-01-2010

2

Codemash 2.0.1.0 is just a few days away and it is going to be a busy few days for me this year.

This year I was asked to be the official MC of Codemash.  I was truly honored to be asked and I’ve been gargling salt water and oils to keep the throat fresh ever since. 

On Wednesday for the pre-compiler I’ll be doing a full day of what I call “.Net From Scratch” or “.Net Basics”.  This is a perfect opportunity for those that don’t know .Net to get a full picture of the platform from ground zero.  Here is the official abstract from the Codemash site:

.NET Basics with Keith Elder (all day)

Technology/Platform: .NET
Difficulty Level: 100/200

Abstract: This all-day session is targeted to anyone new to .NET. You’ll start out with basic “What is .NET?” and move through building applications on in various .NET technologies. Topics covered include:

  • What is .NET? Discusses the fundamentals of the .NET platform, what it is, where it can be used, and a few myths about .NET.
  • How to Use Your Hammer – Visual Studio Walks you through how to use Visual Studio features like Intellisense, Source Control integration, debugging, and other critical foundational skills.
  • A Programmer’s Primer Programming in C# Covers the basics of the C# language from Object Oriented Programming principles all the way to generics, collections, and LINQ. This is a programmer’s primer, which means you should already know at least one language and have some experience programming.
  • Client Applications Covers standard Windows applications, Windows mobile applications and newer Windows applications based on Windows Presentation Foundation (WPF).
  • Web ApplicationsCovers the variety of ways to build web-based applications in .NET. standard ASP.NET, ASP.NET MVC, Silverlight and Web Services.

As if that wasn’t enough, Woody and I will be recording some podcasts for Deep Fried Bytes here and there when we can.  It is going to be a busy few days but I am ready. 

My only hitch at the moment is I hope to get clearance from my eye doctor to fly.  Right now I am grounded since I had eye surgery on Monday.  If the Dr grounds me when we meet on Monday, I’ll just start driving.  See you there!

.Net 4.0 – Start Reading Between the Lines – Learn Silverlight and Entity Framework

Posted by Keith Elder | Posted in .Net, Asp.Net, C#, Internet, Mobile Devices, MVP10, PC Software, Smart Clients, SQL Server | Posted on 30-11-2009

11

I started writing this as a general recap of PDC for team members but the more I thought about what was announced at PDC, the longer the email got.  Ultimately I decided to put it out so you dear reader could also gain some insight from things announced at PDC. 

For starters listen to the podcast we recorded with Scott Guthrie or “The Gu”, or “His Guness”, or “ScottGu” about Silverlight 4 announcements among other things while at PDC. 

The big stories out of PDC that I think everyone should take note of are Silverlight 4, Entity Framework 4 and Windows Mobile. Wait Windows Mobile 7? Yes.  Wait… I didn’t hear anything about Windows Mobile 7? Well I didn’t either and that is why this post is called “read between the lines”.  Call it speculation or whatever, but I think I can bring you up to speed on what is about to happen (and no I have no official behind the scenes information, I’m just a guy with a brain).  Before we get to Windows Mobile 7, let’s start with Silverlight.

Silverlight

Silverlight 4 had tons of announcements including:

  • Camera and microphone support
  • Trusted out of browser support.  This means one can access COM (for example, an application could access Outlook APIs)
  • Lots of line of business app controls
  • Added support for drag and drop
  • WCF RIA Services (this is basically what I’m calling the new CSLA, if you listen to the podcast you’ll find out that Rocky worked with the team closely on RIA Services)
  • Print natively
  • More…

Tim has a great recap of all the Silverlight announcements here with links to videos:

http://timheuer.com/blog/archive/2009/11/22/pdc-silverlight-resources-link-dump-learn-silverlight.aspx

Now what does this all mean? It means the line is blurring between client and server applications. It also means we are coming back full circle to “Smart Clients” (which were hot in 2005/2006 but were forgotten due to the Web 2.0 hype.  The only difference is this new breed of application (Silver Clients?) can run directly from a web site, or on a client’s machine.  It also means that Silverlight is going to finally fulfill the vision we heard about a long long time ago that was called WPF/e (WPF Everywhere).  A lot of people have forgotten this but we are seeing it take full shape now.  For businesses that are writing applications internally, I think we are going to start seeing a huge shift away from writing Asp.Net/MVC apps and a move towards the rich model with Silverlight.  I mean seriously, why wouldn’t you? If you get cross platform compatibility, rich data binding, write once and work in any browser, why would developers that are trying to build internal business applications continue to kill themselves writing JavaScript, fighting CSS and browser compatibility?  I can’t think of a reason either.  In my opinion this is just a waste of time (and always has been).  There is something extremely powerful putting a variable in memory and having it be there when you need it without having to worry about sessions, state, etc.  Yes we are FINALLY getting back to the client programming model, just coming at it a different way. 

Entity Framework

Let’s talk about Entity Framework 4.0 for a moment.  This is another big piece of news.  It is big because as .Net developers we will finally have one true way to access data that fits the multitude of ways we have to work.  Here’s a recap of announcements (not a complete list, watch the videos from PDC):

  • POCO – supports plain old clr objects
  • EDM designer enhancements
  • Better stored proc support
  • Model first (then gen database model)

Doug Purdy (who we also interviewed for Deep Fried Bytes while at PDC) has a list of the sessions that cover the Entity Framework 4.0.  Just start at the top and work your way down as far as you can.  At least watch the first video as it shows off all the features of EF.

http://www.douglaspurdy.com/2009/11/22/pdc-2009-data-and-modeling-talks-2/

With the number of features that were announced in EF4 I think we are on the verge of seeing the demise of NHibernate usage by developers in the .Net stack.  For those that have used NHibernate in the past, it is worth another look at the Entity Framework to be released in .Net 4.0.  About the only thing EF4 doesn’t do that NHibernate does do is built-in caching (which hey, there’s this caching thing that AppFabric does, hmm, wonder if they’ll use that? Why not! 🙂 ).  But the big thing to note between EF4 and NHibernate is we are starting to see where this whole modeling thing with OSLO is going (edm files are m fles and so on).  And of course there is the bigger picture of reusing this model in report services, BI and other areas (although we haven’t *seen* that really working yet, it is coming though see next sentence).  As EF4 makes it way into other products throughout the Microsoft ecosystem it is going to be extremely hard to avoid the Entity Framework.  Read between the lines, the writing is on the wall, LEARN THE ENTITY FRAMEWORK.

Just a side bar here because I know someone is going to ask me this at a later time.  Will the Entity Framework kill NHibernate? Answer: Nope I’m not saying that. 

Out of band developers that seem to have a knack for yelling the loudest will continue to use NHibernate but a much larger ecosystem will leverage the out of the box Entity Framework in .Net 4.0.  Think back for just a bit.  History is about to repeat itself all over again.  Remember when we got MSTest and or MSBuild?  Same thing is happening again. There is now an out of the box product for standardizing data access.  Are their alternatives? Sure.  Just as MSTest didn’t kill NUnit or MBUnit and MSBUILD didn’t kill NAnt, EF4 will not kill NHibernate.  However, if you look at the number of developers using MSBuild or MSTest it is high. Extremely high.  Why is that? Answer: pain, ease of use, integration, documentation.  MSTest is not the best testing framework out there (this is a proven fact), but it is good enough for 90% plus test cases.  Entity Framework 4.0 is going to put an ORM in the hands of developers.  And you know what, it doesn’t suck either. 

Windows Mobile 7

And now onto Windows Mobile 7. 

Is this WinMo 7 above?  I honestly don’t know, I found these screen shots on http://windowsphonemix.com/ web site.  BTW, notice that URL?  Mix? Yes Mix.  Mix is the first of the three major conferences Microsoft puts on each year.  The very last slide at PDC during the last keynote said, “Come to Mix 2010 for Windows Mobile 7 futures”.  A lot of people missed this because they were tuned out from the SharePoint demos and already packing to leave.  But there it was on the big screens.  Thus we know Mix is when we’ll see Windows Mobile 7.  Again, listen to the podcast to get some other insight. 

Here’s a quote:  “Three screens and the cloud”

We heard this over and over at PDC.  Let’s read between the lines a bit shall we?

I have three screens:  Windows Desktop, Web, Mobile.  Ok, if I want to write an app that will run on all three what do I as a developer have to do today?  Let’s see, well, we could write a ClickOnce deployed Smart Client for the Desktop that uses WPF.  For the web, well, we would have to switch gears completely and rewrite our app in Asp.Net or Asp.Net MVC to get that screen.  For mobile, even tougher, we have to rewrite the app again to get the mobile version.  Let’s think about this differently again.  Think about it, how many technologies would a developer have to know in order to an application for these three different screens;  WPF, JavaScript, HTML, and CSS will be used just to name a few.

Now, let’s switch gears.  What if I used Silverlight 4 to write my app?  Well, it could work in the browser no doubt.  Hmmm, it could also work on the Desktop using the out of browser experience with elevated permissions.  What about mobile? 

“Wait, didn’t you just say Keith that at Mix we’ll get to see Windows Mobile 7?”

Yes! 

“And hasn’t there already been talk of using Silverlight for mobile?”

Yes!

“Aha! Three screens with Silverlight, I get it!”

That’s right my friendly .Net developers the writing is on the wall. The vision of WPF/e (WPF Everywhere) is about to come true.  We’ve waited for years but it is just around the corner as I predicted would happen years ago.

http://www.keithelder.net/blog/archive/2007/01/12/Microsofts-Response-To-The-iPhone-Is-Right-Around-The-Corner.aspx 

(ok, so it wasn’t right around the corner but 3+ years later)

Moral of the story?

LEARN SILVERLIGHT so you can make millions of dollars building Mobile applications just like the iPhone devs.  There, I just made you rich by putting this puzzle together for you, please send me 20% of all profits.

You are welcome.

Visual Studio Tutorial: Part 1 – Overview and Layout

Posted by Keith Elder | Posted in .Net, Visual Studio | Posted on 30-08-2009

0

New to Visual Studio and .Net development?  If so, this short eight minute video will get you started in learning how to use Visual Studio to develop on the .Net platform. 

In this first installment you will learn the layout of Visual Studio and how to organize windows within Visual Studio and customize the layout.

Hope you enjoy.

Speaking at CodeStock and Deep Fried Bytes Live!

Posted by Keith Elder | Posted in .Net, Speaking | Posted on 23-06-2009

3

 

Last year I was invited to speak at a lot of conferences and code camps but the one that I didn’t get to go to due to scheduling conflicts was CodeStock held in Knoxville, TN.  This year I made sure it was on my schedule because the majority of my Twitterverse / Tribe will be there and I couldn’t stand to see the tweets from a remote location again this year.

 

CodeStock Sessions

I’ll be doing two of my “Back To Basics” sessions this year to help those that want to learn .Net get acclimated into the .Net platform.  The two sessions are:

  • What is .Net?
  • A Programmer’s Primer Programming in C#

While these two sessions aren’t about the latest and greatest technology and won’t fill the room, I strongly believe they are a necessity for code camps and other areas.  Speakers tend to focus on the latest and greatest shiny new thing but there is a huge whole whereby those that are starting at ground zero don’t have a place to go.  I’m glad these sessions got picked.

Deep Fried Bytes Live!

On Friday evening from 5:00 – 6:00 Woody and myself will be doing a Deep Fried Bytes episode live! 

But, the coolest announcement is that Elly Mae will be there live and in person to help us kick off the show.  So for those in attendance you’ll get a special treat no doubt getting to meet the truest Southern Belle in the South. 

It is going to be a great weekend with loads of fun.  See you there! (ps – rumor has it there are a handful of tickets left if you still haven’t signed up)

Fix For WCF NetMsmqBinding Not Picking Up Messages in Queue

Posted by Keith Elder | Posted in .Net, WCF, Web Services | Posted on 03-06-2009

2

Here’s the problem.  When hosting WCF services using the NetMsmqBinding in IIS7/WAS (Windows Activation Service) the application times out after 20 minutes.  While this isn’t the problem and is the default behavior in IIS it leads to the problem.  When the application is timed out, if a new message arrives in the queue, the WCF service remains idle.  In other words messages will just pile up in the queue (not good!). 

After contacting support about this issue I finally got back some information on how to address this issue so I’m posting it in case someone else runs into this issue.  Here is what you should do if you run into this problem.

  1. Ensure that the queue is named as virtual directory/serviceName.svc.  So if your application is at http://localhost/myTest/myTest.svc, the queue name should be myTest/myTest.svc.  We also should ensure that the WCF endpoint address reflects this queue name
  2. Both the IIS worker process (App Pool) and the Net.Msmq Listener service should use the same account, this account must also have Peek and Receive rights on the queue (but it’s better to just give it full control).  You can verify the account used by your web service by checking the account used by w3wp.exe in task manager
  3. Ensure that the Net.Msmq listener is running using an unrestricted token, the following command should work “sc sidtype netmsmqactivator unrestricted”
  4. Add a DWORD called “AllowNonauthenticatedRpc” to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\security, and set it to 1

Hope this helps someone, and if I find any other information, I’ll keep this updated.