Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Azure and Metro-style apps in Windows 8

I have atleast 5 billion ideas for a new App in Windows 8. However, most of them rely on a remote database connection.

Which is currently not possible in Metro apps. But I don't want just a work-around. Or an script that accesses an API which will access the DB and return results. So then I went to the MS forums and found a post somewhere (which I can't seem to find now) stating that I can just use Windows Azure SQL database and can connect to that one from within Windows Metro.

But I don't see any resources or documentation to back that up and I'm completely lost as to what to do.

Most apps these days, to offer any sort of personalized user experience need to communicate with the outside world and it's just impossible to do in Metro apps from what I can see.

Does anybody know if you can connect to a Windows Azure SQL DB from within a Metro style app? Any resources/Docs/Links/Samples you know of?

Thank you!

like image 226
Arrow Avatar asked Jun 12 '12 12:06

Arrow


People also ask

What are Metro apps in Windows 8?

Metro apps are touch-screen-friendly apps written especially for Microsoft's WinRT programming interfaces. ARM-based Windows RT devices, such as the Surface tablet, will require Metro apps. Devices running Windows 8 are expected to be able to run both Metro apps and Win32 apps.

What is Metro in computer?

Metro is a programming language, created by Microsoft, originally for use with Windows Phone 7. The language is typography-based, meaning it focuses more on typography versus graphics ("content before chrome"). Microsoft has also used Metro in the Xbox 360 dashboard (updated version) and in Windows 8.

What is Metro style?

They use a typography style that delivers the message directly to the receiver without disturbing them in the process. The typography style is clean, honest and beautiful. And the final influencer adds emotion and brings the design to life. Metro style is seen in all of Microsoft products. Even in their presentations.


2 Answers

Metro apps are optimized for tablets and generally CPU-and-battery constrained devices. Directly connecting to a database and processing the results is expensive in CPU, battery AND bandwidth terms.

What's more, database protocols aren't cachable and were not meant to deal with internet latencies. Your app could waste a lot of time trying and retrying to connect to the database each time the connection quality degraded.

The best option would be to a set of WCF Data Services on top of your database and expose them to your application. It's easy to create a WCF Data Service on top of an Entity Framework model and the OData protocol used by WCF Data Services allows querying your entities using LINQ in an asynchronous manner. More complex processing can be done in the web server.

like image 124
Panagiotis Kanavos Avatar answered Oct 27 '22 00:10

Panagiotis Kanavos


At this point Metro does not have a System.Data so there is no direct connect to the database. You would need to communicate with the database via WCF to a Web Service.

Metro does have a user settings facility but I cannot find it right now. http://msdn.microsoft.com/library/windows/apps/BR208189

The history is that the jumping off point for Metro was Silverlight. Not saying that makes sense just what I have read. It appears Microsoft wants to sandbox Metro for the Metro Store.

like image 34
paparazzo Avatar answered Oct 26 '22 23:10

paparazzo