您将如何编译/设计具有不同功能集的分层应用程序

发布于 2024-07-10 03:27:38 字数 158 浏览 8 评论 0原文

如果您有 Lite、Normal、Ultimate 层和重叠的功能集(可能会减少功能),那么从开发的角度来看,让事情变得简单的最简单方法是什么?

我只使用过具有单一许可证、启用/禁用特定组件/功能的子功能许可证或席位/资源许可证的应用程序。 我有一些想法,但一些新的见解会很好。

In a situation where you have something like a Lite, Normal, Ultimate tiers and overlapping feature sets that may have reduced functionality what would be the easiest way to keep things simple from a development standpoint?

I've only worked with applications that had either a monolithic license, a sub feature license where specific components/features were enabled/disabled, or a seat/resource license. I have a few ideas, but some fresh insights would be good.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迷离° 2024-07-17 03:27:38

我曾开发过具有服务级别的应用程序。 虽然这可能不是最好的方法,但这是我所看到的完成方式。

1) 找出所有层共有的功能。 通用功能不需要任何逻辑,因为它们可供每个人使用。

2)不常见的特征应该以细粒度的方式分解。 因此可以一次启用/禁用它们。

3) 将特征矩阵分配给各层。

我们有一个许可应用程序,它基本上是一堆包含所有细粒度功能的复选框。 选择“Lite”将选中相应的框,以便在生成许可证代码时,它将包含这些功能。

启动时,会安全地查询许可证服务器。 (这是一个服务器应用程序,因此它不会经常启动/停止,并且保证互联网)允许的功能列表将返回到应用程序。

在代码中,您只需检查功能是否已启用,然后让许可服务器确定用户所在的级别。


我在电脑游戏演示盘中看到的另一种方法是为每一层都有一个编译目标。

#DEFINE TIER_NORMAL 1

#DEFINE TIER_LITE 等等,

然后

#ifdef TIER_NORMAL

做层正常的事情

#endif

请注意,您必须跟踪 3 个不同的二进制文件,这可能会很痛苦。
但结果是您没有交付用户未付费的代码。 在较小的项目中可能比获得正确的许可服务器更容易。

I've worked on applications with service tiers. While this might not be the best way, here is how I've seen it done.

1) Figure out which features are common to all tiers. Common features don't need any logic to them as they are available to everyone.

2) Features that are not common should be broken out in a granular way. so they can be enabled/disabled one at a time.

3) Assign a matrix of features to tiers.

We had a licensing app that was basically a bunch of checkboxes of all the granular features. Choosing "Lite" would check the appropriate boxes so when the license code was generated, it would include those features.

On startup the license server was securely queried. (This was a server app, so it didn't start/stop very often, and internet was guaranteed) A list of allowed features would be returned to the application.

In the code you just check weather a feature is enabled and let the licensing server figure out what tier the user is on.


Another way i've seen in PC Games for demo disks is to have a compilation target for each tier.

#DEFINE TIER_NORMAL 1

#DEFINE TIER_LITE etc.

then

#ifdef TIER_NORMAL

do tier normal stuff

#endif

Note you have to keep track of 3 different binaries, which can be a pain.
But the upshot is you have no code delivered the user didn't pay for. Might be easier in a smaller project than getting the licensing server right.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文