Tuesday, October 21, 2008

The fridge server,  (long may it last)  that powers this blog has been running out of steam lately.

I'm getting well over 1000 reads each time I publish an article.   Which I guess is good news.

So I'm co running my this website over at

http://geekswithblogs.net/MobileLOB

You may want to update your RSS feeds to use this server -

http://geekswithblogs.net/MobileLOB/Rss.aspx

Tuesday, October 21, 2008 9:34:54 AM UTC  #    Comments [0]  | 
Monday, October 20, 2008

I've just modified my auto detection web page to work with windows mobile,  iPhone/iPod and now Blackberry

This simple web-page will redirect traffic to different web pages for any of these devices.

Paste this into an asp.net web page (i.e default.aspx)

 

 

<%@ Page Language="C#" Trace="false" %>

<SCRIPT LANGUAGE="C#" RUNAT=SERVER>

    protected void Page_Load(Object sender, EventArgs e)
    {
        System.Web.Mobile.MobileCapabilities cur = (System.Web.Mobile.MobileCapabilities) Request.Browser;

        // this block of code is to detect if users are running Pocket PC 2003
        bool isce=false;
        bool isiphone=false;
            bool isipod=false;
        bool isblackberry=false;

        try    {
               isce = (Request.UserAgent.IndexOf("Windows CE")!=-1);
                   isiphone = (Request.UserAgent.IndexOf("iPhone;")!=-1);
                   isipod = (Request.UserAgent.IndexOf("iPod;")!=-1);
                   isblackberry = (Request.UserAgent.IndexOf("BlackBerry")!=-1);

        }
        catch
        {

        }
        if (isiphone||isipod)
        {
            Response.Redirect("/m");
            return;
        }

        if (isblackberry)
        {
            Response.Redirect("/blackberry");
            return;
        }

        if (cur.IsMobileDevice||isce)
        {               
            Response.Redirect("/mobile");
            return;
        }

        Response.Redirect("/jumpstart");

    }

</SCRIPT>

Monday, October 20, 2008 9:05:18 PM UTC  #    Comments [1]  | 
Saturday, October 18, 2008

I had an interesting customer enquiry this week.     Our customer wants to have multiple Windows Mobile Line of Business applications running on the same device.    The interesting bit, was that they wanted to switch between running instances of each application.    i.e if you were in the warehouse module you could jump across to the QC application.      In my example as its a dedicated mobile application things like the start menu are switched off.   So what we needed was from a button in application 1,  we could switch across to application 2.         The other requirement was that we needed to switch between applications without exiting.

So here's the solution.    The first obvious bit was only to display launch buttons if the other application is installed on the device.

This was achieved by a simple file exist -

        const string testexename= @"\program files\ourfolder\ourexename.exe";

        private void frmmainmenu_Load(object sender, EventArgs e)
        {
                  this.bttestexe.Visible = File.Exists(testexename);
        }

 

OK, with me so far?

 

Next up,  behind our button we need to add code to either launch our other program we want to jump to,  or switch to an already running instance.

I came up with this behind the button

         string windowsname = "QC Scanning";
         Process.Raise(testexename, windowsname);

So,   we can either switch to a named window or launch the application.

To achieve this I created this 'Raise' static method as shown below

           public static void Raise(string exetolaunch, string windowtitle)
            {
                IntPtr ourproce = FindWindow(null, windowtitle);
                if (ourproce == IntPtr.Zero)
                {
                    // process not running so start it
                    System.Diagnostics.Process.Start(exetolaunch, "");
                }
                else
                {

                    SetForegroundWindow(ourproce);

                }
            }

This is supported by a couple of pinvokes -

           [DllImport("coredll.dll")]
           private static extern IntPtr FindWindow(string lpClassName,string lpWindowName);

           [DllImport("coredll.dll")]
           private static extern bool SetForegroundWindow(IntPtr hWnd);

 

So once put together we now have a very fast way to allow an end user to move between different applications, without even realising they are separate programs.

Saturday, October 18, 2008 7:27:27 AM UTC  #    Comments [3]  | 
Tuesday, October 14, 2008

So,  I've been on a mission,  to show that we can port our mobile portal application suite over to iPhone.    We've long been using a Windows Mobile delivered portal that takes Sharepoint, Dynamics NAV and a host of other line of business system (LOB) and delivers them to our mobile workforce.

The core of our business at Anglia Business Solutions (www.angliabs.com)  is to allow our consultant's, sale staff and support engineers to work remotely.    For any service based company our lifeblood is accurate time sheet recording billing and customer/prospect intelligence via CRM (customer relationship management).    Being a Microsoft Dynamics partner we of course achieve all this by using Dynamics NAV and SharePoint.    

So just by way of interest I took Joe Hewitt's,  IUI (http://www.joehewitt.com/iui)   set of style sheets and Javascript to see what I could come up with.   Bearing in mind the back-end for this system is just a bunch of web-services.   Hooking up a new front end, proved pretty straight forward.

The first screenshot shot shows the logon mechanism.  We use a cookie to remember username and all the user must do to logon is to key a PIN.

Portal2
(click to enlarge)
Note, the nice UI.    User is verified in AD.   PIN is looked up in a table,  with all values encrypted.

