I've seen design patterns for class factories that work well to create
(fetch) objects, but I haven't seen anything about how to persist the class'
data when it has changed. Is this done thru the factory? What about
security? I'm assuming that the factory should enforce security.
Has anyone seen examples of this?
Thanks,
Craig Buchanan 5 1626
Can you give me an example of what you mean by persisting data when its
changed? As in notifying the underlying data storage? Or other objects
within the program that need to know when data is changed?
-CJ
"Craig Buchanan" <so*****@micros oft.com> wrote in message
news:uO******** ********@TK2MSF TNGP09.phx.gbl. .. I've seen design patterns for class factories that work well to create (fetch) objects, but I haven't seen anything about how to persist the
class' data when it has changed. Is this done thru the factory? What about security? I'm assuming that the factory should enforce security.
Has anyone seen examples of this?
Thanks,
Craig Buchanan
CJ-
Thanks for the reply.
I was referring to persisting data in the database. It doesn't seem like
the factory should be doing this, but I could be wrong. Currently, I use
the base object's (named ObjectInfo) Save method to persist information. I
have a blob field that contains a serialized collection of properties for
its decendant's properties
Here's what I want to do:
* Build a factory that will create a new ObjectInfo instance or an
instance of one of its decendants.
* The factory will return a collection of ObjectInfos that match given
criteria and the security clearance of the user.
Thoughts?
Craig
"CJ Taylor" <no****@blowgoa ts.com> wrote in message
news:10******** *****@corp.supe rnews.com... Can you give me an example of what you mean by persisting data when its changed? As in notifying the underlying data storage? Or other objects within the program that need to know when data is changed?
-CJ
"Craig Buchanan" <so*****@micros oft.com> wrote in message news:uO******** ********@TK2MSF TNGP09.phx.gbl. .. I've seen design patterns for class factories that work well to create (fetch) objects, but I haven't seen anything about how to persist the class' data when it has changed. Is this done thru the factory? What about security? I'm assuming that the factory should enforce security.
Has anyone seen examples of this?
Thanks,
Craig Buchanan
Craig,
That was going to be what I recommended was using the base object to do the
save. The factory isn't really responsible for that from what I remember
about the pattern, just the creation of the object with a common interface
(or base class) then the object itself took care of persistance, but that
was dealt with in the base class.
I suppose you could use the factory if you wanted to, but seems a little out
of the way you know? Unless you want the factory to deal with your BLOB
data.
But I don't know if thats necessarily needed.
HTH,
CJ
"Craig Buchanan" <so*****@micros oft.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. CJ-
Thanks for the reply.
I was referring to persisting data in the database. It doesn't seem like the factory should be doing this, but I could be wrong. Currently, I use the base object's (named ObjectInfo) Save method to persist information.
I have a blob field that contains a serialized collection of properties for its decendant's properties
Here's what I want to do: * Build a factory that will create a new ObjectInfo instance or an instance of one of its decendants. * The factory will return a collection of ObjectInfos that match given criteria and the security clearance of the user.
Thoughts?
Craig
"CJ Taylor" <no****@blowgoa ts.com> wrote in message news:10******** *****@corp.supe rnews.com... Can you give me an example of what you mean by persisting data when its changed? As in notifying the underlying data storage? Or other objects within the program that need to know when data is changed?
-CJ
"Craig Buchanan" <so*****@micros oft.com> wrote in message news:uO******** ********@TK2MSF TNGP09.phx.gbl. .. I've seen design patterns for class factories that work well to create (fetch) objects, but I haven't seen anything about how to persist the class' data when it has changed. Is this done thru the factory? What about security? I'm assuming that the factory should enforce security.
Has anyone seen examples of this?
Thanks,
Craig Buchanan
http://www.lhotka.net/ArticleIndex.a...ea=CSLA%20.NET
Check out Rocky's CSLA framework.
I am using it for a major project right now.
--
Joe Fallon
"Craig Buchanan" <so*****@micros oft.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. CJ-
Thanks for the reply.
I was referring to persisting data in the database. It doesn't seem like the factory should be doing this, but I could be wrong. Currently, I use the base object's (named ObjectInfo) Save method to persist information.
I have a blob field that contains a serialized collection of properties for its decendant's properties
Here's what I want to do: * Build a factory that will create a new ObjectInfo instance or an instance of one of its decendants. * The factory will return a collection of ObjectInfos that match given criteria and the security clearance of the user.
Thoughts?
Craig
"CJ Taylor" <no****@blowgoa ts.com> wrote in message news:10******** *****@corp.supe rnews.com... Can you give me an example of what you mean by persisting data when its changed? As in notifying the underlying data storage? Or other objects within the program that need to know when data is changed?
-CJ
"Craig Buchanan" <so*****@micros oft.com> wrote in message news:uO******** ********@TK2MSF TNGP09.phx.gbl. .. I've seen design patterns for class factories that work well to create (fetch) objects, but I haven't seen anything about how to persist the class' data when it has changed. Is this done thru the factory? What about security? I'm assuming that the factory should enforce security.
Has anyone seen examples of this?
Thanks,
Craig Buchanan
http://www.lhotka.net/ArticleIndex.a...ea=CSLA%20.NET
Check out Rocky's CSLA framework.
I am using it for a major project right now.
--
Joe Fallon
"Craig Buchanan" <so*****@micros oft.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. CJ-
Thanks for the reply.
I was referring to persisting data in the database. It doesn't seem like the factory should be doing this, but I could be wrong. Currently, I use the base object's (named ObjectInfo) Save method to persist information.
I have a blob field that contains a serialized collection of properties for its decendant's properties
Here's what I want to do: * Build a factory that will create a new ObjectInfo instance or an instance of one of its decendants. * The factory will return a collection of ObjectInfos that match given criteria and the security clearance of the user.
Thoughts?
Craig
"CJ Taylor" <no****@blowgoa ts.com> wrote in message news:10******** *****@corp.supe rnews.com... Can you give me an example of what you mean by persisting data when its changed? As in notifying the underlying data storage? Or other objects within the program that need to know when data is changed?
-CJ
"Craig Buchanan" <so*****@micros oft.com> wrote in message news:uO******** ********@TK2MSF TNGP09.phx.gbl. .. I've seen design patterns for class factories that work well to create (fetch) objects, but I haven't seen anything about how to persist the class' data when it has changed. Is this done thru the factory? What about security? I'm assuming that the factory should enforce security.
Has anyone seen examples of this?
Thanks,
Craig Buchanan
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Sebastien Degardin |
last post by:
Hello,
I need to use a Factory pattern to create services class.
i have an interface --> MyService
i can have an abstract class --> MyAbstractService
i have several concrete class for this service --> MyServiceVersion1_1
MyServiceVersion1_2.
I would like to create a factory which could instantiate object using
|
by: Medi Montaseri |
last post by:
Hi,
Given a collection of similar but not exact entities (or products)
Toyota, Ford, Buick, etc; I am contemplating using the Abstraction pattern
to provide a common interface to these products. So I shall have an
Abstract Base called 'Car' implemented by Toyota, Ford, and Buick.
Further I'd like to enable to client to say
Car *factory;
|
by: Simon |
last post by:
Hi.
I don't have a problem per se, I was just wondering if anyone can
offer some opinions about the best way to go about creating and
disposing of a Singleton class.
I have a class (handling DB connections) which I have defined as a
singleton, using the following pattern (VB.net code)
Private Shared mInstance As clsConnection = Nothing
|
by: Mark McDonald |
last post by:
This question kind of follows on from Mike Spass’ posting 10/11/2004; I don’t
understand why you can’t declare an implicit operator to convert a base class
to a derived class.
The text books say “neither the source nor the target types of a conversion
can be a base type of the other, since a conversion would then already
exist”. But this is not really true, whilst automatic (implicit) conversions
do occur from the derived...
|
by: Craig Buchanan |
last post by:
I've seen design patterns for class factories that work well to create
(fetch) objects, but I haven't seen anything about how to persist the class'
data when it has changed. Is this done thru the factory? What about
security? I'm assuming that the factory should enforce security.
Has anyone seen examples of this?
Thanks,
Craig Buchanan
| |
by: Jason MacKenzie |
last post by:
Is there a way to prevent classes from being instantiated by methods other
than my factory pattern?
I have a couple of classes and want to force the factory class to be used as
the "entry point".
Any help is appreciated,
Jason MacKenzie
|
by: deko |
last post by:
Which layer should a Factory class go in?
DA - Data Access
BL - Business Logic
UI - User Interface
??
|
by: Duy Lam |
last post by:
Hi everyone,
Sorry, I don't know what group to post this problem, I think may be this
group is suitable.
I'm styduing DAO (Data Access Object) pattern in this link
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html.
While I've read about implementing Data Access Objects by Factory Method
Pattern
(http://java.sun.com/blueprints/corej2eepatterns/Patterns/images09/figure09_07.gif)
and Abstract Factory Pattern...
|
by: digz |
last post by:
Hello,
Apologies if this is the wrong group for this question. I want to
design an interface , where for a custom functionality , the client
writes a new class with the function implementation and then puts the
name of the Class as a configuration parameter or something and then
the main program loads the new class like a module and the client can
now write code using the new Functions. I suppose this problem has
been solved before , if...
|
by: Steven D'Aprano |
last post by:
I have a class which is not intended to be instantiated. Instead of using
the class to creating an instance and then operate on it, I use the class
directly, with classmethods. Essentially, the class is used as a function
that keeps state from one call to the next.
The problem is that I don't know what to call such a thing! "Abstract
class" isn't right, because that implies that you should subclass the
class and then instantiate the...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look !
Part I. Meaning of...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |