Blog Stats
  • Posts - 132
  • Articles - 0
  • Comments - 28
  • Trackbacks - 0

 

Saturday, December 17, 2011

Expressing the Power iOS and Sync Framework with Microsoft Azure


So we’ve been working on an iOS app,  that makes use of awesome power of Azure coupled with the ability to write an app that works truly offline and syncs when a network connection is available.

I am just going through App Store approval.  I will give an update as soon as I know the outcome.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Tuesday, August 09, 2011

Easier Azure Deployment


 

A couple of other bits of advice about getting Sync. Framework applications up onto Azure.

Azure now supports new startup commands.   This makes it way easier to install the necessary managed and unmanaged dll’s you need.

Based on yesterdays post,  I then followed -

http://social.msdn.microsoft.com/Forums/ar/synclab/thread/c2a9dc29-e1cc-4dc8-a6c9-0f57fab98d58

The other thing I just found out, is that you get GDI+ errors if you try and save a bitmap to a stream as a PNG on Azure.   Use JPEG’s instead…

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Monday, August 08, 2011

Deploying SYNC. Framework onto Azure


 

So in the process of going live on a mobile solution that uses Microsoft Sync. Framework, on Azure.

I came across this really useful guide on how to package up the various elements of the Sync. Framework to get it running on the Azure servers.

http://msdn.microsoft.com/en-us/library/ff928660(v=sql.110).aspx

If you follow it to the letter,  you’ll be up and running in no time.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Thursday, August 04, 2011

Migrate Database to SQL Azure


 

This is very cool

Just found this fab, tool to generate all the insert statements you need from a SQL database.

If you have SQL Server 2008 R2 Installed -

Run

"C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Publishing\1.4\SqlPubWiz.exe"

image

This lets you select individual tables, views, stored procedures and script out both data and schema structures.

Perfect for populating SQL Azure, when migrating from on-Premise databases.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Tuesday, July 26, 2011

Trending in The UK Now


 

image

So,   I wanted to build a simple display for the foyer of our building that would display in real-time the zeitgeist of the nation.  What better way of testing the pulse of the UK, than pulling down the latest list of Twitter Trends.

Twitter exposes this as a nice bit of JSON XML

If you call - http://api.twitter.com/1/trends.json

You get a nice JSON response explained fully here

https://dev.twitter.com/docs/api/1/get/trends/current

.Net 4.0 has a great JSON deseriliser that can quickly read inbound JSON and turn into nicely populated .net classes.

My base class to represent the data from my feed looks like -

using System.Runtime.Serialization;

namespace Trends
{
    [DataContract]
    public class OurTrend
    {
        [DataMember(Name = "trends")]
        public List<Trend> trends { get; set; }

        [DataMember(Name = "as_of")]
        public string AtDate {get;set;}
    }
}
Each trending topic is then held in a ‘Trend’ class which looks like - 
using System.Runtime.Serialization;
using System.Runtime.Serialization;

namespace Trends
{
   [DataContract]
    public class Trend
    {

       [DataMember(Name = "url")]
       public string Url { get; set; }

       [DataMember(Name = "name")]
        public string Name { get; set; }

       
    }
}

Note the DataContract and DataMember tags, are what instructs the deserialization of the JSON.

 

Using the magic of System.Runtime.Serialization.Json  you can read contents straight into .Net.

Like  -

string response = "{\"trends\":[{\ ....

DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(OurTrend));
byte[] inbytes = Encoding.UTF8.GetBytes(response);
MemoryStream ms = new MemoryStream(inbytes);
ms.Position = 0;

OurTrend data = (OurTrend)serializer.ReadObject(ms);
ms.Dispose();

 

 

Contact Me, via my blog if you would like a copy of the full source.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Monday, May 02, 2011

Otterbox Defender Car Kit–Constrution


I recently purchased an Otterbox Defender case for iPhone 4.   It does the job as intended, protecting  your phone from knocks and dust.  Great bit of kit, making you’re iPhone look a little like a mid 80’s Walkman Smile.

The biggest issue, is that Otterbox don’t make a car-phone holder for it.  Having broken my 5th universal in air-vent phone holder I wanted to get something decent for phone+Otterbox comibination.

Googling the issue of Otterbox and Car mounts didn’t prove to fruitful.   So I took matters into my own hand and made one.

So I purchased ‘yet another’ air vent holder,  but this one came at least with a windscreen mount bracket.

I opted for this one, from Tesco.

For £6.95,  link here - http://direct.tesco.com/product/images/?R=100-8959

The Otterbox comes with a belt clip.   I Intended to use this as it snaps tightly onto the phone, and didn’t mind breaking the clip in the process,  to be frank belt-clips for phones is not a good look.   Using pliers, I pulled out the metal spring.  Then levering the belt clip off, left me with just the phone holder bit.

This gave me the perfect base to just glue to the stem of the Tesco car holder.   Using super glue,  I managed to get a pretty tight connection with the advantage that the Tesco mount allows for rotation.

Final product -

photo0

Back of the bracket.

photo2

Fitted -

photo

I’ve just driven 400 miles with it,  it works great in both portrait or landscape.  The phone snaps in with a reassuring click.   On the road, their seems to be no vibration.   Given the build quality of the Otterbox, this seems a really robust solution.   Not bad for Otterbox case+£6.95 and about 20 minutes work.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Saturday, April 30, 2011

Turn iPhone Defender Case into Car Kit


Tonight, I took a Tesco car-phone universal holder and bonded it to the belt clip of an iPhone Otterbox Defender case. Results 2 follow.
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Wednesday, March 30, 2011

My 6th App.


Pleased to announce that my 6th App. has just gone live on the Apple AppStore http://itunes.apple.com/app/the-fillers-the-killers-tribute/id427958386?mt=8
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Monday, March 21, 2011

String Practice


Now this might be sacrilege to some,  and a blessing to others.

Through using Objective C,   I realise that I really miss the ability to do C# quick and easy string manipulation, like -

IndexOf
Trim
Replace
Substring
Split
etc.

For my own sake,  I’ve begun working on some functional equivalents.

So far I’ve got

 

- (NSInteger) LastIndexOf:(NSString *)searchstring;

- (NSInteger) LastIndexOfI:(NSString *)searchstring;

- (NSInteger) IndexOf:(NSString *)searchstring;

- (NSInteger) IndexOfI:(NSString *)searchstring;

- (NSString *) PadLeft:(NSInteger)totallength;

- (NSString *) PadRight:(NSInteger)totallength;

- (NSString *) Remove:(NSString *)what;

- (NSString *) RemoveI:(NSString *)what;

- (NSString *) Replace:(NSString *)what with:(NSString *)with;

- (NSString *) ReplaceI:(NSString *)what with:(NSString *)with;

- (NSString *) SubString:(NSInteger)start;

- (NSString *) SubString:(NSInteger)start length:(NSInteger)length;

- (NSString *) Trim;

- (NSString *) LTrim;

- (NSString *) RTrim;

- (NSArray *) Split:(NSString *)

Full source available here -

 

Or if link doesn't work Click Contact Me, and I'll send you a copy

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Tuesday, March 15, 2011

My 5th App


So, I’ve just completed my 5th commercial iPhone App.  

Always when I move to a new programming language I take a test application and port it to learn.   So my equivalent of “Hello World” app.  is -

iPhone Screenshot 1

http://itunes.apple.com/gb/app/iching-master/id424495901?mt=8

I built this, as an app about a year ago,  but figured that it worked so well on iOS that I would get it published.

Technorati Tags: ,,,
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
 

 

Copyright © Richard Jones