Golden Master Testing: Refactoring for Understanding
Propono: Pub/Sub for Ruby
Rake: Automate All the Things
Drawing with Processing and Ruby
Golden Master Testing: Refactor Complicated Views
Choosing the Right Serialization Format
Effective Rails Development with Vim
Asynchronous File Uploads in Rails
How to Migrate Oracle Data With Ruby
Elegant Network Communication with RabbitMQ
Agent: Go-Like Concurrency in Ruby
Deploy Rails with Capistrano 3
Forem - A Rails Forum Engine
ZeroMQ with Ruby
Case Study: Upgrade to Rails 4.1
Digging with TracePoint
Sprockets Dissected: Rack and Middleware
In a previous article I explain how asset tags are inserted into HTML by Rails and Sprockets. Inserting asset tags into the HTML is the first step towards serving assets. In this post, I continue the journey, answering the remaining questions:
- What is
/assetsand it's purpose?
- What is
ActionDispatch::Staticmiddleware used for?
Sprockets Dissected: Asset Tags
Crafting Ruby for Performance
ORM in Ruby: An Introduction
Anyone with experience in developing web based applications or using a web framework has dealt with relational databases, such as MySQL or PostgreSQL. Dealing with SQL can be a bit scary at times, especially when dealing with data across different tables and applying various filters.
This is where ORM comes to the rescue.
What is ORM ?
ORM is the acronym for Object Relational Mapping.
Object-relational mapping (ORM, O/RM, and O/R mapping) in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language. There are both free and commercial packages available that perform object-relational mapping, although some programmers opt to create their own ORM tools. -- Wikipedia
In other words, an ORM framework is written in an object oriented language (like Ruby, Python, PHP etc.) and wrapped around a relational database. The object classes are mapped to the data tables in the database and the object instances are mapped to rows in those tables.