1. REST API for your WP7 App
Agnius Paradnikas
@Agnius101
2. About me
• .NET web developer for more than 6 years.
• Recently focused on mobile app development.
• Graduated KTU.
• Created first WP7 app more than 1 year ago.
• Now developing Weepin WP7 app on my
spare time.
8. REST API
• Stands for REpresentational State Transfer.
• Client-server: separation of concerns.
• Statless: no state is saved on server, if needed
it is saved on client.
• Cacheable: clients can cache responses.
9. REST API
• Easy to scale out.
• Easy to build, maintain and modify.
• Less overhead - higher performance.
• Implementation does not require high
technical skill level.
11. • Simple REST and HTTP API Client for .NET.
• No need to know about low-level networking.
• Covers all needed cases like:
– Async requests (all requests in WP7 should be async!);
– Data mapping;
– Authentication;
– JSON/XML serialization;
– Implement your own custom serialization;
– Etc.
16. REST API Server side
• Choose any technology you want:
– .NET
– JAVA
– PHP
– Python
– Ruby
– and so on…
17. • Cheap and easy way to implement server side
REST API.
• For PHP and MySQL.
• Supports all needed tools to build REST API:
– MVC
– Routing
– ORM
– Logging & Profiling
– and so on…
18. Getting Started
• Go to http://www.doophp.com/
• Download latest version.
• Create MySQL database tables.
• Make configuration changes in:
– appprotectedconfigcommon.conf.php
– appprotectedconfigdb.conf.php
20. Create models
appprotectedmodelTodo.php
<?php
class Todo{
public $id;
public $todo;
public $username;
public $created;
public $_table = 'todos';
public $_primarykey = 'id';
public $_fields =
array('id','user_id','todo','username', 'created');
}
?>
23. My own experience
• Never try to do everything yourself.
• Be fast.
• Think how to add Facebook and YouTube
effect to your app.
• Read carefully certification requirements
before submitting your app.
24. How can I help you
• Support creating WP7 app from scratch.
• Setup REST API and DB in both .NET and PHP
technologies.
• Share my experience if you decide to move with
advanced techniques like MvvM.
• Give advice on usability.
• Give advice how to improve functionality.
• I don’t have experience creating games on XNA.