Tag Archives: architecture

Functions as First-Class Objects

A lot of programming languages have functions as first-class objects (you can pass them around, execute them, etc.) Ruby has some sort of functionality like that (proc and functors and yield, oh my!), but there’s a simpler solution: the (albeit abusable) eval method. Continue reading

Posted in Development | Tagged , , | 4 Comments

Hello Rails! Autopsy – Smart MVC

Rails enforces separation of model, view, and controller code. Most tutorials encourage you to make a single controller per model. But there’s a smarter way you can use MVC–you can create one controller per user group. This gives you an easy, intuitive model of how users access your application, and provide all the logic per user-group in one location. Continue reading

Posted in Development | Tagged , , | Comments Off

Many-to-Many Recursive Relationship

What’s the best way of creating a many-to-many recursive relationship? The ideal situation is to create a model to represent that relationship. Any data that applies to that relationship, you can place in that model. In this post, we go through an example, end-to-end, to implement such a relationship. Continue reading

Posted in Development | Tagged , , | 1 Comment