Io e Andrea non siamo d'accordo...ma adesso ti faccio il "cappotto"!

Premessa: tutto è in tono assolutamente scherzoso! lo sai Andrea che ti voglio bbbbbbene...
E poi lo faccio per sfogarmi...con la Juve in B per un anno, ho dovuto subire le sue battutine per un anno...mo' mi vendico....:-)

Andrea estrae la frase dal pezzo di Fowler:
"The essence of a  Active Record  is of a  Domain Model  where the classes in the
Domain Model  match very closely with the record structure of an underlying database.
"

ma la riga successiva dice proprio:
"Each Active Record  is responsible to saving and loading to the database, and also
any domain logic that acts upon the data."
Oooo...prorprio subito sotto...:-)...fiiiico...SONO GIA' IN VANTAGGIO.

Poi ancora:
"The data structure of the  Active Record  should exactly match that of the database:
one field in the class for each column in the table.
"
PALLA BREAK.

E ancora:
"The Active Record class typically has the following method
1. construct an instance of the  Active Record from a SQL result set row
2. construct a new instance for later insertion into the table
3. static finder methods to wrap commonly used SQL queries and return Active Record  objects
4. methods to update the database and insert into the database with the data in the  Active Record

STO SERVENDO PER IL SET.

E ancora:
"It's often difficult to tell the difference between Active Record and Row Data Gateway when you are using a  Domain Model. You are using  Active Record  if your domain objects contain the SQL themselves to access the database, and you're using  Row Data Gateway  if a separate class does this."
GAME, SET, MATCH! (Cappotto. :-)

Linq to SQL non ha niente dell'Active Record (meno male).

Print | posted on lunedì 26 novembre 2007 17.29

Feedback

# re: Io e Andrea non siamo d'accordo...ma adesso ti faccio il "cappotto"!

left by Andrea Saltarello at 26/11/2007 17.35 Gravatar
Janky, tu e la parola "tipically" andate proprio poco d'accordo, eh? Meno male che tra poco arriva Marzullo e risolve la questione... <g>

# Re: Io e Andrea non siamo d'accordo...ma adesso ti faccio il "cappotto"!

left by Roberto Messora at 26/11/2007 17.35 Gravatar
non sarei andato a letto tranquillo stasera, ora va molto meglio

(bwhabwhabwha...)

;-)

saluti

# re: Io e Andrea non siamo d'accordo...ma adesso ti faccio il "cappotto"!

left by Giancarlo Sudano at 26/11/2007 17.44 Gravatar
Si che andiamo d'accordo...guarda questa construzione:
"tipically" riesco ad andare a letto prima di Marzullo!...

Solo che non è il valore che attribuisco a tipically che cambia le definizioni,
Ma soprattutto: "You are using Active Record if your domain objects contain the SQL themselves to access the database"...tipically non ce l'ha....
(fiuuuu meno male....)

# re: Io e Andrea non siamo d'accordo...ma adesso ti faccio il "cappotto"!

left by Lorenzo Barbieri at 26/11/2007 19.07 Gravatar
Ma discutere del sesso degli angeli no? O al massimo di sesso e basta... ma sta roba è di una noia mortale... :-D
Comments have been closed on this topic.