Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I've worked on applications with service tiers. While this might not be the best way, here is how I've seen it done.</p> <p>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.</p> <p>2) Features that are not common should be broken out in a granular way. so they can be enabled/disabled one at a time.</p> <p>3) Assign a matrix of features to tiers. </p> <p>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. </p> <p>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.</p> <p>In the code you just check weather a feature is enabled and let the licensing server figure out what tier the user is on.</p> <hr> <p>Another way i've seen in PC Games for demo disks is to have a compilation target for each tier. <code></p> <p>#DEFINE TIER_NORMAL 1</p> <p>#DEFINE TIER_LITE etc.</p> <p>then</p> <p>#ifdef TIER_NORMAL </p> <p>do tier normal stuff</p> <p>#endif </code></p> <p>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.</p> <p></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload