Post a Job  |   Ask a Question?   |   Already registered? login or register
sasikanth reddy
21/12/2016 03:23 PM

regarding to DesignPattern

Spam    16 Comments

21/12/2016 16:06:56
is any one clarify

23/12/2016 22:24:53

23/12/2016 22:25:28
if u want i will explain factory DP also

23/12/2016 22:55:54
hey Haribabu,Kothappalli can u explain Abstract DP and why we are taken system properties...

26/12/2016 17:40:58
hey hi hari babu correct me if i'm wrong : in above code which u wrote there how many Objects u r creating in SuperFactory u already creting the objects and then the remaning classes also creating the Objects i didn't understood u'r explanation can please check once..

26/12/2016 22:37:56
Dear Friend JXmlReader is java provided api. JFastXmlReaderImpl,JSunXmlReaderImpl are the sun and apachi provided Implementation classes. actually we dont know implementation class names of apachi or sun thats way sun provide one factory called JSunXmlFactory and Apachi provide ne factory called JFastXmlFactory, here problem is sun provide their one method for creation object and apachich factory class provide own method for creating object of impl class, thats way sun people provide one Abstract class called SuperFactory and one implementation method, so apachi factory class and sun factory class must extend their classes from SuperFactory and override one method public JXmlReader CreateFastFactory() ; and write one static method in superfactory called public static SuperFactory createFactory(String typeFactory) ; this method return factory object of apachi provide factory or sun provided factory based on the provideing info to parameter. then using factroy class call the method and get the object of implemetation class.. I thing u understood. other wice post your doubt

26/12/2016 22:46:59
thnaks Haribabu for a such nice explanation.....thanku so much

26/12/2016 22:49:15
Dear Piyush,i have a Same doubt Because with in jvm our jxmreader is a one application why we pass input to total jvm.and why we pass input to all the applications running in jvm?

26/12/2016 23:24:48

28/12/2016 17:01:13
Very Nicely u have explained the prg..Hari... pls clarify me...Why we need to write the createFastfactory() abstract method in SuperFactory... What is the advantange of it?Is it giving flexibility to change one impl class to another class only...

28/12/2016 17:28:58
it's not apcahe,not jboss.....if any vendor comes who want design their own product based on API, sun peoples has design like that they provide one super factory that's vendor responcebilty to must and should provide factory &implementation

29/12/2016 12:02:39

29/12/2016 16:48:24
Thankyou so much both of you.. Can any one tell me... What r the problems,we r archiving in Abstract Factory dP over factory DP. How our coding size reduced in Abstract Factory DP then Factory DP?

29/12/2016 22:28:21
Abstract Factory DP, Factory DP not meant for reducing the code size, this dp are used for creating the object of classes thats way this DP called as Creational DP. based on requirement we use suitable DP. You will get much clarity in DP class

29/12/2016 22:47:38

29/12/2016 22:48:09
note: make sure as coming to SaxParserFactory we just Writing SAXParserFactory factory = SAXParserFactory.newInstance(); we are not writing any imple vendor ,jdk 1.5 onwords sun has provided in xerses jar as by default in sys Properties

Languages :