Tuesday, September 30, 2014

Simplifying Cross-Platform Mobile App Development with Xamarin.Forms

Lots of decisions go into creating cross-platform apps. Without Xamarin.Forms, the decision process is almost too unwieldy. Here's how it can simplify your mobile development.
Over the past several years, developers have been excited by the ability of Xamarin to target various mobile platforms and share code across these platforms. Over that time, Xamarin has increased the ability to share code by sharing code in Linked Files, supporting Portable Class Libraries, introducing the Xamarin Component Store, adding support for NuGet directly into Xamarin Studio, and a number of other enhancements to their product lines. One feature that developers have been asking for over the years is the ability to share UI code between various platforms. I know I've asked for this feature for several years. With the late spring 2014 release of Xamarin 3 and Xamarin.Forms, Xamarin has produced a cross-platform UI application-programming interface for developers.

Thursday, July 31, 2014

Cross Platform Mobile With C# WhitePaper presented by Visual Studio Magazine

My white paper on Visual Studio Magazine is now available.  This whitepaper will discuss the details for developing cross platform applications with C#.
 "As a Microsoft-centric developer, you have great tools in the Microsoft .NET Framework and C# Language, but you're faced with a challenge when it comes to building apps for the exploding world of mobile devices: Learning new languages and platforms can be incredibly time-consuming.  Wouldn't it be better to use the skills you already posses?  In this paper, you'll learn how to use the interoperable technologies of Xamarin to do just that.

Wednesday, July 30, 2014

Be More Social: oAuth, Facebook and Xamarin

It isn't breaking news that social networks are a big deal to your users. But what's the best way to add that functionality in the cross-platform development world? One of the best ways is through Xamarin, which provides a set of components that allows developers to concentrate on high-level programming and solving user problems. This article will look at some technologies available in Android -- as well as the iPhone -- to add social features to applications. It serves as a companion to my April article that covered oAuth, Twitter and the Linq to Twitter library.

Monday, June 30, 2014

Standardized Navigation Principles for Android App Development - Visual Studio Magazine Article

Navigation in mobile devices is an important consideration. If a user isn't able to navigate an app, he might quickly abandon it. Learn the navigation principles of Android to keep this from happening to you.
Mobile applications have a number of screens (Activities and Fragments) associated with them. Navigating through these is an important mechanism. There are a number of ways to provide standardized navigation in Android. This article will look at three mechanisms to provide navigation:
  1. Menus: Menus provide a common UI component for an application. The Menu APIs are used to present actions, as well as other options within an application.
  2. Navigation Drawer: The navigation drawer is a panel shown from the side of the display; it provides the user with the application's main navigation.
  3. Action Bar: The action bar provides a familiar navigation mechanism to the user across the top of the screen via an app icon, action items and action overflow.
Many thanks to Tomasz Cielecki

Wednesday, May 14, 2014

Cross Platform Data Access with Xamarin & C# For iPhone, iPad, and Android - Local, Web Services, & Sql Server

The following is a link to cross platform data access training with Xamarin & C#.   It is intended for use on iPhone, iPad, and Android devices.  The course covers local data in Sqlite, calling Web Services via REST and JSON, and calling Sql Server.

Course Data 

Applications live on data. These applications can vary from an online social network service, to a company’s internal database, to simple data, and all points in between. This Course will focus on how to easily access data on the device, communicate back and forth with a web service, and then finally to a SQL server database. 

Outline

  • Local Data (27:36)
    • Introduction (00:36)
    • Problem (01:57)
    • Solution (02:01)
    • LINQ (02:03)
    • LINQ Status (00:48)
    • SQLite (02:18)
    • SQLite - .Net Developers (00:50)
    • SQLite-net (01:07)
    • SQLite-net Attributes (02:10)
    • Getting Started (01:09)
    • CRUD (01:05)
    • SQLite Platforms (01:17)
    • Demo: SQLite – Android (04:53)
    • Demo: SQLite – iOS (04:56)
    • Summary (00:20)
  • Web Services Data (32:43)
    • Introduction (00:19)
    • Async Commands (03:15)
    • HttpClient (01:26)
    • HTTP Verbs (01:29)
    • Notes (00:58)
    • GET Operation (01:37)
    • JSON.NET (01:50)
    • Images (01:16)
    • Other Http Verbs (01:27)
    • Post (03:18)
    • Demo: Http – iOS prt1 (05:26)
    • Demo: Http – iOS prt2 (05:28)
    • Demo: Http – Android (04:20)
    • Summary (00:27)
  • Direct Data (12:33)
    • Introduction (00:23)
    • Remote Data - Direct (02:47)
    • Sql Server (01:15)
    • Demo: Sql Server – iOS (04:15)
    • Demo: Sql Server – Android (01:49)
    • "codepage 1252 not supported" (01:03)
    • Other Resources (00:43)
    • Summary (00:15)
Note: Thanks to Frank Kreuger for his data access library Sqlite-Net.  It is very helpful and I have used it in some other projects beyond just this training session.

Monday, May 12, 2014

Cross Platform Development with Xamarin - Portable Class Libraries and ASP.NET Razor Templating

My training on Cross Platform Development with Xamarin w/ Portable Class Libraries and ASP.NET Razor Templating is now available online from Learn Now Online.  The url is: http://www.learnnowonline.com/course/cpx1/xamarin-cross-platform-pcl-and-razor

Course description

In this course we’ll cover cross platform mobile development using Xamarin. First we’ll cover Portable class libraries (PCLs). PCLs are tools provide .NET developers a way to share code between platforms with one library. PCLs help developers reduce the time and costs of development and testing code. With a PCL project, one library can be used by multiple platforms. Then we’ll move onto Mobile web apps. Mobile web apps are a very popular mechanism to target mobile devices. Unfortunately, there are times that a mobile web app cannot access device specific features. Xamarin provides a mechanism to host an ASP.NET MVC Razor Web Template/Page within a native application. This provides the cross platform capabilities of the web while still allowing applications to access native features of device.
I hope that you enjoy the course as well as my others at LNO. 

Course outline

Compilation (42:37)
  • Introduction (00:18)
  • .Net Compilation (01:33)
  • iOS Compilation (02:32)
  • Android Compilation (03:10)
  • API Support - Two Platforms (02:09)
  • API Support - Three Platforms (01:04)
  • Solution (02:04)
  • Benefits (01:40)
  • Disadvantages (01:09)
  • Platforms Supported (01:59)
  • Feature Support (00:38)
  • Nuget (02:08)
  • Supported Platforms (00:47)
  • IDE Support (01:39)
  • Demo: Create PCLs - Create (03:58)
  • Demo: Create PCLs - Nuget (04:04)
  • Demo: Creating PCLs - Detail (04:27)
  • Demo: Create PCLs - Android (06:42)
  • Summary (00:27)
VB and Info (13:50)
  • Introduction (00:25)
  • Visual Basic Support (01:20)
  • Demo: VB PCL Project (04:40)
  • Compared to File Linking (02:12)
  • Issues (02:32)
  • Licensing (01:06)
  • Urls of Interest (00:33)
  • Previous Courses (00:30)
  • Summary (00:26)
Web in the UI (14:44)
  • Introduction (00:26)
  • Agenda (01:06)
  • Mobile Web (02:30)
  • Problem (01:45)
  • Solution (01:02)
  • Initial Setup (02:20)
  • Demo: Mobile Web - iOS (02:21)
  • Demo: Mobile Web - Android (02:48)
  • Summary (00:23)
Razor Templating (27:08)
  • Introduction (00:24)
  • ASP.NET Razor Template (01:03)
  • Initial Concept (01:17)
  • General Concept (00:50)
  • Pass Data In (00:38)
  • Add Files - iPhone (01:11)
  • Add Files - Android (00:51)
  • Pull Data Out (01:40)
  • Android - Call C# from JS (01:20)
  • Demo: Razor Template – iOS (04:48)
  • Demo: Data Pullback (04:24)
  • Demo: Loading Local Content (01:18)
  • Demo: Razor Template – Android (03:21)
  • Demo: Load Data (03:26)
  • Summary (00:28)

Thursday, May 8, 2014

Mobile - Cloud - Web - Success

On the weekend of May 2-4, 2014, I attended the Atlanta Startup Weekend. I can't speak highly enough of the event.  Jen Bonnett runs a great event, provides a lot of great speakers and mentors.  I can't speak highly enough of her work and her event.  She has a number of people that help out as staff: Maria Joyner (she has to approve my Twitter bio), Dawn Law, Kiran Bindra, Michael Ames, Wanda, and Chris Schwartz. I've been to other start up events, but this will always be the gold standard.
Friday night is for:
  1. Pitches. This is the time when people with ideas are given 1 minute to "pitch" their idea. 
  2. Voting.  Attendees will vote on the pitches that have been presented.  Ideas that have enough votes will carry on.
  3. Team forming.  Attendees and presenters will form teams. These teams will have people that have a background in: marketing, ideas, business development, product development, design.   
Saturday and Sunday are for:
  1. Product development.  You really need to build something.  You should have a demo that works at some level.  This is what I do.  More on this in a moment.
  2. Design.  Product developers should not pretend that they can do design.  Designers and developers need to work together.  On the same level, designers should not try to pretend that they are developers.
  3. Customer discovery and validation.  If you don't have customers that are wanting to use your product, you don't have a product or business.
  4. Financial model.  You must have a financial model where more money comes in than goes out.
  5. Mentors will work with the various groups to assist as necessary.
Finally on Sunday evening, there are presentation pitches with a set of judges. 
What team did I join?  I met Angela Martin, James "Wes" Laney, Sam Griffiths.  Angela pitched the idea to more automate the valet process.  Wes and Sam were already there.  I joined the team.  This is the "Two Minute Valet" team.  Angela and Wes worked on customer validation and financial models.  Sam did the design work.  Without Sam, it would have been black text on a white background everywhere!  I think that we worked really well together.  Each of us brought a separate skill set to the team.  These skills were complementary.  There were no egos involved that got in the way.  I was really happy to work with them.  Angela made a great pitch in the competition on Sunday night.
What did I do?  I built an iPhone application, read QR Codes, stored data in a cloud based database( Sql Azure), and output data from the QR Code in a web page.  This ALL worked.  It was written in C#.  I'm a huge fan of Xamarin, so this should come as no surprise.  What did I learn from this?  C# in all places really helped me out.  I didn't have to do context switching between language.  I was more productive than having to use a lot of different platforms and languages.  Thanks to Xamarin for having a great product.  Thanks to Microsoft/Sql Azure for having a sql based database as well as having a simple place to deploy a web app for web services as well as a web site.  I'm a fan of mobile and cloud.
Result:  We finished third in the overall event.  I was really happy on the result.  We're still working together on things and we'll see where this leads up to.  We have a meeting with a mentor next week.  We'll see how things fall out on this.  Without Xamarin and Azure, there is no way that I could have built a product for us.
Thanks Angela, Wes, Sam, Xamarin, Microsoft, Jen, and everyone else.