我应该如何为 Android 应用程序制作服务器端软件?

发布于 2024-09-30 09:30:06 字数 192 浏览 2 评论 0原文

过去,我使用 Python 处理后端,使用 Django 处理前端,但我不知道这两者在 Android 上的工作效果如何。

谁能推荐一种制作与 Android 兼容的服务器端软件的好方法?

请考虑到我还想要一个 Web 应用程序作为前端,因此后端应该同时支持 Web 应用程序和 Android 应用程序。

感谢您的帮助!

In the past I have used Python for backend stuff along with Django for frontend stuff, but I don't know how well those two work with Android.

Can anyone recommend a good way to go about making server-side software that works well with Android?

Please take into account that I also want a web application as a frontend, so the backend should work with both the web app and the Android app.

Thanks for the help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

送你一个梦 2024-10-07 09:30:06

您可以首先使用 Django、tornado、cherrypy 或任何其他 Web 框架开发 HTTP API。然后,您的 Web 前端和 Android 应用程序都可以使用此 API。

一般来说,将 API 从应用程序中分离出来可以清理代码并使将来的更改更容易。在这种情况下,它还使您可以轻松拥有多个前端,而无需复制后端功能。

如果可以创建项目的 Web 应用程序版本,请考虑最简单的方法是创建针对 Android 屏幕格式化的应用程序版本,并允许 Android 用户使用具有适当样式的相同 Web 应用程序。

You might start by developing an HTTP API using Django, tornado, cherrypy, or any other web framework. This API may then be used by both your web frontend and your Android application.

In general, separating out the API from the application serves to clean up the code and make future changes easier. In this case, it also makes it easy for you to have multiple frontends without having to replicate the backend functionality.

If it's possible to create a web application version of your project, consider that it may be easiest just to create a version of that application which is formatted for the android screen, and allow Android users to use the same web application with appropriate styling.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文