sanc.pec's Avatar, Join Date: Jan 2009
Newbie Member
Hi shabir,
I cannot change any implementations in the existing classes [as i already said they are in LIVE !!].
The scenario for me is like this..

OBJECT1
ATTR1
ATTR2
LIST<OBJECT2> [it may also have list of objects like this]

OBJECT2
ATTR3
ATTR4

I need a generic class called
OBJECT3
Where it should have only attributes of OBJECT1 , when i initialise OBJECT3 with some requirments. I can just go with Fatory creation pattern, but the problem is how to create this object automatically and how to make my code to access only ATTR1 & ATTR2 & List<OBJECT2> when i need my OBJECT3 to act as OBJECT1.

Am i clear ?
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
As I can think you cannot apply it in the mid of something but yes you should not touch the existing code and so best form can be to use some creational pattern to create the needed object and give the object to the accessible methods.
shae marks's Avatar, Join Date: May 2009
Newbie Member
An element of a page, for instance a title, is shown as it would normally appear viewing the page without admin rights. However, once the logged in user has his mouse over the element, its background color is highlighted and a tooltip is shown prompting the user to click the element to edit it. Once the user clicks the element, it is transformed into an input field (text, dropdown, etc.) as well as a save button and a cancel button. Often, the input field matches the styling of the original element. So that if the original element was a header written in size 20pt, the size of the font in the input field would also be 20pt. This styling is made to ensure that the user can connect the original element with the new replaced editable element.
The user can then edit the value of the input field (which is the same as the original elements value) and click save or cancel. If ‘save’ is clicked, the value is saved through and AJAX call to the underlying database, and the view of the element is changed back to the original (for instance the header without the edit input field), but now with the new value. If cancel is clicked, the view element is changed back to the original without any changes that might have been written in the edit input field.
This pattern is often combined with an the AJAX technique, which is an asynchronous call to the server through javascript, that does not require a refresh of the page. There are many javascript libraries out there, that delivers ready-to-use inplace editors.
Rationale

An in-place editor provides an easy way to let the user edit parts of a page without having to be redirected to an edit page. Instead, the user can just click around on a page an edit the elements he or she wishes to change – without reloading the page.
The pattern is often associated with web 2.0 websites.
shobhaaradhya's Avatar, Join Date: Jun 2009
Newbie Member
Hi Shabbir,

Excellent article. I found the article very usefull. I was struggling to understand the design pattern concepts. You have explained in a simple and understandable way also with examples.

Thanks a lot.

Regards,
Shobha
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
The pleasure is all mine.
binclintonusa's Avatar, Join Date: Jun 2009
Newbie Member
Thank you very much for the lesson. I knew that I can do this in better way.
WaibelRD's Avatar
Newbie Member
Outstanding!

I think I have been doing this for years but never realized there were "names" and "functionality" associated with what I was doing.

Great Job and THANK YOU!

Rob Waibel
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Thats the beauty of Design Pattern and we use them more often without actually knowing them
tsnany115's Avatar, Join Date: Sep 2009
Newbie Member
Hi all, I am a new member of forum
praba_expert's Avatar, Join Date: Sep 2009
Newbie Member
good work shabbir