Rails Antipatterns by Ihor Novak

  • 645 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
645
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
5
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Rails Antipatterns или Работа над ошибками
  • 2. - DRY- Conventions overconfiguration- REST
  • 3. - RTFM- KISS- Do not reinvent the wheel- Write tests
  • 4. git• Use small commits• Do not store dead code• Gemfile.lock, schema.rb in VCS
  • 5. Coding style rules• github.com/bbatsov/ruby-style-guide• github.com/bbatsov/rails-style-guide• Use ruby1.9 syntax if possible• Avoid =begin...=end comments
  • 6. Use ready solutions, Read API• Implement emails sending using ActionMailer• Sendgrid post event url• Sendgrid EventAPI, batch mode
  • 7. ActiveRecord• Implement eager loading (:include statement)• Use attr_accessible• Sanitize SQL-queries• accepts_nested_attributes_for
  • 8. CSS• Use assets pipeline• reset.css? – normalizer – modernizer – initializer• Avoid presentational classes
  • 9. js• Use assets pipeline• Avoid inline js• js-validation – SVARX
  • 10. Configuration• Initializers• Environments
  • 11. Testing• Rspec• FactoryGirl• Remarkable• Spork• Guard• Capybara• Jasmine
  • 12. Questions?