Difference between revisions of "Coding standards"

From TempusServa wiki
Jump to navigation Jump to search
Line 7: Line 7:
** Views: '''com.tsnocode.views'''
** Views: '''com.tsnocode.views'''
* Solution specific code
* Solution specific code
** TS customer app: '''com.tsnocode.customer.solution.app'''
** TS customer app:  
** Vendor app: '''com.vendor.solution.app'''
*** '''com.tsnocode.solution.app'''
*** '''com.tsnocode.solution.customer'''
*** '''com.tsnocode.solution.customer.app'''
** Vendor app:  
*** '''com.vendor.tsnocode.app'''
*** '''com.vendor.solution.app'''


==== Class naming ====
==== Class naming ====

Revision as of 10:59, 18 November 2022

Naming standards (tobe)

Package / naming placement

  • Package name all lowercase
  • General platform entities
    • Servlets: com.tsnocode.ui
    • Fields: com.tsnocode.field
    • Views: com.tsnocode.views
  • Solution specific code
    • TS customer app:
      • com.tsnocode.solution.app
      • com.tsnocode.solution.customer
      • com.tsnocode.solution.customer.app
    • Vendor app:
      • com.vendor.tsnocode.app
      • com.vendor.solution.app

Class naming

  • Starting with uppercase
  • No special characters
  • Seperate words with uppercase

Safety standards

  • Input sanitization used in SQL, using either
    • Escape all string parameters using DbConnection.EscapeSQL
    • Prepared statements
  • Page codeunits should contain user group restrictions

Review standards

The following changes requires a formal code review

  • Changes to common objects
    • Command
    • Security
    • Controller
    • DbConnection
  • Creation of OR changes to
    • Servlets
    • CodeunitPagePublic
    • Code containing SQL