Archives For Windows

If you’re a CIO, IT Director or Manager that’s considering introducing Windows 8 Tablets into your enterprise, I do not want you to think that making this move requires you to rewrite your corporate apps.  I repeat, the apps you currently use to run your business that are written in .NET, C++, Java, Delphi, VB6, PowerBuilder or other Win32 compatible languages are all welcome.  There’s a reason we included a desktop persona in addition to our Tiled interface and Modern UI apps. 

Don’t create an artificial blocker that delays the productivity gains your employees will enjoy by moving to a Tablet built for the enterprise.  There are great Windows 8 Tablets on the market that are thin, light, and provide 10 hours of battery life, Win32 compatibility, with amazing touch capabilities.  I challenge you to test out the apps you’re currently running on Windows 7 and XP.  While your existing apps may not be touch friendly at first, Tablets with digitizer pens allow your employees to tap on the small UI elements that were originally designed for a mouse.  The next baby step you can choose to make is modify the UI of your existing apps to have the forms run full-screen while increasing the size of text boxes, buttons, list boxes, fonts and other UI elements as necessary.  All this can be done visually and quickly without touching a line of code.  Giving your existing apps a touch-first treatment will breathe new life into them and your employees will be delighted. 

As you can probably tell, I’m a pragmatic technologist.  I realize that you’ve invested millions over the last couple of decades in the Win32 apps and systems that help make your business a success.  Even in the face of the tablet revolution that’s taking place all around us, rip and replace isn’t something that IT budgets can afford and the downtime is unacceptable.

The good news is that Windows runs on a new generation of Tablets that are secure, manageable and built for business.  Unlike other Tablets and operating systems on the market, Windows 8 Tablets run the apps that matter most.

-Rob

So you need to build a mobile enterprise app that runs on Windows tablets…

Windows8

Your app must retrieve data from SQL Server and take it offline.  It must allow the mobile user to view, manipulate, capture new information, and then send it back to the data center.  There’s lots of data involved, so you require a mobile database with easy-to-use SQL rather than writing your own file I/O code.  While you could create dozens of web services, hundreds of web methods, plus associated data sync logic, you’d prefer to have that plumbing handled for you.  Since you can’t count on ubiquitous networking, the app must work well in an occasionally-connected environment.  Data transmissions must thrive in the slowest GPRS speeds and network dropouts must be handled smoothly via intelligent resume.  While you’re super-excited about the new programming model in Windows 8, you need this app to work on your company’s Windows 7 tablets and laptops as well.  Oh, and it has to work on those 32-bit, Intel® System on Chip (SoC) Windows tablets with long battery life.  The app must have a touch-first UX that works with fingers on tablets while supporting a mouse on laptops.  The sync technology must authenticate with your company’s Active Directory and both data-at-rest plus data-in-transit is encrypted.  While the initial app deployment only runs in the thousands, the system architecture must scale out to support tens or even hundreds of thousands of tablets.  Most of all, you’re looking for a simple solution that gets your app to market faster at a lower cost by avoiding developing everything from scratch.

If this sounds like your scenario, I’m writing your next book.

-Rob

Over the summer of 2012, Microsoft announced support for SQLite on both Windows 8 and Windows Phone 8.

This is exciting news because it allows developers to build enterprise and consumer apps that utilize the world’s most widely used embedded database engine.  We all know that there’s no such thing as ubiquitous wireless connectivity and therefore mobile apps must have an offline data store so users can keep working in the absence of a wireless network.  While apps with limited data requirements can serialize data offline as JSON or XML, certain enterprise line of business apps need a true mobile database to meet their larger data requirements.

For those of you who have worked with SQL Server Compact, you’ll find SQLite’s characteristics to be very familiar.  It’s an embedded database that runs in-process with your mobile app instead of running as a separate process like a server-based database.  It stores data in a single disk file, supports transactions, and doesn’t require any type of configuration to get started.  I can’t emphasize enough the importance of SQLite’s full ACID support.  Transactions will fully succeed or be safely rolled back in the face of your app crashing, your devices’ battery running out, or a full operating system crash.

The size of the database engine is a small as 350kb, and supports all our new platforms whether they’re x86, x64, or ARM.  SQLite supports most of the SQL92 standard so most database developers should feel right at home.  Most of the DDL and DML features you expect are supported.

