19 April 2014

The Ruby Reflector

Topic

ORM

  Source Favicon
By Andrzej Krzywda of Andrzej on Software 10 months ago.
Email

Had we used raw SQL instead of an ORM we would have had the same issues. All projects are open to this style of bug. The correct thing to do is report, close them quickly and add tests to prevent them from happening again (which we do.)

I have completely no 'science' proof here, it's just based on my experience with hundreds of Rails projects. However, I disagree that all projects are open to this style of bug.

It's very typical to Rails projects.

The temptation …

andrzejonsoftware.blogspot.com Read
  Source Favicon
Email

Framework ( Rails/ iOS/Android/Gameboy Colour), programming language, database, ORM.

Links to any related projects (e.g.: Is this a Rails API that has corresponding iOS and Android clients?)

Links to online tools related to the application (e.g.: Links to the Basecamp project, a link to the dropbox where all the wireframes are stored, a link to the Pivotal Tracker project)

README: Getting Started

The "Getting Started" section outlines the process of getting …

thefrontiergroup.com.au Read
  Source Favicon
By Giles Bowkett of Giles Bowkett 1 year ago.
Email

…must first carefully look over the menu of options to order exactly what you want. I want this for my ORM, I want that for my template language, and let's finish it off with this routing library. Of course, you're going to have to know what you want, and you'll rarely have your horizon expanded if you always order the same thing, but there it is. It's a very popular way of consuming software.

Rails is not that. Rails is omakase. A team of chefs picked out the ingredients, …

gilesbowkett.blogspot.com Read
  Source Favicon
Email

Q: Would it work with the ORM layer of Doctrine, considering it would only work for one unit of work?

A: Yes, if you layer an ORM on top of the DAL, this makes it inconvenient to choose the degree of slave lag tolerance as I have shown. This is probably a good reason to redesign my prototype to use hints embedded in SQL comments, instead of instantiating different wrapper classes.

Q: Does storing the position in $_SESSION lead to local storage and limit scalabilty?

A: It depends how …

mysqlperformanceblog.com Read
  Source Favicon
By Todd Hoff of High Scalability 1 year ago.
Email

Joe Stump on Sprintly on the impact of reducing ORM overhead: On a primed cache, your @ sprintly experience should be 100x faster now. On an unprimed cache a mere 10-15x faster.

Not a lot of technological detail on Facebook's new Graph Search , but here's the broad story of how it came about. Facebook has a lot of structured data about people so search needed to take advantage of that. They started in 2011 deciding to build a unified search. A quick prototype …

highscalability.com Read
  Source Favicon
By Mike Perham of over 1 year ago.
Email

ActiveRecord has been a huge boon for web development in promoting conventions in databases. Every new company I joined we had to determine how to name tables, primary keys and indexes. Standardizing id, automatic timestamps, pluralizing nouns, all of it makes development easier and more friendly to developers who just want to build stuff, not worry about every mundane detail.

All is not wine and roses though, ActiveRecord suffers from a common ORM performance issue: the N+1 query problem. …

mikeperham.com Read
  Source Favicon
By Matthew Bass of Matthew Bass over 1 year ago.
Email

…disappoint. The biggest idea I took away from his talk was to strive for clean separation between the ORM and business models. In other words, reduce coupling to the framework (e.g. ActiveRecord).

Jeffrey Baird gave a talk titled "Growing Your Own Developers: Hiring Programmers with Little to No Experience" [ slides ]. I really appreciated this talk since a big catalyst to pursuing programming as a career was an 8-month apprenticeship at RoleModel Software …

matthewbass.com Read
  Source Favicon
Email

…Most of the time, yes, you'll use FactoryGirl in conjunction with your favorite ORM to instantiate objects for testing Rails apps.

Want a simplistic stub? FactoryGirl.define do factory :tiny_stub, class: OpenStruct end

# >> user = FactoryGirl.build(:tiny_stub, admin?: true, name: 'John Doe') # => #<OpenStruct admin?=true, name="John Doe"> # >> user.admin? # => true # >> user.name # => "John Doe"

Let's go a …

robots.thoughtbot.com Read
  Source Favicon
By Klampaeckel of till's blog almost 2 years ago.
Email

…may or may not be totally up to date in terms of PHP etc.. The overall concept of an ORM never stuck with me.

Of course Doctrine has a DBAL too and it would be unfair to compare its ORM to another DBAL, but it seems like almost no one uses the Doctrine DBAL by itself. I haven't either.

The primary use-case for Doctrine seems to be ORM and here is what I think about it.

Little steps

RTFM is especially hard with Doctrine: Google usually points to older documentation, …

till.klampaeckel.de Read
  Source Favicon
By John Nunemaker of RailsTips by John Nunemaker almost 2 years ago.
Email

…hard. I think a lot of us are frustrated and feeling the pain of our chubby <insert your favorite ORM > classes. Something does not feel right. Working on them is hard.

The problem is context. You have to load a lot of context in your brain when you crack open that INFAMOUS user model. That context takes up the space where we would normally create and come up with new solutions.

Create More Classes

So what are we to do? Create more classes . Your models do not need to inherit from …

railstips.org Read