3

I making a Windows 8 application and I want to retrieve some data in my server in the cloud, my server runs in php + mysql and the application is in code igniter and I want to know if someone did something like this? My application has 6 top 10 ranking and I want to make just one xaml page retrieving the information by the ID off my mysql table in the cloud.

Thanks.

Jerry Nixon
  • 31,313
  • 14
  • 117
  • 233
  • 1
    doesn't matter what your app is written in - if you're talking to a remote php server, you'd be using HTTP requests. what form those requests take is up to you. – Marc B Jan 10 '13 at 17:07
  • Have you thought about communicating using SOAP (WSDl)? – Bogdan Burym Jan 10 '13 at 17:10

2 Answers2

1

When you say "I want to make just one xaml page retrieving the information by the ID off my mysql table in the cloud", I'm tempted to interpret that as you wanting to go directly from your Windows 8 client to MySQL. You shouldn't do that for security reasons. You'll need to use your PHP layer in between. You may not have meant to imply that you'd go directly from the client to MySQL, but I thought I'd be extra clear about this.

I recommend creating a RESTful web service with CodeIgniter. Here's another question on StackOverflow which will give you some pointers:

Once you have a web service, you can easily talk to it from .NET using System.Net.Http.HttpClient. You can also very easily talk to a web service with JavaScript, so you may consider building your app using JS/HTML instead of .NET/XAML. The free book Programming Windows 8 Apps with HTML, CSS, and JavaScript by Kraig Brockschmidt is a good place to start.

Community
  • 1
  • 1
Matt Harrington
  • 638
  • 3
  • 13
1

The answer is yes. You can certainly use PHP and MySql with a WIndows 8 XAML project. You bet. The easiest approach is a simple REST service that emits JSON. Then you can deserialize the JSON and bind direct to it in your XAML.

Here's info on JSON: How do I de/serialize JSON in WinRT?

Community
  • 1
  • 1
Jerry Nixon
  • 31,313
  • 14
  • 117
  • 233