Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type-Parser/Owner collaboration? #76

Closed
drapostolos opened this issue May 7, 2014 · 3 comments
Closed

Type-Parser/Owner collaboration? #76

drapostolos opened this issue May 7, 2014 · 3 comments
Labels

Comments

@drapostolos
Copy link
Contributor

Hi

Would you be interested in any collaboration with the type-parser library (https://github.com/drapostolos/type-parser)?

I see the internals of owner has support for converting strings to java types (including Generic types). But this (excellent) functionality is not public and reusable by others. That is what the type-parser library does, makes this functionality reusable to anyone :)

Seems to be functionality/code duplication between the two libraries: owner and type-parser.

Would you be interested in integrating type-parser into owner, if type-parser is updated to fulfill the owner requirements, regarding parsing a string to a java type?

Regards,
Alexander Poulikakos

PS. I found owner library by following links from this SO question: http://stackoverflow.com/questions/13943550/how-to-convert-from-string-to-a-primitive-type-or-standard-java-wrapper-types/23456247#23456247

@lviggiano lviggiano modified the milestone: 1.0.6 May 8, 2014
@lviggiano
Copy link
Collaborator

Hi Alexander.

I had a quick look at your code, and seems very good, and well tested. What benefit would OWNER get by substituting the current conversion mechanism with yours?

I was planning to extend the type conversions already supported in OWNER, but recently my main job got all my free time out.

At the moment my schedule regarding new features listed in the Milestone 1.0.6, and I am finding hard time to get my hands on that code.

BTW, I find such library very useful, specially if you continue to add more types and extend its capabilities.

I need to evaluate carefully what are pros and cons of introducing dependencies to the OWNER project, since I find that not having external dependencies is an advantage: even jre dependencies sometimes are a pain: recently somebody found an issue using OWNER on android (#75), because Android is missing some of the JRE classes, and I still didn't had time to set up an android test to cover that. Also, OWNER requires JDK 1.5 or superior, not because I don't like new features, but because this makes owner fit into legacy projects.

In one of first releases I had introduced some dependencies to apache commons-* libs, then I saw that it was so easy to reimplement that with few lines of code, and the end-user would benefit of being free to use those libraries without risking version conflicts with dependency jars.

So, I will keep eyes on your project, eventually we can provide a mechanism to allow to plug your library into owner, so this would be an optional dependency.

You can also fork OWNER and integrate your library, or in alternative implement a some mechanism in OWNER to make the conversion system pluggable (we can discuss about this) and add the support your library.

I think this should be the way, but I'm open to your proposal or to your comments and evaluate all your ideas and feedbacks.

I really think your library is needed in many scenarios, so keep going and continue to improve it.

Thank you, let's keep up with each other progress.

L.

@drapostolos
Copy link
Contributor Author

Hi Luigi, Thanks for the response! :)

What benefit would OWNER get by substituting the current conversion mechanism with yours?

I'm not sure of the benefits at the moment, but plan to get back to you on that. One benefit is the support of Map for free.

I was planning to extend the type conversions already supported in OWNER,
but recently my main job got all my free time out.

In what way are you planning to extend type conversion in OWNER?

BTW, I find such library very useful, specially if you continue to add more types and
extend its capabilities.

I will. The conversion implementation in OWNER has inspired me to propose some changes in Type-Parser for more flexible support of other types. You can view the proposed changes here:

Also, OWNER requires JDK 1.5 or superior, not because I don't like new features,
but because this makes owner fit into legacy projects.

Type-Parser is in 1.6, but seems to work with OWNER, since no specific 1.6 functionality has been used.

You can also fork OWNER and integrate your library, or in alternative implement a some
mechanism in OWNER to make the conversion system pluggable (we can discuss about this)
and add the support your library.

I will start by forking the OWNER library and replace the current conversion mechanism with Type-Parser, just as a proof of concept that Type-Parser supports everything currently supported in OWNER. I.e. make all OWNER unit tests pass. After that we can start look into pluggable conversion mechanism.

Regards,
Alex

@drapostolos
Copy link
Contributor Author

A pull request has been made for this. See #83 for more discussions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants