Ruby Source

6 Comments

DDD for Rails Developers. Part 3: Aggregates.

This entry is part 2 of 3 in the series DDD for Rails Developers

My Previous Articles About DDD for Rails Developers In Part 1, I talked about using the layered architecture for tackling domain complexity. I showed a few typical violations of the layered architecture and gave some advice on how to fix them. In Part 2, I started talking about the building blocks of Domain Driven Design.…

Continue Reading…
9 Comments

Rails: User/Password Authentication from Scratch, Part I

Tutorial_preview

(Note: Source code accompanying this article can be found here.) Today we’re going to learn how to implement simple user authentication in a Rails application from scratch. We’ll examine best practices to help avoid common, often costly, mistakes. Introduction to User Authentication Password-protected actions are a common feature in most web applications, only allowing registered…

Continue Reading…
4 Comments

Hitchhiker’s Guide to Metaprogramming: Class/Module Hooks

shutterstock_75615193

Rule one to metaprogramming: Don’t Panic! Like many others, I have struggled with the term metaprogramming. For the purposes of this article I’ll be going broad with my working definition of metaprogramming to include: Any code that significantly raises the level of abstraction and/or any code that creates code. -Me This definition is wildly oversimplified.…

Continue Reading…