开发者

Creating app data on first use

开发者 https://www.devze.com 2022-12-29 06:44 出处:网络
I once read somewhere that apps should not copy data while doing an installation but rather all data creati开发者_如何学Goon must be done the first time the app is used.

I once read somewhere that apps should not copy data while doing an installation but rather all data creati开发者_如何学Goon must be done the first time the app is used.

Q1: Does this apply to Windows Mobile apps also?

Q2: Is it not okay then to copy a blank database to the \appdata\product\ folder and populate it when the user uses the app or must I wait for the user to se the app to even create the database.

Win Mobile C# .NET


Sounds like a strange rule to me, at least if it's supposed to be adhered to at all times.

Since you don't specify what is data, if the application configuration (either in a .config file or somewhere) isn't copied during installation, the app might not even be able to run. And talking about databases, I'd say that any database that will be used by the application should be created during installation and probably most of the data too.
Otherwise, the administrator might install the application on a machine and then when the user tries to run it he won't be able to since he don't have permissions to create databases or only have read only access to the database.

One instance when the rule sounds right though is if it's user specific data, since otherwise it might not work properly if an administrator installs it and then another user tries to use it.

Since it's WinMobile I suppose there won't be any user accounts to worry about as such, but I think the principles would still be the same, so I'd only worry about that rule for user specific data.

0

精彩评论

暂无评论...
验证码 换一张
取 消