Postsbest practices (27) object oriented design (7) testing (7) models (4) performance (4) views (4) gems (3) case studies (2) cloudflare (1) controllers (1) metaprogramming (1) migrations (1)Background processing for performance in RailsPerformance issues often stem from tasks ill-suited for real-time processing during normal web operations.Best Practices PerformanceRoland Lopez Roland Lopez12/05/2024 · 2 min readCreate your own helpers for views in railsKeep your HTML clean; any intensive Ruby code in views is likely misplaced. Inline Ruby in views often scales into maintenance nightmares.Best Practices Views TestingRoland Lopez Roland Lopez12/05/2024 · 2 min readViews are for presenting not accessingThe views layer should not manage domain logic, which belongs in models, or orchestrate application flow, which is a controller's responsibility.Best Practices ViewsRoland Lopez Roland Lopez12/05/2024 · 2 min readRails views helper best practicesKeep the view layer clean with helpers, partials, and built-in functionality effectively.Best Practices ViewsRoland Lopez Roland Lopez12/05/2024 · 1 min readRedesign your models for performance in railsYes, performance issues are mostly solved by better defining the problem to eliminate the existing complexity in the code.Best Practices PerformanceRoland Lopez Roland Lopez12/05/2024 · 3 min readRuby on Rails SQL Performance: Indexing for EfficiencyThe most common location of performance issues in the MVC framework is the database layer. The 80/20 Pareto law for slow queries.Best Practices PerformanceRoland Lopez Roland Lopez12/05/2024 · 4 min readRails orm performance best practicesActiveRecord simplifies database interactions, but misusing its API can lead to severe performance bottlenecks.Best Practices PerformanceRoland Lopez Roland Lopez09/05/2024 · 2 min readRails migration best practicesNever Modify the `up` Method on a Committed Migration. Never Use External Code in a Migration. Always Provide a `down` Method in MigrationsBest Practices MigrationsRoland Lopez Roland Lopez09/05/2024 · 2 min readTesting rake tasks in railsRake tasks operate outside the regular Rails environment, making it a challenge to test them in isolation.Best Practices TestingRoland Lopez Roland Lopez06/05/2024 · 2 min read