Better Programming with multi-tenancy
Now when you have multi-tenancy applied in your project, its very important to write clean and modular code for easy understanding and improved readability. Here are some important suggestions to follow that will help you to write better code:
Since most of the methods you write will pass through organization and will often be defined in
organization.json
, make sure to define functions specific to particular models inside their ownmodel.json
and internally call the function with right arguments fromorganization.json
file. Example:Define the main function in
product.json
fileAnd expose a remote method in
organization.json
file, as a wrapper which callsaddProductsInBulk
:
Last updated