Mr Andersson

Posts Tagged ‘remotex

Deploying applications to Windows and Windows Phones which supports dynamic modules

leave a comment »

Many .Net applications being developed today are leveraging the greatness of dependency injection using some sort of inversion of control-container. So do we at RemoteX when we develop the product called RemoteX Applications. The product has two client applications which roughly adresses the same use cases. One is targeting desktop computers and the other one is targeting Windows Phone (you can read more here and here).

As you can tell by the name, the product consists of several applications (or rather modules). Using frameworks like Prism or Caliburn we can, in code, easily manage each part of the product. And the deployment is taken care of using ClickOnce technology using mage.exe (the MAnifest GEnerator).
But that’s for the desktop client targeting WPF.

So the big question is, how are we going mobile with this?

What regards an inversion of control-container we are “almost there”. We have a home-grown container in place which have been around for a while now, even though it lacks some basic features you would expect an ioc container of year MMX to have.
Speaking of deployment to the Windows Phone you probably know you are kind of locked to using CABinet files. If you are using the tools Microsoft brought to us, you probably also use their Device Setup projects in Visual Studio.
They are good, but you must use Visual Studio to choose the contents of and create/build your CAB file.
What this basically means is that we need to use devenv.exe to build each customer’s customized CAB file.
So up til now we have not had per customer customized CAB files.

All I wanted was ClickOnce technology and a manifest generator for the Windows Phone. So what’s the solution on that?
Say hello to the PowerShell script New-CabWizInf.ps1:

.\New-CabWizInf.ps1 -path .\myapp.inf -appName “My Application” -manufacturer “RemoteX” -fromDirectory .\MyApplication\bin\Release

It works like mage.exe with its -fromDirectory switch and creates the necessary .inf-file (like an Visual Studio Device Setup project would). All needed from that point is to call CABWIZ.exe and Set-AuthenticodeSignature in PowerShell to create and sign the CAB file.
The real power is the -fromDirectory switch which allows us to create custom CAB files on the fly.

So here is a peek of what our setup package scripts now looks like:

Setup Package for Windows using ClickOnce
mage -new deployment -tofile MyApp.application -fromdirectory bin\Release -name “My App” -publisher “RemoteX”
mage -sign

Setup Package for Windows Phones using CAB files
.\New-CabWizInf.ps1 -path MyApp.inf -fromDirectory bin\Release -appName “My App” -manufacturer “RemoteX”
cabwiz MyApp.inf /dest .\
Set-AuthenticodeSignature .\MyApp.CAB

So right now I’m a very happy camper since our packaging tools for Windows AND Windows Phone have equal capabilities which allows us to use dependency injection with dynamic module selection.

Next stop, Prism and Silverlight for the Windows Phone?

Written by anderssonjohan

January 20, 2010 at 23:28

Posted in software

Tagged with , , , , ,

Bacchi Orden Open

leave a comment »

Tomorrow is the Bacchi Orden Open taking place in Hornstull, Stockholm.
RemoteX Technologies is sponsoring and I and my collegue Erik will play in the tournament (thanks Pal!).

The Pal asked me quite a while ago for ideas on how we (RemoteX Technologies) could help them out in digitalizing the scorekeeping process during the event. First I thought about putting together a customized version of RemoteX Applications which would help entering scores etc using PDAs. However, the scorekeeping process and the service process (which is what RemoteX Applications primarily supports) did not align very well, so we skipped that idea.
The solution ended up in using their already existing web application (based on the LAMP stack), with some minor adjustments to support Pocket Internet Explorer, Opera for Mobile and such.

QR Code with Face design
Each player plays two so called entries and each entry consists of 4 random games.
Each game on each entry is registered a score and the best score is used in a player ranking algorithm to produce the tournament standings page.
To ease the pain of writing down the score on a piece of paper and THEN enter them into the web application, the solution also involves a free software called i-Nigma which is used to scan QR-codes.
All players get their two entries printed on papers. Each printed entry has four QR-codes, each representing a link to a page on which the score is to be entered by the scorekeeper.
So basically, the scorekeeping process is:

  1. The player plays a game
  2. Calls for the scorekeeper to register the score of the game
  3. The scorekeeper uses a mobile phone equipped with i-Nigma to scan the QR-code of the game
  4. The scorekeeper enters the score in a text field in the web browser on the mobile phone
  5. The player can continue play the remaining games in the entry

AFTER EVENT UPDATE:
Everything worked out eventually, but we came up with a few issues we need to address before the upcoming (bigger) event, Stockholm Open:

  • i-Nigma is not ready out of the box. Further configuration needs to be done on the mobile phones in order to turn off security checks related to camera usage, turning on the led light (“flash”)
  • i-Nigma can’t turn on the led light/flash on the mobile phone. This becomes an issue when trying to scan the QR-codes in a dark room.
  • Either i-Nigma or more probably Windows Mobile does not play very well together. Query strings are chopped of when using ampersands as the separator between query string variables. An adjustment was made live during the event and addresses the issue by replacing ampersands with semicolon.
  • Info in QR-code should be printed as normal text together with the code to allow for a pen-and-paper backup solution (compare with EAN codes where the number is printed together with the bar code)
  • Facility issue: Test the WiFi/cell network before the event!! Signal was poor and it was nearly impossible to connect for the two HTC TyTn phones we used
  • More testing up-front with realistic conditions. We had to re-print every pre-printed entry on a sloooow ink-jet printer (which neither wanted to play WiFi)

We had some really nasty problems during the event, but as my former CEO Ulf Engerby at Qbranch would put it: Success is planned, shit happens!

If you want more information about the event, please visit the website.

Written by anderssonjohan

March 21, 2009 at 10:42

Posted in events

Tagged with , , ,