Monday, July 09, 2007

So after detecting my first iPhone connect to my Blog,   I wondered whether the Mobile AJAX code that I wrote for Windows Mobile would work for other browsers.See  -

http://www.binaryrefinery.com/main/default,date,2007-04-23.aspx#a7c1ae14c-edd5-4306-b6e1-cf70952330ba

 

So, I decided to download the Apple Safari web browser for windows.   I thought that Safari would show up pretty well how my mobile Blog would appear on an iPhone.  Surprise, surprise my mobile AJAX blog just didn't load.  Safari can be obtained here -

http://www.apple.com/safari/download/

 

This was clearly due to the creation of Active X objects in the mobile page, like -

g_request= new ActiveXObject("Microsoft.XMLHTTP");

 

Anyhow following the Safari web developers guide I put in some basic browser detection, I won't bore you with all the code.   But if you interested have a look at the results at -

http://www.binaryrefinery.com/mobile

(then do a view source on the page)

Technorati tags: , ,
Monday, July 09, 2007 8:21:34 PM UTC  #    Comments [0]  | 
Saturday, June 23, 2007

I wanted to show what the two queries that I put up show you about a SQL Merge Publication.     We've incorporated them into a couple of web-pages that provide a single repository for all of the cab files that constitute a mobile LOB application,  see below.

image

This web page lets us manage the version of the software currently running on the device,   if the version number changes a new version of the application is pulled down the next time it synchronises with the SQL publication.   In addition it lets me upload securely any updates that I need to deploy.

 

Clicking a given publication, takes you into the detail.

image

Note that it shows record-counts applying the filter specified.   In addition we can substitute the Host_Name() function in any of the filter criteria with the contents of the publication filter criteria textbox. .    This is a massive time saver as we can see exactly what would be sent down to the mobile device ahead of any coding.

 

+ it's just based on two simple bits of SQL that I posted previously.

 

Technorati tags: ,
Saturday, June 23, 2007 7:27:41 AM UTC  #    Comments [0]  | 
Friday, June 22, 2007

Follow yesterday's post to get a list of SQL publications on a given server.   The following for a given SQL Merge publication will list all of the articles within a publication.

This is really useful for a quick sanity check to ensure all those tables that you want to publish out to your mobile device are indeed setup.

 

Here's the SQL 

 

select sysmergearticles.name  from dbo.sysmergearticles,
sysmergepublications
where sysmergearticles.pubid=sysmergepublications.pubid
and sysmergepublications.name='YOUR PUBLICATION NAME'
order by 1

 

Technorati tags: ,
Friday, June 22, 2007 2:14:17 PM UTC  #    Comments [0]  | 
Friday, June 15, 2007

image

A mobile Salesrep and Warehouse system that I put in place has made the UK Financial Times this week.  Case study at -

http://www.ft.com/cms/s/a29445de-183b-11dc-b736-000b5df10621.html

Friday, June 15, 2007 4:03:44 PM UTC  #    Comments [0]  | 
Wednesday, June 13, 2007

I think I should get commission for the number of Soti's Pocket Controller's I've indirectly sold.    I'm pleased to see the product has reached a Windows Vista  Friendly v6.

If you haven't seen this great bit of low cost software go have a look  at

http://www.soti.net/default.asp?Cmd=Products&SubCmd=PCPro

Its only $34.95,   what a bargain!  

Technorati tags: ,
 | 
Wednesday, June 13, 2007 8:01:34 PM UTC  #    Comments [0]  | 

One of the most time consuming tasks, I find with building LOB apps,  is setting up columns on Datagrid.   You know the game run your application see that column one is truncating the text in a database column.   Widen the column and run again,  repeat until very bored.

