Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #5986

Deviating from "standard" active record concept?

From Victor Porton <porton@narod.ru>
Newsgroups comp.programming
Subject Deviating from "standard" active record concept?
Date 2015-11-26 21:51 +0200
Organization Aioe.org NNTP Server
Message-ID <n37nrd$koj$1@speranza.aioe.org> (permalink)

Show all headers | View raw


I was assigned to write a lightweight ORM in Perl. This includes writing an 
active record.

Classic active record pattern implies assignments to fields of a model and 
after this a save operation. What about using

model->save({Passport=>123456789, FullName=>"Ivan Grotter"})
(pseudocode)

instead (that it passing all parameters in one hash, instead of assigning 
one by one)?

I prefer my variant of active record because it a little simplifies Model 
class. What are other advantages and disadvantages of leaving classic active 
record and using my method?

-- 
Victor Porton - http://portonvictor.org

Back to comp.programming | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Deviating from "standard" active record concept? Victor Porton <porton@narod.ru> - 2015-11-26 21:51 +0200
  Re: Deviating from "standard" active record concept? Victor Porton <porton@narod.ru> - 2015-11-26 22:03 +0200
  Re: Deviating from "standard" active record concept? Julio Di Egidio <julio@diegidio.name> - 2015-11-26 13:26 -0800

csiph-web