用于应用程序的 XML 或数据库中的自定义联系人数据?
编写我的第一个 Android 应用程序。我想我会从公司目录应用程序开始。该应用程序仅具有对数据的读取访问权限(用于搜索/显示)。
必须从 Active Directory 中提取数据。
所以我有几个问题。
我应该将数据放入 xml 还是数据库中?我倾向于xml。
是否可以创建一个自定义联系人数据库并使用它?在我看来,创建一个自定义联系人数据库似乎更容易,然后应用程序可以利用所有内置的联系人功能来指向不同的数据库。
任何其他提示也将不胜感激。
谢谢,
李
Writing my first Android app. Thought I would start with a Corporate Directory application. The app will only have read access to the data (for searching/displaying).
The data will have to be extracted from Active Directory.
So I have a few questions.
Should I put the data in xml or a database. I'm leaning towards xml.
Would it be possible to create a custom contact database and use that instead? It would seem to me to be easier to just create a custom contact database and then the application could just leverage all of the built contact functionality just pointing to a different database.
Any other tips would also be appreciated.
thanks,
lee
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
兄弟 !好问题!
我建议您在 xml 文件的情况下使用数据库!
毫无疑问,与数据库相比,XML 是轻量级且易于使用的。但就您而言,您想要添加自定义联系人的功能。如果你创建 xml 并从中获取数据,那就不行了。有可能!但是万一(我说的是万一)你需要添加/删除一个或多个字段呢?你必须修改整个xml文件!但如果是数据库,只需输入/删除该字段! !无需修改整个数据库!希望您能理解我的评论!谢谢
Brother ! Nice question !
I am suggesting you to use Database in case of xml file !
No doubt xml is light weight and easy to use compare to database. But in your case you want to add functionality of custom contacts. If you make xml and fetch data from this, no metter. Its possible ! But incase ( I said incase) you need to add/remove one or more field then ? you have to modify the whole xml file ! But in case of database just enter/remove that field ! ! No need to modify whole database ! Hope you understand my review ! Thank you