To get started, go to http://www.sqlite.org/download.html and click sqlite-winrt-3071401.vsix to download the latest Precompiled Binaries for Windows Runtime from SQLite.org as shown below.

Download

Once your download is complete, right-click on sqlite-winrt-3071401.zip and select Open with… as shown below.

In the How do you want to open this file? dialog, uncheck Use this app for all .zip files, scroll down and select Look for another app on this PC.

In the Open with… dialog, navigate to C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\VSIXInstaller.exe and click Open.  This will launch the VSIX Installer as shown below.  Click Install.

Of course, there’s another way to do this from within Visual Studio by selecting Tools | Extensions and Updates.  Expand Online and then search for SQLite.  The same SQLite for Windows Runtime that you installed manually will show up with the ability to download and install from within the tool as shown below.  You may be asked to restart Visual Studio.

With the SQLite for Window Runtime installed, launch Visual Studio 2012 on your Windows 8 computer and create a new Windows Store app.  In the Solution Explorer, right-click on References, and select Add Reference.  In the Reference Manager, expand Windows and select Extensions on the left side of the dialog.  Check both Microsoft Visual C++ Runtime Package and SQLite for Windows Runtime and click OK as shown below.

In order to create an app using SQLite, you won’t be able to utilize Any CPU compilation.  Therefore, from the Debug combo box, select Configuration Manager.  For both Debug and Release Active solution configurations, you must select either x86, x64, or ARM for your Active solution platform.  Make sure you switch to Release before submitting your app to the store.

In order to more easily work with SQLite, I suggest you get some wrapper code to help you out so you don’t have to PInvoke unmanaged SQLite functions yourself.  Your best bet is to right-click on References and select Manage NuGet Packages.  In the Manage NuGet Packages dialog, expand Online and then search for SQLite.  Your search results will include a lot wrappers, but I need to steer you in the direction of libraries that support x86, x64, and ARM while not depending on ADO.NET.  Select the LINQ-friendly sqlite-net library created by Frank Krueger, click Install and then close the dialog to add it to your solution.

We all know that serious mobile enterprise line of business apps require a mobile database to store data downloaded from on-premise and cloud-based servers, data captured in the field, and business transactions that occur on the device.  With SQLite we have a robust mobile database solution that spans Windows 8, Windows RT, and Windows Phone 8.

Assuming you still don’t want to create your own SQLite wrapper, I’ll show you how get started with some DDL using sqlite-net in the next article.

- Rob

 

 

The Microsoft Surface is about the change everything…

- Rob

Join the Windows Azure team at Seattle Interactive Conference (Nov 2 -3, 2011) for two days of technical content and one-on-one advice and assistance from product experts.  Cloud Experience track is for experienced developers and who want to learn how to leverage the cloud for mobile, social and web app scenarios.  No matter what platform or technology you choose to develop for, these sessions will provide you with a deeper understanding of cloud architecture, back end services and business models so you can scale for user demand and grow your business. 

Learn more about the Cloud Experience Track at SIC, and view the speaker list.  Registration for the Seattle Interactive Conference is $350, and includes full access to conference sessions and activities.

SIC is developing a world-class speaker roster comprised of online technology’s most successful and respected personalities, alongside earlier-stage entrepreneurs who are establishing themselves as the leaders of tomorrow. SIC isn’t just about telling a story, it’s about truly sharing a story in ways that provide all attendees with a thought provoking experience and actionable lessons from the front lines.

Our confirmed speakers include:

 

Wade Wegner

Microsoft

Wade Wegner is a Technical Evangelist at Microsoft, responsible for influencing and driving Microsoft’s technical strategy for the Windows Azure Platform.

 

Rob Tiffany

Microsoft

Rob Tiffany is an Architect at Microsoft focused on combining wireless data technologies, device hardware, mobile software, and optimized server and cloud infrastructures together to form compelling solutions.

 

Steve Marx

Microsoft

Steve Marx is a Technical Product Manager for Windows Azure.

 

Nick Harris

Microsoft

Nick Harris is a Technical Evangelist at Microsoft specializing in Windows Azure.

 

Scott Densmore

Microsoft

Scott Densmore works as a Senior Software Engineer at Microsoft.

 

Nathan Totten

Microsoft

Nathan Totten is a Technical Evangelist at Microsoft specializing in Windows Azure and web development.

 

I hope to see everyone there!

-Rob