Note for security if the user fails pin 3 times, we drop back to requiring full domain login.

The whole portal is delivered via a website protected by an SSL certificate so all traffic is encrypted.

 

Portal1
(click to enlarge)
Once logged in a we have a main menu of operations,  such as news, timesheet (including mileage claims, expense recording),  leave booking and CRM.   We have over 10 modules that we have built up over time,  which we may decide to port if there is demand for this system.

We have nice animation between screens which gives us the professional feel.

 

Portal3
(click to enlarge)
One of the nice things we can do is integrate with device features.     This is illustrated with showing mobile CRM.   In the screenshot we show that we can click to show a map of driving directions to a customer or prospect as well as being able to call or email straight from the mobile CRM application.

So what have we found after this porting exercise.     Looking positively,  iPhone's slick interface does make mobile LOB, look really nice.    We built what you see above effectively just building a new front end on an existing set of business objects sitting ontop a core Microsoft set of technologies.     The whole solution was also built with Visual Studio 2008,   so all the benefits of intelli-sense and the first rate development experience was available to us.

However what's very clear is that we were building for the iPhone's interface the website looks great on the device,   kind of ok in Apple Safari and un-usable on Internet Explorer.     The Windows Mobile alternative although delivering a more vanilla user interface works nicely cross browser.    I guess cross-browser was not the objective here,  but it did make debugging and tweaking the UI a little time consuming.

A few things that were a bit annoying such as lack of v-card, vcal which would be nice to have.   I think if memory serves me correct is also a limitation of Windows Mobile too.    I also found that I kept on needing to make my controls work in a nice AJAX way.    I'm fairly new to AJAX programming so I found anything but the simplest partial page reload a little hard to get my head around.

ASP.NET pages, carry with them some inherit 'good' stuff for handling callbacks etc.   this was a fair challenge to get nicely co-existing with the excellent IUI Javascript that was sitting behind the page templates I used.

It would be great if from a web-application we could determine the device's location so that we could search for say, customers within 20 miles of where I'm standing.

Render times on the device really varied.    With windows mobile we pretty much code for lean and low user interfaces to make use of the worst possible Internet bandwidth.    All the glitz of the iPhone's UI take (well they did me) you down the route of trying to build something stylish and slick.    Great of course when you have the full 7.2mb (or whatever we get these days) of bandwidth on 3G or fast WIFI, but really rubbish on a crowded train with slow and congested GPRS.

So there you have it.   A set of mobile LOB applications using core Microsoft technology delivered securely for use anywhere.   All we really did in this exercise was to add a couple of (rather good) style-sheets.

A final footnote,   yes I am a Windows Mobile MVP  but it was really interesting to see how core line of business can be ported across.   But yes,  I do feel a little bit guilty :-)

 

Tuesday, October 14, 2008 8:02:40 PM UTC  #    Comments [0]  | 
Friday, October 10, 2008

Met Tim Dawson (MVP) of DiVElements the other day.

Wow,  what cool controls he makes...

http://www.divelements.co.uk/net/controls/

Friday, October 10, 2008 4:24:04 PM UTC  #    Comments [0]  | 
Sunday, October 05, 2008

(image from Yahoo)

 

Hat tip to John Goldsmith, VISIO MVP and all round nice guy.   For this great information.

I often need to mock up Mobile (and if forced :-) ) desktop user interface layouts.     

Normally I do this straight in visual studio.    However  I may now move to Visio to achieve  this thanks to these stencil templates

http://developer.yahoo.com/ypatterns/wireframes/

 

I wonder, if Yahoo will ever release these as WPF controls :-) ?

Sunday, October 05, 2008 7:38:24 AM UTC  #    Comments [1]  | 
Wednesday, October 01, 2008

I love geocaching,    go look at http://www.geocaching.com/ for a better description, than I could ever give.

So my idea today is lets put QR codes/Windows Live Barcodes on all cache's.    Find the cache,  scan the barcode with your camera phone and that will take you automatically to the cache find page.    You dig me brothers and sisters?

Wednesday, October 01, 2008 7:11:50 PM UTC  #    Comments [0]  | 

Hi all,  really proud to announce that Microsoft have decided they like what I'm doing and have made me an MVP again.   I love doing line of business mobile apps  and clearly from the feedback I get, you like hearing about it.

Amazing what one guy and a server sitting on a fridge can achieve.

Thank you all.

Wednesday, October 01, 2008 7:07:11 PM UTC  #    Comments [0]  | 

This is slick,  this site http://qrcode.kaywa.com/

Will generate inline QR codes/Windows Live Barcodes (if we are still allowed to call them that).

 

You can place them straight as images on any webpage,  by just pasting in a tiny bit of code.

like this

<img src="http://qrcode.kaywa.com/img.php?s=8&d=http%3A%2F%2Fwww.binaryrefinery.com" alt="qrcode"  />

 

This gives us -

qrcode
Wednesday, October 01, 2008 2:44:18 PM UTC  #    Comments [1]  | 
Saturday, September 27, 2008

Just watch this.    Envy.   Windows Mobile needs this.

Google Android - Zebra Crossing

Saturday, September 27, 2008 6:24:31 AM UTC  #    Comments [0]  | 

Theme design by Jelle Druyts

Pick a theme: