What's the difference between data and code?

前端 未结 13 805
青春惊慌失措
青春惊慌失措 2020-12-13 10:52

To take an example, consider a set of discounts available to a supermarket shopper.

We could define these rules as data in some standard fashion (lists of qualifyin

13条回答
  •  余生分开走
    2020-12-13 11:04

    Data is information. It's not about where you decide to put it, be it a db, config file, config through code or inside the classes.

    The same happens for behaviors / code. It's not about where you decide to put it or how you choose to represent it.

提交回复
热议问题