[ 
https://issues.apache.org/jira/browse/XERCESC-2106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16092890#comment-16092890
 ] 

João Paulo Lemes Machado commented on XERCESC-2106:
---------------------------------------------------

Thanks for the reply Scott. In my work I'm trying to identify opportunities for 
code improvements and ways to make it simpler for maintenance activities. I 
identified some few others opportunities, could you point me to someone who 
could evaluate them? Even if they are not implemented these practices can be 
adopted for future implementations.

> Refactoring of CoreDocumentImpl
> -------------------------------
>
>                 Key: XERCESC-2106
>                 URL: https://issues.apache.org/jira/browse/XERCESC-2106
>             Project: Xerces-C++
>          Issue Type: Improvement
>          Components: DOM
>            Reporter: João Paulo Lemes Machado
>
> Hello everyone.
> I was analyzing the modularization of some classes, and I identified that the 
> class CoreDocumentImpl has an opportunity for cohesion improvement. 
> The class SAXParser was in the same situation and the problem was solved as 
> follows: The AbstractSAXParser class was created, and several get() and set() 
> methods that were used only to configure the class parameters were moved from 
> SAXParser to AbstractSAXParser. 
> The new class was then accessed through an instance variable in SAXParser. 
> This strategy has cleaned and improved SAXParser cohesion.
> With this in mind, I would recommend creating a new class: 
> CoreDocumentImplConfig , and moving the following methods:
> setXmlVersion
> setVersion
> getNodeName
> getXmlStandalone
> getStrictErrorChecking
> setStrictErrorChecking
> getElementsByTagName
> getNodeListCache
> getNodeNumber
> setUserData
> getStandalone
> getAsync
> getTextContent
> setEncoding
> getUserData
> getDoctype
> getMutationEvents
> getOwnerDocument
> getVersion
> getDocumentURI
> getIdentifiers
> getElementById
> getEncoding
> setAttrNode
> getXmlVersion
> setInputEncoding
> getNodeType
> getErrorChecking
> setDocumentURI
> getXmlEncoding
> getBaseURI
> setStandalone
> setXmlEncoding
> getDocumentElement
> getInputEncoding
> getIdentifier
> setAsync
> getElementsByTagNameNS
> setXmlStandalone
> setMutationEvents
> getImplementation
> getDomConfig
> setTextContent
> getUserDataRecord
> setUserDataTable
> setErrorChecking
> getFeature
> from the CoreDocumentImpl.
> Those parameters accessed by an instance variable in the CoreDocumentImpl.
> Moreover, the orthogonality is the design would be enhanced.
> What do you think about that?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to