TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How to go from a Django app to Android app.

6 pointsby foobarramalmost 13 years ago
We have a properly structured Django app, which we now want to develop an Android app for with the same functionalities as the Django app. What is the most relatively pain free way going about achieving this? p.s: our devel team has no prior Android experience.

1 comment

swansonalmost 13 years ago
The following metaphors are more or less accurate and helped me with the same transition (MVC web architecture to Android):<p>* Layouts are like views, though Android's XML layouts aren't able to have conditionals or logic like most web app templates<p>* Intents are like URLs, the Manifest file is like the router<p>* Activities are like controllers, you should aim to keep them "thin". This is also where callbacks for things like button clicks live<p>* You can use sqlite on Android, but there isn't anything like the Django ORM built-in<p>* SharedPreferences can act as a key-value store for small data (sort of like Redis I suppose)<p>If you can expose all of your app's functionality through an API, then you can just treat the Android app as an API client. If not (or if you want the app to be more than a wrapper), I would aim for the prototypical "thin controller, fat model" pattern and push all the business logic into plain Java objects if possible (so much easier to unit test).
评论 #4086644 未加载
评论 #4083484 未加载