简体   繁体   English

Android应用程序的架构,可显示来自WS的数据

[英]Architecture of Android app to display data from WS

I want to build an Android app to display a list of different music singers with some data on each row and a small photo of album. 我想构建一个Android应用程序,以显示不同音乐歌手的列表,每行都有一些数据,并附有一张专辑的小照片。 Should be small navigation after selecting an artist, you can go to his albums and then to his songs... 选择歌手后,应该稍作浏览,您可以转到他的专辑,再转到他的歌曲...

1 - what would be the best architecture design for this kind of app? 1-这种应用程序的最佳架构设计是什么? I tough about implementing it in this way: 我很难以这种方式实现它:

When splash screen appears I call to a web service to download the information and save it on device DB .Then I use Loaders to load all this data from DB , after load is complete I remove the splash screen and display the list. 当出现启动画面时,我调用web service下载信息并将其保存在设备DB 。然后,我使用LoadersDB加载所有这些数据,加载完成后,我将删除启动画面并显示列表。 For each item click I bring the data from WS and display it. 对于每个项目,单击“我从WS带来数据并显示它”。 my question is do I need to involve actually DB for this? 我的问题是我是否需要为此参与DB? and is it good to fetch data for each item selected (singer), if I go back and then press again the same item, do I have to bring again all the data from WS? 并为每个选定的项目(歌手)获取数据是否很好,如果我返回然后再次按同一项目,是否必须再次从WS中获取所有数据?

2 - Anybody can recommend site where I can learn about architecture of apps, not the linux-android architecture but real apps. 2-任何人都可以推荐一个网站,在这里我可以了解应用程序的体系结构,而不是linux-android体系结构,而是真正的应用程序。

Ok I'm not sure if it's the best approach, but give this blogpost a try. 好的,我不确定这是否是最好的方法,但是请尝试尝试此博客。 It helped me a lot, because it gives you kind of a convention how to design android applications (I'm coming from rails^^). 它给了我很多帮助,因为它为您提供了一个惯例来设计android应用程序(我来自rails ^^)。 http://blog.joanzapata.com/robust-architecture-for-an-android-app/ http://blog.joanzapata.com/robust-architecture-for-an-android-app/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM