pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Appddevvv (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIVOT-513) allow instance creation customization when reading WTKX files by creating an instance creation factory method inside the serializer class
Date Sun, 06 Jun 2010 20:36:55 GMT

    [ https://issues.apache.org/jira/browse/PIVOT-513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876083#action_12876083
] 

Appddevvv commented on PIVOT-513:
---------------------------------

The intent is to not have to call out to anything else. That's pretty much
the point of DI and the method of decoupling using these techniques. By
placing my creation&init protocol into a serializer subclass, the approach
applies to all objects that you want it to apply to and there is no
interface or other requirements on the objects that receive the service.
This makes it also less intrusive and less coupled. If you use Bindable you
then have to get all the resources that are already defined elsewhere into
the resource dictionary.

Besides my use case, the patch allows other pivot clients to define their
creation and initialization protocol regardless of whether Bindable is used
for those objects or not and allow for non-pivot specific initialization
needs. 

Its generally applicable and not specific only to my use-case. That's why I
recommended it as a patch versus just copying the serializer code into
another java file and maintaining it that way. It is for advanced use though
and is not something that every client would consider doing--in which case
the patch has no impact on them anyway.






> allow instance creation customization when reading WTKX files by creating an instance
creation factory method inside the serializer class
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-513
>                 URL: https://issues.apache.org/jira/browse/PIVOT-513
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>            Reporter: Appddevvv
>            Priority: Minor
>             Fix For: 1.6
>
>         Attachments: serializer.patch
>
>
> In order to allow instance creation customization, change the serialization class by:
> a) Creating a protected instance creation method in the WTKXSerializer class.
> b) Change a private constructor to protected.
> c) Allow the creation of custom serialization instances when recursing into the tree
by creating a protected serialization creation method.
> No client visible APIs are changed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message