You should always prefer to create complex data structures over complex program logic. In fact, making complex data structures that are intelligent will eliminate the need for complex program logic. This will lead to a more robust system that’s easier to reason about and has less code to maintain.
Customers often come to us with a requirement that they need a CMS (Content Management System) to drive their website. When we explore this a bit more, we’re generally able to re-express this requirement such that the customer would like the ability for non-technical people to be able to manage content on their website.
Spree is a full featured e-commerce platform written for the Ruby on Rails framework. It is designed to make programming commerce applications easier by making several assumptions about what most developers needs to get started.
We’ve discussed using Concerns and Services to keep your ActiveRecords as healthy as they can be. These have dealt with repeated logic in models, and logic that could questionably be placed in either a controller or model. In the third and final part of this series we will be looking at presenters.
Continuing from my previous post, which introduced the idea of concerns to your models, in this post I will be discussing using services to keep your ActiveRecord’s responsibilities toned down.
In this post I’m going to talk about a software architecture pattern we use when we have a number of dynamic content types shared across multiple pages.
At Made we create web software that is built to last, so every aspect of the codebase has to be easy to understand and maintainable by any member of the team. Because of this we run our server side code through tools like Tailor and Cane to keep complexity low and consistency high.
Invoke cache sweeper through a rake task, which will loop over all the products in the database and expire the cache for each one. There is a fair amount of setup required for this to work. I will walk you through how to do this with a series of hacks.