Best practices to apply in large scale applications

Below are 19 best practices which can be used in a large scale applications for getting best performance results:

  1. Avoid writing business logic in the stored procedure which would otherwise be difficult to migrate your code to NoSQL world in future.
  2. BLOB or Files should never be stored in database. Instead we should be using file stream feature of SQL Server Database.
  3. Treat the transactional table in database to behave like NoSQL.  Add column store indexes to very large tables (100 million+ records) to improve query performance in OLTP database.
  4. Frequently used table should be memory optimized.
  5. To improve IO performance, transactional table/indexes must be partitioned. 
  6. Always use ORM to encapsulate Data Access.
  7. Always prefer to use code-first approach in ORM.
  8. To enable micro-services support , apply domain driven design concepts.
  9. Always segregate read and write operations in the repositories which exposes entities as collections.
  10. Always design implementations with appropriate interfaces implemented.
  11. Avoid writing business logic , workflows and roles in the controllers.
  12. Always use DI (Dependency Injection) , IOC (Inversion of Control) .
  13. Avoid rendering HTML at server side.
  14. Avoid using SOAP protocol in services.
  15. Avoid design REST endpoints to encapsulate business logic.
  16. Avoid depending on complex infrastructures like IIS.
  17. Prepare to use .NET CORE Runtime to build applications.
  18. Avoid using Cookies.
  19. Avoid using server side sessions especially in-memory sessions. Instead use distributed sessions.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s