A while back I took the step to programmatically adding a grid style to each class we build (using Anglia's meta build tool Datamaker).   This saves so much time as most of the display widths are always pretty close to perfect.    One of my colleagues and friends Michael Holland has further refined this process to counter for different DPI screens (cool).   Here's an example of what we produce automatically.

 

      public static DataGridTableStyle GridStyle
        {
            get
            {
                DataGridTableStyle gridstyle = new DataGridTableStyle();
                gridstyle.MappingName = "Output[]";
                DataGridColumnStyle tempcol = null;

                // Maps To Database Field - [100]
                tempcol = new DataGridTextBoxColumn();
                tempcol.MappingName = "Onezerozero_Label";
                tempcol.HeaderText = "100";
                tempcol.Width = 60;
                tempcol.NullText = "N/A";
                gridstyle.GridColumnStyles.Add(tempcol);

                // Maps To Database Field - [1000]
                tempcol = new DataGridTextBoxColumn();
                tempcol.MappingName = "Onezerozerozero_Label";
                tempcol.HeaderText = "1000";
                tempcol.Width = 60;
                tempcol.NullText = "N/A";
                gridstyle.GridColumnStyles.Add(tempcol);

            return (SqlParameter[])returnparams.ToArray(typeof(SqlParameter));
        }
}

This saves, Soooo much time particularly when having to deploy to the device emulator.     If we need to omit certain columns or swap the order around, its just a cut and paste job.

Technorati tags: ,
Wednesday, June 13, 2007 7:53:53 PM UTC  #    Comments [0]  | 
Thursday, June 07, 2007

So in the line of business application space,  I often need to acquire external inputs from real world devices,  such as weigh scales,   pressure and moisture sensors.

 

I've often use WebService calls directly from the mobile device to call services on P.C's hooked up to measuring equipment usually via a serial port.

However increasingly I use insert triggers on SQL tables to fire off requests to physical devices (using managed code) stored procedures.   So, the action of syncing SQL Compact causes results from devices to be captured.    This technique works really well and ensures that SQL Compact syncrhonisation is the only data exchange from the mobile device.   This keeps things simple (always good).     The only downside is that when standing next to a weigh scale etc. with a mobile device you have to be in range of the wireless network.   

So upshot of all of this,  is that our end user can wander around taking weight's and measurements almost 'magically' with no physical connection from the mobile device they are using...

 

Technorati tags:
Thursday, June 07, 2007 7:46:25 PM UTC  #    Comments [2]  | 
Sunday, June 03, 2007

So I've been on a mission this weekend, getting a Zebra belt mounted Bluetooth printer to print photo's from a mobile application.

So I built a simple test program that outputs CPCL printing commands to a Zebra MZ220 Bluetooth printer.  

My helper library wraps the CPCL command set as follows -

CPCLPrinter prn = new CPCLPrinter("COM18");
            prn.StartLabel();
            prn.PageWidth(300);
            prn.Center();
            prn.Text(0,7,0,140,114,"Hello World");
            prn.EndLabel();
          
            prn.Print();
  prn.Dispose();

So far so good.   I'm simply using the System.IO.Ports namespace to talk to the Bluetooth mapped serial port.

So next question is how to print Bitmaps.     These printers are all about reliable repeated printouts.   So catering for on the fly generated images so dynamically generating images is something a little different.

The first challenge is that these printers are black and white,  so we need a way of reducing the colour depth of our inbound Bitmap.

Next will be to convert to PCX format.

Then we'll need to send this over to the printer.

Finally we need to wrap it into a simple app. that takes a photo and starts the whole process.

Will keep you posted on progress.

Technorati tags: ,
Sunday, June 03, 2007 2:31:33 PM UTC  #    Comments [1]  | 
Monday, February 26, 2007

I prepared a short screencast video, showing Anglia's Datamaker technology generating lots and lots of managed code automatically.

In the video, we select a Dynamics Nav table tell it we are writing a SQL Compact application and DataMaker does the rest.

The video concludes of the auto generated code being pasted into a Visual Studio solution and being complied successfully.

It sure save a lot of typing....

 

Video at -

http://private.angliabs.com/webextension/video/datamaker.avi

 

DataMaker details at -

http://www.angliabs.com

Monday, February 26, 2007 4:39:59 PM UTC  #    Comments [0]  | 
Wednesday, February 21, 2007

I find myself increasingly in commercial situations where we are bidding for business selling solutions based around Dynamics Nav.   This is all great, but what makes one Microsoft partner any different to another when put in from of a company selecting an ERP solution.   The answer we've found is value add.

Having Windows Mobile LOB applications in the tool box is a great commercial differentiator.  Being able to say that we can take ERP screens out of the box and deliver them to mobile devices can mean the difference between winning the gig or not.

 

Of course there are lots of factors when changing a key line of business system like an ERP;  however showing something real on a mobile device is normally a good way to ensure that your proposal sticks in the panel making the shortlists mind.

 

We also find that Windows Mobile and SQL Compact providing store-and-forward offline access is key.     The last thing in this price competitive world (certainly in the UK) a company can stand is to install a vast wireless infrastructure to support permanently connected mobility.   SQL compact lets you build solutions where you can work anywhere pretty much over any network.  When you have wireless access of some kind (wifi, GSM, 3G, satellite) the devices sync back to our central ERP system (in our case Dynamics Nav).   

 

We also challenge other vendors to look how they would support staffs that routinely climb in the back of delivery trucks or the hold of ship.   Normally most other offerings rely on two way permanent connections continually between ERP and handheld device.    This is not the case with SQL Compact.

 

So life with Windows Mobile for LOB is good.   Having a core set of key technologies that do the heavy lifting like SQL Compact and .Net Compact Framework means I can focus on building the desired functionality rather than worry about the plumbing underneath.   Furthermore having a SQL based ERP system such as Dynamics doing the really complex stuff, means that we can achieve amazing results in a timeframes and costs appropriate to 50-150 user systems.

 

I'm not sure why I'm telling you all this, because you'll go out and do the same :-)   But it certainly is working for us...

http://www.angliabs.com

 

Wednesday, February 21, 2007 9:57:54 AM UTC  #    Comments [0]  | 
Monday, February 19, 2007

Windows Vista,  has a great feature that has been introduced within the user interface.  Textbox fields when they are empty display their label, as follows:

What a great idea to implement this feature on Windows mobile; this would save vast amount of screen space as textbox labels seem to utilise lots of screen space (certainly on the LOB apps I write).

So with half an hour to kill this morning I produced a quick proof of concept that achieve this.  

Screenshot below, showing textbox not in focus.   Notice label colour is gray.

Screenshot below, showing textbox in focus

The code behind this is as follows, just implementing the GotFocus and LostFocus events on the textbox control:

private bool inlabelmode = true;

private string labeltext = "Our Box";

public Form1()

{

InitializeComponent();

labelon();

this.trackBar1.Focus();

}

private void labelon()

{

this.textBox1.ForeColor = Color.Gray;

this.textBox1.Text = labeltext;

inlabelmode = true;

}

private void labeloff()

{

this.textBox1.Text = "";

this.textBox1.ForeColor = Color.Red;

inlabelmode = false;

}

private void textBox1_GotFocus(object sender, EventArgs e)

{

if (inlabelmode) labeloff();

}

private void textBox1_LostFocus(object sender, EventArgs e)

{

if (this.textBox1.Text == "") labelon();

}

 

Anyhow,   it all needs wrapping up into a nice user control, but I thought I'd put this up to share.

 

 

Monday, February 19, 2007 10:43:45 AM UTC  #    Comments [5]  | 
Sunday, February 18, 2007

Test Post

Sunday, February 18, 2007 9:06:03 PM UTC  #    Comments [0]  | 

Theme design by Jelle Druyts

Pick a theme: