Application:models

From Surebert wiki

  • Stored in the /private/models folder
  • Models classes cannot start with rp_ or sb_
  • Models must be named in camel case with capital first letter. e.g. ShoppingCart, User, Blog, Car, File
  • Do not repeat yourself - and share by extending models
    • Admin extends User
    • User extends Person
    • Patient extends Person
    • LoginForm extends Form
  • Think about models right at the beginning of the development process and anytime you add anything to your application. Ask yourself what is this application doing?
  • Model classes should contain all of the business logic, data storage/lookup, etc. It should generally be the only place you find SQL statments.