-
SavePoint Pattern (18 messages)
- Posted by: Faisal Maqsood
- Posted on: October 31 2006 04:00 EST
There are two ways to use SavePoint pattern. 1. 'SavePointIndexBased' and 2. 'SavePointLabelBased' Both have different type of container inside it having capability to store different objects of its own at different stages wherever required by user for later ussage. You just need to extend your class with either 'SavePointIndexBased' or with 'SavePointLabelBased' and you can bookmark/save object's current state by calling respective 'savePoint' method. In order to retrieve the saved object, user need to call respective 'getSavedPoint' method. There is also facility to roll back the object with any of saved point. It can be done by calling respective 'rollBack' method. SavePointIndexBased: ===================== It has Vector container to store objects by index based. So that user can save object's states on different stages to get exact level of bookmarked object's state. SavePointLabelBased: ===================== It has Hashtable container to store objects by label based. So that user can label the save point for the later use to get exact labeled object's state. Both classes facilitate the user to store object in different stages for the save point. For example if you are managing some transaction and you are playing with some object. You will need to rollback in case of any failure and in such cases databases and drivers provide the facility and this class will provide you facility to do the same behaviour with your own java object.Threaded Messages (18)
- Re: SavePoint Pattern by Faisal Maqsood on October 31 2006 04:08 EST
- Re: SavePoint Pattern by Buland Altaf on November 08 2006 15:18 EST
- Re: SavePoint Pattern by Faisal Maqsood on November 14 2006 01:28 EST
- Re: SavePoint Pattern by Haroon Rashid on November 15 2006 08:55 EST
- Re: SavePoint Pattern by Buland Altaf on November 08 2006 15:18 EST
- Re: SavePoint Pattern by Francisco A Lozano on November 04 2006 05:32 EST
- Re: SavePoint Pattern by Haroon Rashid on November 08 2006 06:14 EST
- Re: SavePoint Pattern by Haroon Rashid on November 15 2006 08:56 EST
- Re: SavePoint Pattern by Jaco Boon on December 29 2006 03:44 EST
-
Re: SavePoint Pattern by James Watson on January 02 2007 10:32 EST
-
is some thing like this exist already by Haroon Rashid on January 03 2007 08:07 EST
-
Re: is some thing like this exist already by James Watson on January 03 2007 09:31 EST
-
Re: is some thing like this exist already by Gaston Coco on January 08 2007 05:57 EST
-
Re: is some thing like this exist already by James Watson on January 09 2007 10:19 EST
-
Re: is some thing like this exist already by Haroon Rashid on January 11 2007 03:50 EST
-
Re: is some thing like this exist already by James Watson on January 11 2007 09:55 EST
-
It's simply a memento by Sergey Nekipelyy on February 27 2007 03:40 EST
- Re: It's simply a memento by Francisco A Lozano on March 04 2007 04:16 EST
-
It's simply a memento by Sergey Nekipelyy on February 27 2007 03:40 EST
-
Re: is some thing like this exist already by James Watson on January 11 2007 09:55 EST
-
Re: is some thing like this exist already by Haroon Rashid on January 11 2007 03:50 EST
-
Re: is some thing like this exist already by James Watson on January 09 2007 10:19 EST
-
Re: is some thing like this exist already by Gaston Coco on January 08 2007 05:57 EST
-
Re: is some thing like this exist already by James Watson on January 03 2007 09:31 EST
-
is some thing like this exist already by Haroon Rashid on January 03 2007 08:07 EST
- How is it different from Memento pattern? by Rajesh Balamohan on January 08 2007 19:37 EST
-
Re: SavePoint Pattern[ Go to top ]
- Posted by: Faisal Maqsood
- Posted on: October 31 2006 04:08 EST
- in response to Faisal Maqsood
Kindly visit SavePointPattern.zip to download code for JAVA. -
Re: SavePoint Pattern[ Go to top ]
- Posted by: Buland Altaf
- Posted on: November 08 2006 15:18 EST
- in response to Faisal Maqsood
Hi - It seems like the url to grab teh code is not working. Can you plz send teh file at bulandaltaf_pk at yahoo dot com or just give teh working url from where I can get the file. -
Re: SavePoint Pattern[ Go to top ]
- Posted by: Faisal Maqsood
- Posted on: November 14 2006 01:28 EST
- in response to Buland Altaf
Kindly recheck, it is working fine now. -
Re: SavePoint Pattern[ Go to top ]
- Posted by: Haroon Rashid
- Posted on: November 15 2006 08:55 EST
- in response to Buland Altaf
link is working now for code of this pattern -
Re: SavePoint Pattern[ Go to top ]
- Posted by: Francisco A Lozano
- Posted on: November 04 2006 05:32 EST
- in response to Faisal Maqsood
Isn't this Memento? -
Re: SavePoint Pattern[ Go to top ]
- Posted by: Haroon Rashid
- Posted on: November 08 2006 06:14 EST
- in response to Francisco A Lozano
Its a New Pattren for Transaction Handling on middle and presentation Tier. -
Re: SavePoint Pattern[ Go to top ]
- Posted by: Haroon Rashid
- Posted on: November 15 2006 08:56 EST
- in response to Francisco A Lozano
its a new pattren. -
Re: SavePoint Pattern[ Go to top ]
- Posted by: Jaco Boon
- Posted on: December 29 2006 03:44 EST
- in response to Haroon Rashid
It's an implementation you can use to wrap and store objects in a collection. I would not call it a pattern. -
Re: SavePoint Pattern[ Go to top ]
- Posted by: James Watson
- Posted on: January 02 2007 10:32 EST
- in response to Haroon Rashid
its a new pattren.
No, it's not. It's not a new pattern either. -
is some thing like this exist already[ Go to top ]
- Posted by: Haroon Rashid
- Posted on: January 03 2007 08:07 EST
- in response to James Watson
article didnt mention that it is not based on collection but it will solve a problem by using some already existing collection. if you say its not a pattern then tell me is there any thing like that exist beforeits a new pattren.
No, it's not. It's not a new pattern either. -
Re: is some thing like this exist already[ Go to top ]
- Posted by: James Watson
- Posted on: January 03 2007 09:31 EST
- in response to Haroon Rashid
First of all, I don't see how this does anything the Memento pattern doesn't do, it's much more trivial. Whether it's for a tiered system or not is completely irrelevant. It's also just too obvious a solution to call it a pattern. It's just a solution that's been done a million times before. What do you believe is novel about this?its a new pattren.
No, it's not. It's not a new pattern either.
article didnt mention that it is not based on collection but it will solve a problem by using some already existing collection.
if you say its not a pattern then tell me is there any thing like that exist before -
Re: is some thing like this exist already[ Go to top ]
- Posted by: Gaston Coco
- Posted on: January 08 2007 17:57 EST
- in response to James Watson
What do you believe is novel about this?
Well I think the obvious response is...well right now it is called Pattern :) -
Re: is some thing like this exist already[ Go to top ]
- Posted by: James Watson
- Posted on: January 09 2007 10:19 EST
- in response to Gaston Coco
A pattern is not just an obvious solution. It's a solution that has been proven effective over time and generally isn't immediately obvious. You don't need a book or article to know how to do things that are obvious. Usually Pattens are derived from an obvious solution but refine it to minimize the issues that arise from the obvious approach or to make it more effective. Also, a pattern is a general approach. It's code targeted at a specific language. The Memento solves this same problem and details how to take this from the obvious solution to one that is more effective. If we are going to take every use of a Collection and call it a pattern, there would be a basically infinite number of patterns.What do you believe is novel about this?
Well I think the obvious response is...well right
now it is called Pattern :) -
Re: is some thing like this exist already[ Go to top ]
- Posted by: Haroon Rashid
- Posted on: January 11 2007 03:50 EST
- in response to James Watson
I know about the Momento Pattern but momento also based on list which is a collection. Momento address a little different domain of the problem then savepoint pattern. i think momento is a subset of savepoint pattern. collection are used as reuseable components in language and now a days collections are standrad in major languages savepoint give simple implentation using reuseable parts with more friendly problem solving approch. i think "sovling any problem with collection is not called pattern" i dont know this rule. is this a rule? :)What do you believe is novel about this?
Well I think the obvious response is...well right
now it is called Pattern :)
A pattern is not just an obvious solution. It's a solution that has been proven effective over time and generally isn't immediately obvious. You don't need a book or article to know how to do things that are obvious. Usually Pattens are derived from an obvious solution but refine it to minimize the issues that arise from the obvious approach or to make it more effective. Also, a pattern is a general approach. It's code targeted at a specific language.
The Memento solves this same problem and details how to take this from the obvious solution to one that is more effective.
If we are going to take every use of a Collection and call it a pattern, there would be a basically infinite number of patterns. -
Re: is some thing like this exist already[ Go to top ]
- Posted by: James Watson
- Posted on: January 11 2007 09:55 EST
- in response to Haroon Rashid
I know about the Momento Pattern but momento also based on list which is a collection.
It doesn't need to use a list but could.Momento address a little different domain of the problem then savepoint pattern.
Elaborate, please. What's different?i think momento is a subset of savepoint pattern.
How? If you want to think this is a new pattern, I can't stop you. But I don't think many other people will think it is and that makes it useless terminology. -
It's simply a memento[ Go to top ]
- Posted by: Sergey Nekipelyy
- Posted on: February 27 2007 03:40 EST
- in response to James Watson
I can't help but agree with James on this. It's just an implementation of the existing memento pattern. There is no reason to introduce another name to a pretty much the same thing. One of the goals that patterns aim at is to simplify communication between different people by giving names to common solution. You are doing an opposite thing - giving a different name to the same solution. -
Re: It's simply a memento[ Go to top ]
- Posted by: Francisco A Lozano
- Posted on: March 04 2007 16:16 EST
- in response to Sergey Nekipelyy
I can't help but agree with James on this. It's just an implementation of the existing memento pattern. There is no reason to introduce another name to a pretty much the same thing. One of the goals that patterns aim at is to simplify communication between different people by giving names to common solution. You are doing an opposite thing - giving a different name to the same solution.
I'm happy to see my concept of 'pattern' is not alone :) but I guess it's sexy to publish you've identified and formalised a new pattern... Better luck next time, Faisal -
How is it different from Memento pattern?[ Go to top ]
- Posted by: Rajesh Balamohan
- Posted on: January 08 2007 19:37 EST
- in response to Faisal Maqsood
May be sounds like a simpler version of Memento pattern.. :) ~Rajesh.B