Windows 窗体应用程序的用户特定设置文件:本地 xml 文件或数据库 [英] User-specific settings files for a windows form application: local xml file or database

查看:22
本文介绍了Windows 窗体应用程序的用户特定设置文件:本地 xml 文件或数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和我的同事似乎无法就以下问题的解决方案达成一致:

My coworkers and I cannot seem to agree on a solution to the following issue:

我们正在努力将我们的应用程序迁移到 .net 框架.它将是一个独立的应用程序(不是 Web 应用程序),它将包含许多用于对我们广泛的数据库进行更改的自定义表单.因此,总而言之,如果没有数据库连接,该应用程序几乎毫无用处.哦——而且没有必要建议把它做成一个网络应用程序,因为在这件事上真的别无选择.

We are working on moving our application to the .net framework. It will be a standalone application (not a web application) that will consist of many custom forms used for making changes to our extensive database. So, in summary, without a database connection, the application is pretty much useless. Oh--and there's no need to suggest making this a web application because there is really no choice in the matter.

我负责构建主菜单"——我已经决定采用一个树结构来列出所有自定义表单(按团队分类).它还包括我的表单"部分和最近的表单"部分,用户(我的表单)和系统(最近的表单)会定期更改这些部分.

I am responsible for building the "main menu"--I've decided on a tree structure that will list all the custom forms (categorized by team). It will also include a "My Forms" section and a "Recent Forms" section that will be changed by the user (my forms) and the system (recent forms) on a regular basis.

我的问题是:存储这些自定义用户特定设置的最佳位置是什么?位于本地或位于数据库表中的 XML 文件?也许是因为我以前是 Web 应用程序开发人员,但我完全赞成将其存储在数据库中.大家怎么看?

My question is this: what is the best place for storing these custom user-specific-settings? An XML file located locally or in tables located database? Maybe it's because I'm a former web app developer but I'm totally for having this stored on the database. What do y'all think?

感谢您的意见

推荐答案

如果用户可以在没有数据库的情况下运行,那么它们应该是一个本地 xml 文件.如果应用程序需要数据库正常运行,我会将它们添加到数据库中.为什么要向应用程序添加一些新概念,只需将数据存储在一个地方.您的应用程序也将能够以较低的权限运行.如果您使用的是 asp.net 成员资格模型(是的,对于桌面应用程序),那么您将能够利用分析.

If the user can function without the database they should be a local xml file. If the app requires the database to be functional, I'd add them to the database. Why add some new concept to the app, just keep storage of data in a single place. Your app will be able to run with lower privileges as well. If you're using the asp.net membership model (yes, for the desktop app) then you'll be able to take advantage of the profiling.

我投票数据库!

这篇关于Windows 窗体应用程序的用户特定设置文件:本地 xml 文件或数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