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.

TechEd 2010 .NET From Scratch Slides

Posted by Keith Elder | Posted in .Net, Asp.Net, C#, Mobile Devices, Presentations, Smart Clients, Speaking, SQL Server, TechEd, Visual Studio, WCF, Web Services | Posted on 18-06-2010

0

TechEd 2010 was in New Orleans last week and I had the pleasure of doing a full day pre-conf session at TechEd.  Pre-confs are longer sessions where attendees can get into more details.  This year I did “.NET From Scratch” which was a one day session to introduce developers to the .NET platform. 

This seminar is for anyone who is starting at ground zero with .NET and wants a deep dive into the platform starting from scratch. It is designed for developers experienced in at least one other language, and starts with the basics of . NET and covers Microsoft Visual Studio, writing code in C#, and how to build applications in various technologies of the platform such as Windows, Web, Microsoft Silverlight, and Windows Mobile. If you are new to writing applications on Microsoft .NET, what better way to start your Tech·Ed experience?

As promised to the attendees, the slide decks and demos can be downloaded from the following URL:

http://keithelder.net/presentations/NETFromScratch/NETFromScratch.zip

Remember when learning a new platform as large as .NET the main thing to focus on are your immediate needs.  That may be a language and a framework and possibly web programming.  It is impossible to learn or know everything about a platform as large as .NET but knowing what is possible is half of the battle.  As engineers if we know it is possible it is just a matter of research to figure out how to make it happen. 

A big thank you to those that attended the session and I am truly sorry about how cold it was in the room.  If I’d known in advance I’d brought some firewood and blankets.  Enjoy.

Is Good on the iPhone a Blackberry Killer?

Posted by Keith Elder | Posted in Mobile Devices | Posted on 07-02-2010

2

IMG_0053 You’ve no doubt heard of using a Blackberry to access email at work.  But did you know there is another company that supports a variety of devices including Windows Mobile and now the iPhone?  The company is called Good Technology and they recently released their enterprise email messaging application for the iPhone.  I’ve been using this for several weeks and it is time to answer the question:

“Is this ‘Good’ enough to replace a Blackberry?”

I meant to take some screenshots when I first installed this several weeks ago but I forgot so when I recently had a password issue with the application I had to reinstall it.  I’ve posted the photos of the application on Flickr.

View the application installation photos here: http://www.flickr.com/photos/keithelder/sets/72157623371032880/ 

The Good (no pun intended)

For light email use I have found Good’s iPhone application has served its purpose well.  The application syncs three things from the corporate Exchange server: Inbox, Contacts, and Calendar.

The really nice thing about the Good application on the iPhone as compared to using it on Windows Mobile is the application is sandboxed.  The Good software installed on a Windows Mobile device will commandeer the entire phone by replacing the home screen and virtually taking over the entire phone.  It is horrible, absolutely the worst thing I’ve ever installed on a Windows Mobile phone.  Conversely on the iPhone the application is sandboxed because, well, that’s how Apple made it.  I like this as it means I really have true work / personal data separation on one device.  If I want to read personal email, I open the built-in mail app on the iPhone and if I want to read work email I just launch the Good application on the iPhone. 

Of course there are some drawbacks to this sandboxing.  It means the application cannot alert you for appointments and those types of things.  This is where Good uses the push technology built into the iPhone platform.  But even this doesn’t work so well.

If you get an email at work the Good icon on the application (similar to the mail, phone, text messaging and Facebook applications) will put a number in the corner indicating you have new email.  

The application also allows one to search the global address book. This is handy when the name of the person in the office is known but not their phone number.  It is a little sluggish but it works.

The user interface for checking email, calendar and contacts should feel really familiar as they are modeled after the applications that come on the phone by default.  Thus there is nothing new to learn. 

The Bad

Since the Good application is sandboxed and not allowed to run in the background the application obviously must be started each and every time you want to do anything.  This is the first and one of the most major drawbacks of Good on the iPhone, the startup time.  How long? How about 20 seconds to a minute depending? 

Not only is the application load time incredibly slow but after it loads it must then catch up and sync ALL of the email you’ve already read, checked and deleted from your desktop.  If you get as much email as I do at work this can push the total time to just peek at work email to almost a minute and that is before you actually do anything!  Personally I disagree with Good’s approach on this.  I understand what they are doing, they are doing guaranteed message delivery for the device.  However, when the application starts it should just sync with the current Inbox and leave it at that.  What is on the server is all I care about.

As far as email goes the only email folder that can be viewed is the Inbox, at least as of this version. That means if email is stored in other folders those messages will not be able to be read. For those using Exchange server side filtering this may be a problem. The latest update does finally at least show the other folders on the server but that is it. 

There are very few settings available in the preferences screen. The latest update finally added the ability to edit the email signature. 

IMG_0069

There are no ways to get various alerts.  Say a high priority email comes in.  Since the application isn’t running the only thing Good can do is push the message to the phone. The Blackberry for example supports various alerts on different mailbox folders. 

I mentioned earlier the application is sandboxed and this makes the application less usable than say a Blackberry which is always on.  For example if you have an appointment Good gets the reminder via a push notification. All that is said is “Good Event Reminder”.  This means the applications must then be launched to see the appointment which in turns means it is going to take anywhere from 20 seconds to a minute depending on the last time the application was launched. 

