Architecture

Having a right architecture is itself an initial battle won. Architecture needs to be flexible enough to accommodate futures changes without the code smell.

We strictly follow SOLID principles to its core and make sure we design a loosely coupled architecture, which can be extended as it progresses. All the cross cuttings concern e.g. Logging and Caching are implemented using AOP to make its pure plug and play.

Architecture/Design used should have following qualities

  1. Use SOLID principles across the project.
  2. Don’t overengineer the code e.g. Don’t build for things you don’t need now.
  3. Must have scope for common practices e.g. dependency injection to make unit testing easier and make your application loosely coupled.
  4. Proper Logging, Log Analysis mechanism has to be in place.
  5. The proper caching mechanism has to be there and should never depend on a specific provider.
  6. Avoid using global variables in your methods, as it makes your unit testing much harder.
  7.  Check for the cyclomatic complexity of your code.
  8. Use proper code comments and generate documentation from that.
  9. Do not use your database classes as DTO objects as it makes it harder to accommodate any changes at a later stage and also shows implementation details to the consumer.
  10. Always support versioning of your API layer to accommodate future changes.
  11. Always use proper HTTP error codes to communicate, Don’t send everything as 500.
  12.  Mobile apps should be built to use different config per environment.
  13. Always set up CI/CD pipelines for even the smallest of projects.
  14. Use DI framework e.g. Dagger2 and SWInject for your mobile apps.
  15. Use UI Tests to ensure your application runs smoothly across devices.