About Me

indepth experience in developing RIA applications with C# Linq,WCF , Silverlight and JavaScript. Just help in delivering a robust business application in Silverlight for a large financial company.helped with architecture and coding. Participate in Codecamps as a presenter. This blog has no sense of order as it mainly a self help so I can reference things of my interest. my site http://www.sandkeysoftware.com has articles and videos by category

Saturday, January 14, 2012

Sencha

I have completed my first Sencha app and wrapped it with PhoneGap to create a Droid version of my new Traffic application. I am very pleased with the result as this is the ideal class of app to use with Sencha as the UI is mostly Google maps. Sencha gave me the tools to write in a MVC pattern with Javascript. This is the best part and PhoneGap was dead easy to generate the "native" app for the Droid once I found this plugin for Eclipse .
   I also have a Win8 Metro application that allows me to enter information on the web cameras into
my Azure database. Once the info is in the Cloud any of my phone apps have access to it as I am using JSONP to call the Azure WCF service. my next step is to see the results on a real Droid phone that I just ordered and then publish the app. Next I will publish a series of videos on the whole experience

Friday, December 23, 2011

Sencha Touch

I am starting to believe that it is time to look at tools for doing cross phone development and as such have started playing with Sencha Touch. They are lacking WP7 phone support at this time but I think they will soon have it and one must concede that the WP7 market is tiny anyways. My goal is to use Sencha or a tool like it to develop apps that run across most of phones and tablets and consume Azure services. So far I really like the Javascript based tools and their use of MVC, I think that combined with PhoneGap  and KnockoutJS for MVVM and binding I can build apps that are robust enough for most applications. There will always be the demanding UX that will require truly native apps.

So, should you build a mobile web app or a native one? If you're building an app that's graphically involved or involves any computationally expensive operations, go native for sure as the tools aren't quite there yet to make the job easy for mobile web apps. If you're building something fairly simple and you don't need any native styling or design polish, go the mobile web route. I think a great example is the first PhoneGap app on the WP7 which is Property Finder UK, it has great looks and function however the giveaway that is not native is  the slow scrolling but overall this is minor given the functionality. The author can then move the same app to IOS , and Droids

Phone as a Remote Control

I have always been interested in sockets programming as this was all we had years ago before things like WCF. Peter Kuhn has wriiten this amazing code that he discusses in this Article. The idea is to use the WP7 as a remote control for your desktop.

In summary he has a beautifully architected solution that provides libraries for UDP and TCP. I really like the way that Peter has encorported things like :

IApplicationContext to define services


As Jeremy Likness of Wintellect says:

“In my experience working with Silverlight applications, probably one of the most underused features I've witnessed is the ability to abstract application-level functionality using the IApplicationService and IApplicationLifetimeAware interfaces”

Portable Libaries
allows you to target multiple platforms like Silverlight, Windows Phone and .NET with a single project and assembly. To support this, you need to install the Portable Library Tools provided by Microsoft, which is a Visual Studio add-in, and a one-time thing to install.
NLog for tracing
Developing a socket application is impossible with out a tracing as breakpoints often change the timing. Nlog provides a great framework including remoting messages to a common log endpoint.

I did have some issues with his implemenation of a Navigatable ViewModel as I was experiencing VS 2010 crashes when I opened XAML. I was able to unwind this and evert to a Navigatable views and this seemed to fix the issue.
There is much to learn from this application and as such my hat is off to Peter!









http://paarc.codeplex.com/documentation

Azure WCF service using SQL Azure database

Just posted a video in 2 chapters on developing a Azure hosted WCF service that comsumes a SQL Azure database using Entity Framework. Finally I show a WP7 app that consumes an Azure WCF service.

Chapter1             Chapter2

Tuesday, October 11, 2011

IIS Application Pool Identity Accounts

This is mostly one of those notes to self, but when develops a WCF service that accesses a database then you make sure that the account the IIS process is running under has rights to the database. There are built in accounts for the appPools that your service is running in. eg if I assign my FOO app to ASP.NET v4.0 pool then there is a default account IIS APPPOOL\ASP.NET v4.0 that is created for us. This is the account that we need to add to User list in SQL Management Studio for the database that FOO is accessing e.g TrafficCams.




For a more complete description see

Monday, October 10, 2011

Entity Framework 4.1 Code First

I just installed and used Code First in my new project and love it. For an Object kind of person this is a great solution as when you are starting a new project we can work with objects and NOT tables as all u need to do is:

public class Country
{
public int Id { get; set; }
public string Name { get; set; }
public string LongName { get; set; }
public string Description { get; set; }
public List<State> States{ get; set; }
}

public class State
{

public int Id { get; set; }
public string Name { get; set; }
public string LongName { get; set; }
// public List<City> { get; set; }
}


Now we deine a DBContext that looks like :

public class CamAccess : DbContext
{
public DbSet<Country> Countrys { get; set; }
public DbSet<State> States { get; set; }
public DbSet<City> Citys { get; set; }
}

This is all we need to do and we when we write some Linq code to use Countrys as in:


public List<Country> GetCountrys()
{
CamAccess camdc = new CamAccess();
Database.SetInitializer<CamAccess>(new CamaccessInitializer());
List<Country> countrys = camdc.Countrys.ToList();
return countrys;
}


Then we have the tables Country and States generated for us including the Foreign keys. This will look something like this:




Note the call to Database.SetInitializer as this is great as it lets us not only recreate the tables as the model changes but populate the tables with data as the class looks like:

public class CamaccessInitializer : DropCreateDatabaseIfModelChanges<CamAccess>
{
protected override void Seed(CamAccess context)
{
Country c = new Country();
c.Name = "USA";
c.LongName = "United States";
context.Countrys.Add(c);
base.Seed(context);
}
}


Monday, September 26, 2011

Windows 8 Metro Blog

After all the excitement at Build,I have decided to start a new blog dedicated to Windows 8 Metro and if you wish please check out this link.

Friday, February 18, 2011

Companion Video for Chapter 3 of WP7 Stock app development

Companion Video for Chapter 2 of WP7 Stock app development
This video is a companion to the tutorial Chapter 2 on Silverlight show where we build a stock quote app for WP7.

SILVERLIGHT Player

WMV

Wednesday, February 16, 2011

Companion video for Chapter 2 of WP7 Stock App for WP7

Companion Video for Chapter 2 of WP7 Stock app development
This video is a companion to the tutorial Chapter 2 on Silverlight show where we build a stock quote app for WP7.

SILVERLIGHT Player

WMV

Companion Video for Chapter 1 of WP7 Stock app development

This video is a companion to the tutorial Chapter 1 on Silverlight show where we build a stock quote app for WP7.

SILVERLIGHT Player

WMV