473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Persistent objects

LC
Hi,

Anybody have a design pattern to implement persistent objects. I need to
persist my business objects. Something like this code examples:

//to create a new one
Document doc = new Document("my first document", DateTime.Now);
doc.Save();
....
//to open and edit an existing one
Document doc = new Document(DocumentId);
doc.Copies = 25;
doc.Save();
....
//maybe using lazy initialization when reading
Document doc = new Document(DocumentId);
Datetime authorBirthdate = doc.Author.Birthdate;

Thanks,
LC
Nov 16 '05 #1
2 3544
Check the book called "Patterns of Enterprise Application Architecture"
written by Martin Fowler. It is a great book. Another good book is ".NET
Patterns" (can't remember the author).

I personally use a set of patterns. I use a modified version of Mapper
(PEAA- book above) for persisting business objects, an Abstract Factory
(GOF) for creating mappers, and my factory is a Singleton (GOF) as well.

Fitim Skenderi

"LC" <lc****@terra.cl> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Hi,

Anybody have a design pattern to implement persistent objects. I need to
persist my business objects. Something like this code examples:

//to create a new one
Document doc = new Document("my first document", DateTime.Now);
doc.Save();
...
//to open and edit an existing one
Document doc = new Document(DocumentId);
doc.Copies = 25;
doc.Save();
...
//maybe using lazy initialization when reading
Document doc = new Document(DocumentId);
Datetime authorBirthdate = doc.Author.Birthdate;

Thanks,
LC

Nov 16 '05 #2
LC
Thanks Fitim.

LC
"Fitim Skenderi" <fi****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Check the book called "Patterns of Enterprise Application Architecture"
written by Martin Fowler. It is a great book. Another good book is ".NET
Patterns" (can't remember the author).

I personally use a set of patterns. I use a modified version of Mapper
(PEAA- book above) for persisting business objects, an Abstract Factory
(GOF) for creating mappers, and my factory is a Singleton (GOF) as well.

Fitim Skenderi

"LC" <lc****@terra.cl> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Hi,

Anybody have a design pattern to implement persistent objects. I need to
persist my business objects. Something like this code examples:

//to create a new one
Document doc = new Document("my first document", DateTime.Now);
doc.Save();
...
//to open and edit an existing one
Document doc = new Document(DocumentId);
doc.Copies = 25;
doc.Save();
...
//maybe using lazy initialization when reading
Document doc = new Document(DocumentId);
Datetime authorBirthdate = doc.Author.Birthdate;

Thanks,
LC


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Paul Rubin | last post by:
I've had this recurring half-baked desire for long enough that I thought I'd post about it, even though I don't have any concrete proposals and the whole idea is fraught with hazards. Basically...
0
by: obhayes | last post by:
Hi All, Im using classic ASP (3.0) and I have a web farm with 2 webservers (webserver A and webserver B, both windows server 2003). I do not want to store any client specific information on the...
1
by: brad | last post by:
Hi, Im using classic ASP (3.0) and I have a web farm with 2 webservers (webserver A and webserver B, both windows server 2003). I do not want to store any client specific information on the...
4
by: M?rio Amado Alves | last post by:
Will you help an outsider trying to trace the current state of persistent object technology? "I expect that there will be persistent object stores with STL-conforming interfaces fitting into the...
1
by: Matt | last post by:
Hi, I am a big fan of coding using business objects - even though it takes a little extra time over using datasets etc. I think it's worthwhile. However, I really get stuck when attempting to...
1
by: Eric Lindsay | last post by:
I am trying to understand the differences between and uses of persistent, default and alternate styles. I have read http://www.w3.org/TR/REC-html40/present/styles.html section 14.3.2 on...
3
by: sanchita | last post by:
Hello everyone, I didn't get any response in "Security" forum hence posting here again. I am having problem with persistent cookies. Even after setting "CreatePersistentCookie" to true in...
9
by: mel | last post by:
Hi all, I need a persistent TCP connection with my web server over page reloads. This means that, even if the user goes to a different page (in my domain), I want to keep a TCP connection...
4
by: castironpi | last post by:
Some time ago, I was asking about the feasibility of a persistent deque, a double-ended queue. It runs into the typical space allocation problems. If you're storing a pickle, you have to...
12
by: raylopez99 | last post by:
I have an array that I wish to preserve as "read only". The array holds references to variables myObjects instantiated by new that change all the time. The variables are part of a class that I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.