CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

John Papa [MVP C#]

.NET Code Samples, Data Access, and Other Musings

June 2006 - Posts

  • Invisible Shield - First Impressions

    I always put my cell phones and portable music players in my pocket. I like my devices thin and in my pocket. I just don’t like bulky belt clips that make you look like Batman. So I buy thin devices but they tend to get scratched in my pocket and dust can get under the screen. The biggest issue is the screen of these thin devices … they tend to get very dirty, scratched, or even get dust particles under them. So I started looking into finding something that would help keep the screen protected. The Q has such a crisp and bright screen that I do not want it to become blurred by fuzzy protectors.

    I first bought some cheap disposable protectors (who shall remain nameless) from a local store and they were just horrible. I had to cut them to fit the Q (pretty easy to do) and applying a new one every week. It looked slightly blurry as soon as I applied it and got worse with every passing day. (It was smudged and never cleaned up well at all.) So I gave up on the inexpensive/disposable protectors and started looking for something better.

    After doing some research, I contacted a few companies about their products so I could try them out. In this review I will be reviewing the Invisible Shield (aka IS) product by Shield Zone. I chose to try the one for my new Motorola Q Smartphone since the phone is thin, looks very susceptible to scratches and pretty much goes everywhere with me in my pocket. There are 2 models of IS for the Motorola Q: one that fits just over the screen for $9.95 and one that fits the front and the back (including the screen) for $24.95. I am reviewing the front/back model.

    I chose the IS product because it claims to be super thin, very durable, is supposedly easy to remove (just in case I don’t like it) and very transparent. The manufacturer (Shield Zone) also boasts a lifetime warranty on the product. I have not read the fine print yet but it looks like its covered for life. IS is a bit pricey for me as some competitors like Best Skins Ever (BSE) are about 1/3 the cost of the IS and get great reviews, the lifetime warranty made me give IS a shot. Most of the better products available from different companies make these protective skins for a specific phone or music player. So if you invest in one, make sure you get the one made specifically for your device.

    OK, so I got the IS today in the mail and I took some photos of the packaging (see below). It comes with the plastic-like screens, a black squeegee, a water based solution in a spray bottle and instructions.

     Installation:

    Instructions said to turn off the device, remove the battery and its cover so that’s where I started. I also spent a few minutes washing my hands and cleaning the device with a soft eye glass cleaning cloth to remove grease and smudges from the Q.

    Note: There is a video that you can watch on their web site to show you how to install it, as well.

    Next I removed the shield for the battery cover off of its paper backing. There are several pieces that have to be applied, so I figured I would start with the least important to me just in case I screwed it up. I removed the IS for the battery cover, sprayed both sides of it lightly (one side is sticky) with the provided solution, and stuck it on the battery cover. Then I used the squeegee to work out the excess water and bubbles. It took me about 2 minutes for this entire step, most of which was spent working out the water and bubbles with the squeegee (gotta love that word). So far it looks pretty good. Here is a photo of my battery cover just after I installed the IS on it.

    At this point you are supposed to repeat the process for the remaining IS pieces. I continued on with the back, then the front pieces and finally the screen. It took me only a few minutes to apply each piece, other than the screen protector. It took me about 30 minutes to apply the screen protector to my liking. I actually got it on in the second try (after about 5 minutes) the way I liked it but then I noticed there is a small line in the IS for the screen. So I took off the IS that was on the screen completely and sprayed it with the solution again and tried to rub off the line. I thought it might be lint at first, but after a while I realized it was not moving anywhere. I even tried running water over it in the sink and rubbing it with me fingers. It never moved. I gave up after a while realizing it was an imperfection that I was going to live with until I could contact Shield Zone and request a new screen protector. I guess I will get to try out their lifetime warranty. For now I will leave it on and see if it works itself out somehow as it “cures”. The instructions say to give it 24 hours to completely dry.

    Here are some photos of the Q with the IS installed (front and back). You cannot see the imperfection in the lower left corner of the screen protector in this photo, unfortunately … but its there.

    Wrap-Up (for now)

    The installation was very simple for all of the pieces. The only issue I ran into was with applying the screen protector. I think there is an imperfection in it and I will contact Shield Zone and get a replacement screen protector based on the their lifetime warranty. I will follow up with my review after a few days of testing out the new IS to see how it holds up … which if course is the true test. The whole point for me is to find something that is durable, thin and barely noticeable. The Q has such a crisp and bright screen that I do not want it to become blurred by fuzzy protectors.

     

    Overall … I am very disappointed in the appearance of the screen so far. But since there is a warranty and i can get a replacement for the screen, I will hold off on judgement on that for now. The rest of the pieces went on just fine and look good to me. The product appears to be very durable so far … I will post more after I get to use it a bit more.

     

    UPDATE (7/3/2006):

    It has been a few days since I installed the IS ... its very slim and has protected my phone quite well. I purposefully put in in my pocket with coins and my cars keys and it did not scratch the phone at all. Also, I find that its easy to clean. I can rub smudges off of the screen protector easily with a lint free cloth (I use an eye glass cloth).

    There are some things so far I am less than thrilled with, though. For example, with the IS on I can still get my Q in the desktop charger that is made for the Q. However I had to work it in the first few times. The IS makes puting the Q in the charger a bit more difficult as the IS doesn't allow the Q to slide smoothly ... instead it sticks a bit as it slides in. Once in, the Q appears to barely fit in the charger stand and I have to be careful to take it out. Its a very snug fit with the IS.  Whether its the IS that's too thick or the stand that is to tight, who knows. It works, but its just something to think about.

    As stated earlier, my screen protector appears to have an imperfection in it. Its a small line in the screen that I just could not remove (I thought it was lint but was wrong). The imperfection is still there and its quite annoying to have on the screen. I now also appear to have a spec of dust on the screen between the IS and the Q. it probably got in there while I as so focussed on cleaning the imperfection. Instead of taking it off and cleaning it again, i'll wait for the replacement screen protector to arrive for Shield Zone. 

    Overall I am very impressed with the IS. Assuming the replacement screen protector is as clean and clear as the other pieces I received then the only issue I will have to deal with is working the Q into the charger stand smoothly. The IS is very clear so its easy to see the screen through it. Unlike other screen protectors I have had, I barely notice and fuzziness.

    Posted Jun 30 2006, 09:09 PM by John Papa with 3 comment(s)
    Filed under:
  • Smartphone Skills: Part 03 - Development Environment

    So far in this series I have introduced the basics of Smartphone development and how to get setup with the device emulators. Now that we’re ready to do some Smartphone development (or in general in mobile development) its time to crank up the IDE, familiarize yourself with the tools and start coding. So that’s what we’ll do in this post.

    *** In case you want to review my previous posts on this topic, I’ll include a list of the posts in this series at the bottom of each post.

    *** Before we kick in too far,you might want to grab the latest service pack (which came out a week ago) for the mobile development. You can grab the .NET Compact Framework 2.0 Service Pack 1 from this link here.

     

    Creating a New Project – Hello World!

    Once you have the tools installed such as the CF, the Smartphone SDK and any emulators (see my previous posts in this series for the links if you need them) the next step is to create your first project. So we start by opening Visual Studio.NET 2005 and creating a new project. You’ll want to choose the language, then choose “Smart Device” and then select “Windows Mobile 5.0 Smartphone” from the project type list. Then select “Device Application” since we’ll be developing a simple interactive “Hello World” application. (If you do not see “Windows Mobile 5.0 Smartphone” in the project type list, you need to install the Smartphone SDK.)

     

     

    The IDE

    The first thing you’ll probably notice is that the default form’s designer appears (Form1.cs) and it looks like a Smartphone device. While the designer may not look exactly like the Smartphone you might own, its got the basic Smartphone criteria: the left and right menu buttons (soft keys), the D-pad for navigation and the ability to enter alphanumeric characters. Just like standard WinForm development, these buttons have events that you can write code for. The form itself has a title which you will want to customize (I’ll make mine say “Hello World”) and you can throw controls on the form, too.

     

    The Toolbox

    The Toolbox has some familiar controls such as the combo box, label, and textbox. On a Smartphone the button control is not used that often. Rather, the conventional way to select, save, continue or perform other events normally associated with a button control are handled with the soft key menu buttons or by clicking the middle of the D-pad. (A general rule of thumb is to always allow the click of the D-pad to perform a “selection” or a “done” action appropriate for the current screen.)

     

    Menus

    The soft keys are generally associated with menus that you can build in the Smartphone, too. The right menu (or soft key) often opens a menu for the current form. The menu often is used to show options for the current form including properties, settings, options, etc. Menu best practices still hold true here … keep your menu’s to 1 or 2 deep at most. On a Smartphone, even 2 deep menus can get messy. Keep your menu labels short, too. Space is very limited. Common terms are:

    • Options
    • Tools
    • Properties
    • Select
    • Refresh
    • Done
    • Cancel
    • Exit

     

    Other Tips

    Remember, we’re short of space. So keep the design of your forms small. Avoid the need to scroll  if possible, but it is OK to scroll a little. Generally, I try to keep my screens clean with all controls visible but if i cannot, I make sure there are no more than double the height (meaning don’t add more than a few controls off screen). Another option is to use the soft key menu (usually the right one) to continue to the next page … similar to a (gulp) wizard.

    Make sure you include an Exit option in your application. Its a big pet peeve of mine when applications do not include an Exit menu option on a Smartphone. Leaving your application running with no friendly way to kill it is just wrong.

     

    The Hello World Application

    Well, I promised to keep each of these posts short and sweet. So I’ll save the Hello World application for the next post in this series. I hope this one gave you a quick and dirty run through of creating an application and getting familiar with the IDE.

     

    Smartphone Skills Series:

  • Kudos to JetBrains Support of Resharper

    2 days ago I posted about my frustrating experiences with Resharper v2, specifically how when I type there is a delay in characters appearing. It was really slowing me down and causing me to stop and repeat my steps. I sent a note to JetBrains support and sent them a sample project of mine so they could try to repeat it. The project was small with only a handful of files. The files were all small too.

    This morning I got a message from them saying that they were able to reproduce the problem and are working on a solution. Its not fixed yet, but I am impressed with the quick responses and service that I have received from their support team. Hopefully the fix will be out soon, too.

  • Resharper 2 - Very slow?

    I've been using Resharper 2 since it was released and its been getting slower for me. What I mean is when I type the characters do not appear as fast as I type. The wierd thing is that it seems to be getting worse. Today it just go unbearable. i cannot be productive with the huge delay in typing that i am getting right now. I tried builds 248 - 252 for VS.NET 2005 and each one gives me the slowness.

    For now, I uninstalled the product until I can do some debugging and/o research with JetBrains. Resharper is an awesome tool and I feel like I am cutting of my right arm and trying to code without it, but it just got to be to darn slow. I'll be contacting them soon to see what else I can try.

    So my point for rambling on is to see if any of you have already been down this road with Resharper 2 and to what conclusion you came. How have your experiences been?

    Posted Jun 20 2006, 05:11 PM by John Papa with 28 comment(s)
    Filed under:
  • The Impact of Bill Gates on Developers

    Wow. This is big news. If you have not heard it yet, well, its all over the web, the papers and TV. Here is a link at CNET, one at Robert Scoble's blog (who is also leaving Microsoft, just more quickly), and yet another one at MSNBC.com.

    From the interview it sounds like he is going to step down from day to day duties over the next 2 years and then stay on board as the chairman. he says he wants to focus more on the Bill and Melinda Gates Foundation, which does quite a bit of good work.

    So what does this mean? Speculation is running rampant on how this will all play out, on why Gates is leaving, if Microsoft will change much without Gates in power . Nobody really knows, of course ... but we all have our theories.

    Gates inpsired me to become a developer. If not for him I might have gotten into construction, business management, or writing full time. How has Bill Gates impacted your life?

    For me, its a bit sad. This is the man who inspired a generation of developer and free thinkers. He certainly inspired me. I wish him the best of luck, and no the man is not a Saint nor am I saying that our jobs will all change ... its just a reminder that everything changes eventually. In this crazy industry where you blink and the technology sweeps past you, Gates was one of the few constants. He is a pioneer, a visionary and now he is moving on.

    In the end I imagine that not much will actually change in our day to day jobs, if anything at all. We might see some changes at Microsoft, but the reality is that Ballmer has been in control for a while now and whether you like him or not, his course is pretty much laid out. If it changes, then so be it. We'll adapt. We always do. That's what developers do by trade.

    Good luck Bill, and thanks.

     

     

  • Cable Upload/Download Speeds

    I have been doing a lot of uploading and downloading lately and I figured I would give a shot upgrading my upload and download speeds with RoadRunner. They charged me about $20 more a month to go from 4800 kbps download and 350 kbps upload to 7600 kbps download and 480 kbps upload. These are numbers I got after running several speed tests (before and after the switch) at both www.dslreports.com and www.speakeasy.net. So that is a 58% faster download speed and a 37% faster upload.

     

    OK, sounds great so far, but let’s see if it really makes a difference when downloading a DVD image from MSDN, streaming video, uploading large images to my customers’ servers, etc. I have a feeling that even though this all sounds like a huge improvement that the reality of the “other factors” (external server’s connection speed, traffic, etc) will prevent me from realizing any noticeable gains. I sure hope I am wrong, but I figured it was time to try it out. After all, I can always cancel it after a week if it doesn’t make a difference.

     

     

  • Accessing .NET Code from SQL Server Reporting Services' Reports

    The July 2007 issue of MSDN Magazine is now posted online. My latest Data Points column discusses how to create charts, embedded code, and access existing .NET class libraries from SQL Server Reporting Services 2005’s reports.

    You can read the article online here.

     

     

    Its been a busy year for me with family and work. So I am taking a short break from writing but will be back in the October 2006 issue of MSDN Magazine with my Data Points column that discusses System.Transactions in .NET 2. It will build upon my earlier article on this topic about 2 years ago (during the beta phase of .NET when it was still called Whidbey and SQL Server was Yukon).

     

    Posted Jun 13 2006, 11:00 PM by John Papa with 1 comment(s)
    Filed under: ,
  • SQL Server 2005 Everywhere Edition CTP

    As of a few days ago, the SQL Server 2005 Everywhere Edition CTP is avaialble for download. This is the successor to SQL Server CE (aren’t name changes great). You can grab it here. if you want some documentation, you can download the SQL Server 2005 Everywhere Edition Community Technology Preview Books Online as well.

    Some pretty cool features have been added and some MSDN Magazine readers have reminded me that its about time I wrote another article on mobile devices and using SQL Server … I have a full slate of topics right now, but probably later this year.

    In the meantime, i’ll be throwing my thoughts out on the topic on codebetter.com.

    Posted Jun 12 2006, 11:18 AM by John Papa with 1 comment(s)
    Filed under:
  • Study with Sahil - Learn About My Favorite Subject - ADO.NET 2

    Sahil Malik is holding a 1 day training session on ADO.NET 2. Its titled “The ADO.NET 2 Boot Camp”  and you can register here. Sahil is an industry expert who has some great insight on ADO.NET and more generally on data access. I love discussing data access with him as he clearly knows his stuff. For $349, that’s not a bad cost for 1 day with Sahil.

    Logistics:

    • July 21, 2006 - Hilton Charlotte Executive Park, Charlotte, North Carolina

    Here is a synopsis of the training:

    • A 30,000 feet view of ADO.NET: where it fits in your architecture, why you must learn it well.
    • A 10,000 feet view of ADO.NET: understanding the major players in ADO.NET.
    • Writing your first ADO.NET application - the Hello World Application.
    • Breaking apart ADO.NET: the connected part; understanding Connections and Commands.
    • Breaking apart ADO.NET: the disconnected part; understanding DataSets.
    • Connected or Disconnected? The DataAdapter object.
    • Updating Data back into the database.
    • A primer on concurrency checks.
    • Transactions in ADO.NET: say hello to System.Transactions.
    • A quick overview of SQLCLR.
    • An eye into the future - DLINQ, LINQ and ADO.NET 3.0.

     

    Posted Jun 08 2006, 09:56 AM by John Papa with 1 comment(s)
    Filed under:
  • Smartphone Skills: Part 02 - Setup and Device Emulators

    In my last post (Smartphone Skills: Part 01 - Introduction) I ran through a few of the links that you can use to get started with Smartphone development. In this post I will discuss how to setup the .NET 2 development environment and use the Device Emulator Manager.

    Assuming you already have Visual Studio.NET 2005 installed including the compact framework, the next steps are to download and install the rest of the tools you will need.

    ActiveSync 4.1 (or latest version)

    Download and install ActiveSync 4.1 if you have not already done so. ActiveSync is required by the Windows Mobile 5 SDK (next step). ActiveSync is used to synchronize the data and generally help you communicate with the mobile device. It also facilitates the installation of software from a PC to the device.

    Windows Mobile 5.0 SDK for Smartphone 

    Download the Windows Mobile 5.0 SDK for Smartphone and install it. This will give you all that you need to develop for the Smartphone. Make sure you download and install the Smartphone edition as there is also an edition for the Pocket PC available. Again, these are 2 different flavors of the Windows Mobile 5 OS. You can install both SDK’s if you intend to develop for both types of devices.

    Once the SDK is installed, you will be able to create projects for the mobile devices. The SDK installs project templates that you can use to do this. The SDK also install the Device Emulator Manager, which gets added to your Tools menu in the Visual Studio.NET IDE. The Device Emulator Manager allows you to choose the destination device type that you want to test your application in. When you install the Smartphone SDK, several emulators are installed and show up in the available emulator list in the Device Emulator Manager including a versions for Smartphone 200 and Windows Mobile 5. When testing your application, you can select which emulator to run the app in. This is a great feature since it allows you to test the applications without installing software on a target device (and uninstalling, installing, repeat process … yuk). It also allows you to develop and test software for multiple target devices.

     

    Custom Device Emulators

    OK, so you bought a specific device and you want to make sure your application works in that specific device. Some manufacturers provide developers access to tools that help them develop software for their devices. Motorola provides a web site that has several tools and other information to assist developers. Since I recently bought a Motorola Q Smartphone, I went to their MotoDev web site and found the Motorola Q tools. On this page I downloaded the emulator for the 320x240 landscape screen (because the Q has a screen that is different from most Smartphones and PDA’s in that its screen is not square not portrait … it is landscape). This is actually a link to the Microsoft download site.

    I then installed the emulator for the landscape screen. I could have stopped there as it would have given me what I needed to test the landscape UI, but I went one step further and downloaded and installed the Q plug-in for the landscape emulator. This plug-in adds an additional emulator to the Device Emulator Manager that looks just like the Motorola Q (similar to a skin). Of course, these custom emulators are not critical, you can sue the default ones that come with the Windows Mobile 5 SDK. Its just an extra step to make your emulator look and feel more like the target device. Its always a good idea to try your application’s code out in as many emulators as you are targeting devices.

    Once you have have ActiveSync, the SDK and the emulators installed … you can start developing.

     

    Smartphone Skills Series:

  • Smartphone Skills: Part 01 - Introduction

    I decided to start a series of blog posts regarding various aspects of using, customizing and developing for the Windows Mobile 5 Smartphone. This will be the first post … in which I will begin by describing what to expect and where to get some of the basics. I’ll try to keep this series short and to the point so they are very digestible. (On that same note, there may end up being a lot of posts in this series depending on how many topics I end up covering.)

    Let me start by getting this out right away … I will not be discussing any other mobile OS. I will only be focusing on the Windows Mobile 5 for Smartphones (with a light sprinkling of Pocket PC). yeah, the name “Smartphone Skills” is a bit odd … but I thought it was catchy.

     

    What is it the Smartphone OS?

    Its a bit of a niche … its not just Windows Mobile 5 development, but its development for the Smartphone version of the OS. The Smartphone version of the OS is a bit scaled down than that of the Pocket PC version of the OS. The Windows Mobile 5 for the Smartphone is targeted for (obviously) Smartphones … which generally are phone 1st, PDA 2nd. (There is also a Pocket PC edition and a Pocket PC Phone edition, the latter of which is generally agreed upon as PDA 1st and phone 2nd.) I won’t go into all of the differences nor do I know them all by heart. However, some of the big differences are that the Smartphone OS does not handle stylus/pen events as the screen for Smartphones are not interactive. The user uses special keys on the phone to interact with the applications. Smartphone OS usually does not support some software, as well … usually because the applications require too much stylus interaction with the touch screen. So Office products like Pocket Word and Pocket Excel do not come with the Windows Mobile 5 OS on the Smartphone. (However, Outlook does.) Anyway, a description as per Microsoft can be found on the site located here.

     

    So What Do You Need?

    There are plenty of tools that are helpful, but here is the core list of tools you need to get started in developing for the Smartphone.

    1. 1) Visual Studio.NET (I’ll be using 2005)
    2. 2) .NET Compact Framework (I’ll be using v 2.0 but you could use version 1.1)
    3. 3) Windows Mobile 5.0 SDK for Smartphone (there is another SDK for Pocket PC)
    4. 4) You do NOT need an actual Smartphone to do any development. You could instead use the device emulator that comes with Visual Studio.NET.
    5. 5) ActiveSync 4.1 … even if you are not going to use an actual Smartphone and you will instead rely on the emulator, you will still want to install the latest version of ActiveSync (currently 4.1). In fact, I believe the SDK will not even install unless ActiveSync is installed first.

    Once you have these installed you can get started and write you first mobile application.

     

    Other Useful Links (maybe):

    Here are some links that can help you get started:

     

    Next time in Smartphone Skills I will talk a little more about getting setup.

     

    Smartphone Skills Series:

  • Motorola Q Smartphone

    I did it ... I admit it. I was one of the many silly people that got hyped up on the just released Motorola Q Smartphone. (It runs the Windows Mobile 5 OS  … the Smartphone edition). My contract was up and I was itching for a new phone/pda. I was debating over the Treo 700w, Treo 700p and the Motorola Q. In the end the Q won out with me because of it form factor and phone first mentality. Although, a colleague of mine let me play with his Treo 700w quite a bit (thanks Brian) and i have to admit that there is very little NOT to like about it either.

    I have been using this thing for 3 days now and I am very impressed. Oh, it has its quirks, but it is a very impressive phone.

    The biggest complaint I have is that it only comes from Verizon … which in my area means no high speed wireless connection. I do not get their EVDO service where I am, but I was surprised to see the standard CDMA network in my area gives me 100k to 200k … so its still snappy enough for the time being. Cingular is better in my area for data, and they were surely get the Q and probably the Treo before the end of 2006 (I don't know for sure, but I would think they would **gulp**).

    What drew me too the Q? Well a few of the things are ….

    • – It is as thin as the RAZR. I love how thin this thing is! I can slip it in and out of my pocket, no holster required!
    • – It has a QWERTY keyboard. Typing emails on a number pad is just a horrific experience.
    • – It offers the basics for me: email, IM, and phone … and it does them all very well
    • – The phone quality is excellent. This is a phone first and it shows.
    • – It can stream video or TV. Nuff said for the geek in me.
    • – It handles MP3’s and MPEG4 videos quite nicely on a miniSD card.

     

    What caused my hesitation?

    • – Motorola is not known for making good Smartphones nor PDA’s.
    • – This phone has been delayed several times.
    • – There is no GSM version … yet
    • – Verizon is expensive with their data plans, IMO
    • – Software for the Smartphone is harder to find than Pocket PC
    • – The Q has a landscape screen. Very cool, but again, less software supports it capably

     

    I’ll discuss more about what I like and what I don’t as I use it. And for those mobile developers out there, you can check out my upcoming “Smartphone Skills” blog post series.

     

  • Win an iPod Nano: Sign Up at Email2Face.com

    My company created the www.email2face.com web site (which other web sites are now emaulating). ASPSOFT has launched a promotion where if you register at www.email2face.com you will be eligible to win an iPod Nano. Details of the promotion are at http://www.email2face.com/ipod.aspx.

     

More Posts