473,403 Members | 2,183 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,403 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 3547
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.