The Verdict

It depends. If you check work email occasionally or plan on very light use then Good for the iPhone may be something to consider if your company already has a Good server installed.  Of course this begs the question then do you really need to be connected if you have such little use.  Your team leader will have to decide.

For heavy Blackberry users I don’t expect them to give up their devices in favor of using Good on the iPhone…. ever.

I work at home so I am not wandering around the office to meetings and having hallway conversations where I could lose track of time and be late for a meeting.  I need to keep track of things when I am away from my desk for lunch, on vacation or at a conference.  Other than that I am already connected.  Now, if I was in the office everyday I would use my Windows Mobile Blackjack II device which talks directly to the Exchange server or a Blackberry. 

Hope this helps if you are considering jumping the shark over to the iPhone just because you thought you could now stay connected to the office using Good.  Instead of calling it “staying connected” I would call it “sporadic connectedness”. 

.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.

Tethering iPhone 3G on Windows 7

Posted by | Posted in Mobile Devices, Windows | Posted on 22-06-2009

45

DISCLAIMER

Doing this is not supported by AT&T and other wireless carriers.  Consult with your carrier before following these instructions. 

Tethering iPhone 3G

Folks, it is here, and it is a reality!  I am writing this blog article from Windows 7 tethered to my notebook via an iPhone 3g.  The best part of all is you don’t have to jail break the phone to do it.  For the record I am using an AT&T locked, non-hacked, standard iPhone.  Nothing has been done to this phone in anyway whatsoever.  Here is what you need to get this setup and working. 

Latest Updates

Be sure you have iTunes version 8.2 installed and then get the latest version of the iPhone OS, version 3.0. 

Install MobileConfigs

After the phone is updated to the latest firmware and version of iTunes go to http://help.benm.at from your iPhone. 

Follow the on screen settings to find your country, provider and so on.  Once the MobileConfig is download go into “Settings->General->Network” on your iPhone and enable tethering. 

Windows 7

Now connect the phone to your computer and a new driver will install.  You can find it in the control panel under Network called “Apple Mobile Device Ethernet”. 

image

That’s it, you should be online and tethered now.  I bet you expected a really long-winded process?  Nope, it is too simple.

AT&T iPhone/Mobile Tethered Users Beware: One Gigabyte of Wireless Bandwidth: $503.00

Posted by Keith Elder | Posted in Apple, Mobile Devices | Posted on 16-11-2008

3

imageAT&T recently announced they were going to support tethering for the iPhone.  I am sure a lot of users are happy about this move, I know I am as that has been the one thing that has stopped me from not getting an iPhone and to this day is why I continue to use my Blackjack II.  This announcement, coupled with a reader commenting on a previous article about whether I would recommend tethering the Blackjack II if someone traveled 70% of the time, got my curiosity up.  Thus I started to dig in. 

To answer the comment from the reader, in my opinion, that much travel would warrant more of a dedicated device.  Curious I went over to the AT&T web site to check out the AT&T USBConnect Mercury device they’ve been advertising for months now.  You know the one, the one that Bill Kurtis finds the Internet with?

Right now the device is free after mail-in rebate. Here is a screen shot for posterity sakes.

image

If you walk through the shopping cart the next thing you have to do is add a data plan.  Currently only one plan is available and the monthly cost today is $60 / month which gives you 5GB of data. 

Currently AT&T offers a tethering option for phones like the Blackjack II and others.  Both the tethering data plan and the USBConnect Mercury use the same calculations, 5GB to start with and then so much for additional data.

Pay Attention!

Ok, here is the kicker to this that a lot of people probably won’t pay attention to.  The additional data cost is:

$0.00048/KB

Here’s a snapshot of the value from AT&T’s web site (for posterity):

image

Someone may read this and go, cool, that sounds really cheap.  There are a lot of zeros in there.  But don’t be fooled!

The key here is they measure cost in terms of KB (kilobytes).  For those that don’t know how this works, there are 1,024 bytes in a Kilobyte.  To put this into perspective, if you visit the home page of http://www.amazon.com, you will download roughly 300KB to load the page.  As you can see, this is a really low level of measurement, really we can only go one step lower and that is to just measure bytes.  

There are 1024KB in a Megabyte and 1024MB in a Gigabyte.  Thus our formula for calculating how much it would cost a consumer that downloaded an extra GB (gigabyte) of data during the month by either tethering an iPhone or using the USBConnect Mercury is as follows:

1024(KB) = 1MB
1024(MB) = 1GB
Cost per KB:  $0.00048

1024 * 1024 * .00048 = $503.31

 

$12/GB for First 5GB, and then $503/GB After That

Can you just say wow?  I couldn’t believe this when I added this up.  I was in so much disbelief I had a few programmer buddies calculate this as well. 

It would make more sense logically speaking for AT&T to say they gave you 5GB at $60.00, and then if you use another GB, then it is going to be $11.99.  But that would be too easy to calculate.  For some reason AT&T thinks they can justify charging $503 for one GB of wireless data, yet sell you others at $12 a GB. 

For those that are thinking they can use their iPhone any and everywhere as much as they want, seriously, be careful!  These words of wisdom aren’t just for iPhone users, but for anyone tethering a device to AT&T’s network like the USBConnect Mercury or other mobile phones that is a heavy user and traveler.