Skip to content

Latest commit

 

History

History
144 lines (88 loc) · 4.45 KB

backend.md

File metadata and controls

144 lines (88 loc) · 4.45 KB

Back-end

  1. Technologies
  2. Preferred Gems
  3. Coding Conventions
  4. Test-Driven Development
  5. .gitignore
  6. Best Practices
  7. Deployment
  8. Load Balancing
  9. Load Testing
  10. Useful Links

Technologies

  • Ruby 2.2.x (latest stable)
  • Ruby On Rails 4.2.x (latest stable)
  • Ruby environment management: rvm

Development OS

We don’t use Windows as OS for development machines. We use latest Mac OS X or Ubuntu/Debian (long-term support releases are preferred).

IDE

HTTP Server

  • Use latest stable nginx

Database Server

Cloud Hosting Platform

Preferred Gems

Coding Conventions

Test-Driven Development

Useful gems:

.gitignore

Add the following lines to default Rails-generated .gitignore file:

.DS_Store
database.yml
secrets.yml
.idea

Best practices

Databases

  • Use ActiveRecord ORM (scopes, enums, where with conditions, order etc) instead of raw SQL queries
  • Design the database schema with Vertabelo
  • Keep your schema up-to-date with Rails ERD

Security

  • Avoid common security problems following Ruby on Rails Security Guide
  • Never store production data (logins, passwords etc) in source code repository
  • Keep config/database.yml and config/secrets.yml outside of the source code repository. Use shell environment variables instead. More info here

Code Analysis And Metrics

Here is a list of must-have gems:

  • Brakeman - A static analysis security vulnerability scanner for Ruby on Rails applications.
  • SimpleCov - Code Coverage tool for Ruby
  • RuboCop - A static code analyzer, based on the community Ruby style guide
  • rails_best_practices - Code metric tool for Rails projects
  • RailsRoady - UML diagram generation on models and controllers

These tools are to be run at the end of each development cycle (Iteration, Sprint, Milestone, Release)

Deployment

TBD

Load Testing

Load Balancing

Useful Links