symfony2 服务器设计模式最佳实践

symfony2 server design pattern best practice

所以我打算使用 Titanium 创建一个移动应用程序。我想使用 Symfony2 作为服务器并通过 rest API 与客户端(移动)

进行通信

我想问的是,在设计我的服务器时最佳实践是什么?你建议我从什么开始?

看看 FOSRestBundle or the Symfony REST Edition,这会让您快速入门。

https://github.com/FriendsOfSymfony/FOSRestBundle

https://github.com/gimler/symfony-rest-edition

就 RESTful API 端点设计和您的 API 将传输的数据而言,我非常喜欢这个指南:

http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api

当然,这更像是一个通用的 "How do I REST API?" 指南,但我认为它在像您这样的情况下很有用。