Wednesday, May 25, 2011

Creating a Windows Phone 7 app using WCF, and SQL Azure

Last night I gave a presentation with demos for fwPASS creating a Windows 7 app displaying a list of gymnasts from a SQL Azure database using WCF (Windows Communication Foundation). The WCF service used the Entity Framework and the .Net Membership provider.

The application was surprisingly easy to create despite the fact that were a lot of moving pieces with integration between all the different components.

The presentation covered the following tools:

 

All that in 70 minutes. Yes, I talk fast. This was a first time presentation. Below is the demo script I used:

Marketplace

1. Preview App Hub http://create.msdn.com

· Show app details text, iconography

Database

1. SSMS – show local ChalkChimp database

· Show script for creating additional users?

2. http://windows.azure.com SQL management interface

· No query designer

3. SQL Azure Migration tool

· Scripts out db

· Shows unsupported features

· deploys

4. Azure limitations in SSMS

· No query designer

· Admin account (other users don’t have access to the master database)

WCF

1. Create new project WCF Application

· Highlight Framework version 3.5

· Change binding to basicHTTPBinding

2. New Item à ADO.Net Entity

· Azure connection

3. Switch to finished project

4. Modify Iservice.cs, modify Service.cs implementation

5. Show .Net membership bits in web.config

6. View in browser (copy url)

WP7 client

1. Open Visual Studio (another)

2. New Project à Windows Phone 7 application

3. New item à Phone portrait page

4. Add Service reference

· Show service methods

· Advanced show generate async methods

5. Switch to finished project

· Show xaml bindings

· Show async methods and completed event handlers

· switch device to emulator

6. Run it

Optional

· Show property pages and iconography

 

Friday, May 20, 2011

Download for WP7 Badges

imageSince I never seem to remember where to find the official "Download for Windows Phone 7" Badge and Logos, here is my reminder http://go.microsoft.com/fwlink/?LinkID=202116.

Wednesday, May 18, 2011

Do You Have Control of Your Database?

I prepared the following talking points to facilitate a round table discussion on Database Source Control titled “Do you have [source] control of your database” with a local chapter of Professional Association for SQL Server.

Most software developers use some form of source control for their software code, but it seems less common to take the same precautions with their databases.

Tuesday, May 17, 2011

Submitting an AppMakr app to the Windows Phone 7 Marketplace

I made a Windows Phone 7 app using AppMakr for reading Lean-related content from prominent Lean bloggers. That was easy, but there didn’t appear to be any instructions for how to get the app added to the App Hub. So here they are.

Log into your AppMakr account. There are a number of ways to get to your build. Either click the “App Builds” link in the top navigation or click the “Builds” button on one of your applications (as shown in the image below).

image

Pick the latest build that you want to submit to the marketplace and click the Download App button.

image

You will be presented with a dialog to open or save the zip file. Choose to save it to a location on your PC.

image

Important: Rename the file extension from .zip to .xap (which is the Silverlight application package deployment file). You will have to create the necessary Windows Phone 7 iconography (icons and screenshots needed for submitting to the app hub). You may be able to use some of the ones you used to create the application in AppMakr.

You will need an App Hub Developer account to submit applications to the Windows Marketplace ($99/year). After you have that, log in and from the “my dashboard” navigation link, select “Windows Phone”.

Click the “submit new app” button.

image

Fill out the form fields. Click inside the Application package box with the Plus (+) sign. A file open dialog will appear. Select the .xap file that you renamed after downloading from AppMakr earlier.

image

Continue through the process of providing an application description and uploading the necessary icon images. After you finish, sit back and wait for your app to go through the testing and certification process.

 

Technorati Tags: ,,

Monday, May 9, 2011

Switching to C#

neon sign - foreign language bookstoreAfter more than 7 years of VB.Net development, I have made the conscious decision to split my development into primarily VB.Net for most of my ASP.Net projects and C# for my Windows Phone 7, Silverlight, and WPF work. This transition was due to three primary driving forces:

  • Early Windows Phone 7 development (pre-RTM) was limited to C# due to the lack of availability for VB.Net support on the WP7 platform.
  • There appears to be a larger codebase of Silverlight and WP7 utilities, samples, and tutorials in C# to learn from.
  • I have had an easier time finding advanced Linq syntax examples in C#.

The syntax differences are not much different. I was already used to the most common syntactic differences, such as parenthesis, squiggly brackets, and semi-colons from my earlier work in PHP and Java. I would have started in C# if it were not for the Classic ASP and VB.Net applications I was supporting years ago in my .Net 1.1 beginnings.

Of course, the language selection is always trumped by complying with my clients’ corporate development standards and selecting the appropriate language for the job where the differences are relevant.

photo credit: avlxyz / CC BY-SA 2.0