Developing Smartphone Applications to Sell

December 30, 2007 at 11:05 AMmgordon

So, as I said, I have written this Smartphone application and was toying with the idea of either making it shareware or selling licenses on sites like Handango.  After thinking about it for a while, I realized all of the following had to be considered for this type of application.

  1. Signing the application - Bottom line, here, is that any application that's installed on your Smartphone will need to be signed with a certificate that Either Microsoft or the phone's carrier has installed on the device.  You basically have two options, here.  First of all, you can go with Microsoft's Mobile2Market program.  With this program, you submit your application to a third party for scrutiny and once approved, you are issued a certificate with which to sign your application and you have the privilege of displaying the associated Made for Windows Smartphone icons on your site and packaging.  Plus, your product gets listed in Microsoft's / your OEM's catalog.  The other option, is to just purchase a certificate, like this one, with which to sign your application and installer.  The second option is cheaper, but it's up to you to decide which would be the better buy for you.  More on your options, here
  2. Data Storage - Putting myself in the place of a consumer obtaining an application for my mobile phone, I'd prefer to be able to purchase, download and install the application and have it just work from then on.  With an application like the one I have written, data is being input into the application over a long period of time.  Where does this data get stored?  I could store it on my phone for a while, but before long there wouldn't be space enough for all my data.  There is always the Sql Server solution where data is stored in a mobile database on the phone a periodically synced to a full blown Sql Server when the phone is synched with a computer on the network.  Question here, though, is who's going to set that infrastructure up and configure the phone to connect with it properly?  This basically means the application has to come with some form or storage "in the cloud" that it knows how to connect to.  The storage space and maintenance of the hardware and software involved represents an additional cost whether we're talking about an aspx front-end or asmx.
  3. Bandwidth Usage - Different cell providers offer varying qualities of access to the internet at various prices.  Can I assume that the cost of this type of access is negligible for the user of the application?  I'm thinking the safest bet is that I cannot.  I, therefore, have to be mindful that bandwidth usage is at a minimum; that calls to the web are not more frequent or chatty that necessary. 

Posted in: SmartPhone

Tags:

SmartPhone Development in VS2008

December 12, 2007 at 3:21 PMmgordon

I've been working on some infrastructure for my contracting business.  There are a lot of things that need to be tracked when you run your own business and for me it seemed that whenever I remembered something needed to be recorded I wasn't near a computer.  However, I always have my mobile phone (Samsung Blackjack) near by and it made sense to me to write an application that allowed me to log things like time, mileage and the like from my phone.

Architecture
I could have gone the route of creating a web site for this purpose, but instead I decided to create a SmartPhone application that called web services on my server, at home.  This way, if I ever decide to write a Windows Form or Web application front end, I can use the same web services and not have to recreate the logic they provide.  The web service methods give me all the CRUD functionality I need to manipulate the data I'm storing, so all the UI code on the phone needed to do was collect data and call the web service for storage.

Writing the mobile application was very straight forward.  I set a web reference to the web services I'd written and coded against the generated proxy.  Getting used to the mobile controls and the bits of functionality not provided in the compact framework were the biggest challenges, but nothing major at all.

Lessons Learned
Getting an internet connection in the emulator
After I had written a bit of code, I was eager to see it run.  I clicked the Start Debugging button on the Visual Studio toolbar and after prompting me for a target to deploy to (choose the emulator), an instance of the emulator was created and my code was deployed to it.  When I tried exercising some code that made a web service call, a transport error was raised.  I then tried to open pocket IE on the emulator and browse to an internet address, but got a message saying that I needed to configure my network settings on the phone.  After some searching, I figured out how to set it all up.  First, make sure you have ActiveSync installed and running.  Then, right-click its tray icon and choose "Connection Settings" from the context menu.  Make sure the check box for "Allow connections to one of the following:" is checked and select "DMA" in the combo box. 

In Visual Studio, go to the Tools menu and select "Device Emulator Manager...".  When the dialog opens, right-click the entry for "USA Windows Mobile 5.0 Smartphone R2 QVGA Emulator" and select "Connect".  This will open an instance of the emulator.  Next, right-click the same entry again and select "Cradle".  At this point, ActiveSync should detect the emulator and treat it as it would a physical phone plugged into the USB port of the PC.  Once you go through the connection wizard, you should have access to your PC's internet connection from the emulator through ActiveSync.

Deploying to the SmartPhone
Once my mobile application was unit tested, I was ready to deploy it to my phone.  I connected the phone to the PC, right-clicked my mobile project in Visual Studio and selected "Deploy".  The phone popped up up several dialogs asking me to approve the installation of several files on my phone.  I approved all of these, but the deployment still failed.  The reason stated indicated that there were some certs needed on my phone to deploy for development.  To get past this error, copy the file ...\Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK\SDKTools\VSDCerts.cab to your phone.  Then, on the phone, open the cab file to install the required certificates.  The deployment should succeed after this is done.  Of course, if you're developing an application for distribution, you'll want to properly sign your application instead of taking this short cut.

 

Posted in: .Net | Contracting | SmartPhone

Tags: , ,

New Bits

December 6, 2007 at 2:31 PMmgordon

For those of you drinking from the Microsoft developer firehose, there have been some significant releases, recently.

Microsoft Parallel Extensions
Parallel Extensions to the .NET Framework is a managed programming model for data parallelism, task parallelism, and coordination on parallel hardware unified by a common work scheduler. Parallel Extensions makes it easier for developers to write programs that scale to take advantage of parallel hardware by providing improved performance as the numbers of cores and processors increase without having to deal with many of the complexities of todayʼs concurrent programming models.

Volta
"Volta is an evolving research project focused on exploring ways to innovate data-intensive programming models. Volta is currently exploring a lean-programming inspired toolkit for building web-based and mobile applications by stretching the .NET programming model to cover the Cloud.

Entity Framework Beta 3
There were a number of changes to the Entity Framework between Beta 2 and Beta 3 that will require updates to existing source code. These breaking changes can be found here including the mitigation for adjusting to the new behavior, and a side by side comparison of Beta 2 code and Beta 3 code.

Xbox 360 Fall 2007 Dashboard Update
Um, did we mention DivX / XviD support? For free? Oh, we did. Well, we're still reeling. (Yep, we successfully tested both codecs using .divx and .avi files.)

Posted in: General | .Net | Xbox

Tags:

Code Reviews

December 4, 2007 at 4:38 AMmgordon

In the developer space, it's astounding how fast new technologies are arriving.  In order to stay current, a developer has to become digest the new tools and approaches, ty to get some hands-on with them and then possibly retain that new knowledge without being in a position to use it day-to-day.  Contractors or consultants, especially, need to be able to keep their tool belts well stocked with the a wide assortment of tools, technologies and methodologies both because of not being able to predict which of them the next client may utilize and also because since the right tool always makes the job easier it makes sense to have as many as possible.

With all this in mind, when it comes time to hold a code review, upon what criteria will the code be judged?  We all have our favorite approaches to designing software...our favorite code constructs, favorite tools, naming conventions.  How does one prevent a code review from degenerating into a argument about which is correct?  In my view, there is only one way. 

Each team needs to spend the time, up front, to determine what standards the group will use.  How are exceptions to be handled?  Where is configuration information to be stored?  What, if any, frameworks or external components are to be used?  What unit tests and comments are to be created, minimally?  By doing this, the code review becomes an opportunity to measure the code being reviewed against a known and agreed upon standard.  This makes the review much more beneficial to the developer responsible for the code and offers a chance for the group to identify problems or omissions in their group standards and correct them.

Posted in: General | Contracting

Tags: ,