alpha

360

  • Home

  • Documentation

    • GitHub
    • Offline
  • Order

    • Online Orders
    • Price List
    • Compare
  • Downloads

  • Blog

  • Forums

  • Contact

  • More

    Use tab to navigate through the menu items.
    0
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    Sep 01, 2018

    Using Constant/Enumerators for DB Actons

    in Suggestions

    Hello,


    I observed that you are using values for database action like:

    1 for Add

    2 for Edit

    etc.


    Instead of this we should use Constants/Enumerators. For example for Add we can create a Constants/Enumerators variable called dbAdd (DB_ADD) = 1


    It is easier to read such variables and understand instead of values.


    Just my thoughts....


    Yogi Yang

    1 comment
    0
    Steven Sitas
    Sep 01, 2018

    Hi Yogi,


    we have "played" with this idea when moving from v1 to v2; some of our licensees suggested it.

    But since many of our licensees are ex Clarion developers, [1,2,3] is "deeply embedded" in their minds - and in ours also !!!

    Note that this type of coding is also in the Business Object Roles; but we have an enumeration for these values [enBusinessObjectRole is Enumeration] in the project code.


    Regards

    Steven Sitas