具有简单类型的公共变量的本地表与类 [英] Local Table vs. Class for Public Variables with simple types
本文介绍了具有简单类型的公共变量的本地表与类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个问题基于:
http://groups.google.com/group/comp....2bbc027bf00720
一个本地表可以作为一个穷人的公共存储库,用于简单的''类型的公共
变量。'
的相对优点是什么?创建一个类或集合而不是使用本地表?
James A. Fortune
解决方案
< blockquote>我不是真的回答你的问题(aplogies)但
我使用了数据库的自定义属性或访问> = 2000 of
当前项目。
优点:
1.它们在打开应用程序时仍然可用(即
我们可以保存用户的偏好);
2.属于前端所以没有担心差别化
来自Jean''的John''s。
本地表具有相同的优点。自定义属性是否具有
的优势,本地桌子没有这个优势?
James A. Fortune
主要是持久性。
如果你只是坚持静态值,那么你无关紧要
使用。
我坚持用户可以更改的值(即用户
设置)然后你需要坚持到可以做的事情写给。
典型的例子包括: -
数据表
Ini文件
纯文本文件>
注册表(特别是使用GetSetting / SaveSetting)
数据库属性
-
特里Kreft
< ji ******** @ compumarc.com>在消息中写道
news:11 ********************* @ g14g2000cwa.googlegro ups.com ...我有一个问题基于:
http://groups.google.com/group/comp....2bbc027bf00720
A本地表可以作为穷人的公共变量存储库,具有简单的类型。
创建类或集合与使用本地表有什么相对优点?
James A. Fortune
I have a question based somewhat on:
http://groups.google.com/group/comp....2bbc027bf00720
A local table works well as a poor-man''s repository for public
variables with simple ''Types.'' What are the relative merits of
creating a class or collection versus using a local table?
James A. Fortune
解决方案
I''m not really answering your question (aplogies) but
I have used custom properties of the database or in access >=2000 of
the current project.
Advantages:
1. They persist and are available on opening the application (that is
we can save a user''s preferences) ;
2. The belong to the front end so not worry about differentiatings
John''s from Jean''s.
A local table has the same advantages. Do the custom properties have
an advantage that is not shared by a local table?
James A. Fortune
The main thing is persistence.
If you are simply persisting static values then it doesn''t matter what you
use.
I you are persisting values which can be altered by the user (i.e. user
settings) then you need to persist to something which can be written to.
Typical examples include:-
Data tables
Ini Files
Plain text files
Registry (especially using GetSetting/SaveSetting)
Database properties
--
Terry Kreft
<ji********@compumarc.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...I have a question based somewhat on:
http://groups.google.com/group/comp....2bbc027bf00720
A local table works well as a poor-man''s repository for public
variables with simple ''Types.'' What are the relative merits of
creating a class or collection versus using a local table?
James A. Fortune
这篇关于具有简单类型的公共变量的本地表与类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文