-
Notifications
You must be signed in to change notification settings - Fork 46
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
Support dependency-free API #65
Comments
Proposed design here: #59 (comment) |
#66 seems particularly relevant to this. |
I think the best way to proceed with this might be to extract a namespace (either as a project within this repository, or as a distinct repository + nuget package) and to then evolve the existing code to call through to the underlying dependency-free version. At the moment the namespace seems to be split e.g. How about extracting the logic of In order to retain backwards compatibility with existing users of |
+1 to the namespace split, but I'm not sure I agree with the namespaces themselves. I'm also wary to the idea of separating things into several repositories, as that makes maintenance of the different components harder. Although I think I'm also not a fan of And while we're speaking of naming, perhaps the word Thoughts? |
I agree with all of your sentiments, but I was trying to stick to the principle of evolving the package forward, rather than doing rewrites (which to me implies breaking changes). What I'd like to see is a way for us to pull the dependency-free parts out of the existing code without breaking the interface established by the package at present. Once we are happy with the new dependency-free logic, we can then introduce a more sane naming standard in parallel to the existing one, and then finally deprecate the existing one over time. So, like this:
|
Ok, thanks for clarifying. 💯 to your proposed plan. |
I have a crazy idea for a dependency-free internal JSON representation that's trivially compatible with |
thanks @sblom i'm very much looking forward to us achieving this (via your idea or any other). I've been chomping at the bit to do this myself but stopped when I saw the state of the tests, public API and code generally. So, I'm tackling those first and will come back to this when we have a solid foundation. Interested to see your ideas. |
Just wanted to ping this issue--I'm still working on this. I have an 80% complete prototype with an approach that I'm 95% happy with, but there are definitely some bumps that I'll want to chat through with y'all. In the meanwhile, here's a very quick overview of the approach. OverviewNothing fancy happens in the algorithm implementations that strictly requires anything more than My approach is to generalize the design of Internally, we will operate on One reason I'm motivated to find some interface other than simply I figure we can give consuming developers interfaces that let them keep a |
I like the sound of that, @sblom! 👍 to |
For my part I think we should use a simple I'm nervous about the The existing interface is to my mind quite bloated already (https://user-images.githubusercontent.com/910448/94048322-3f469480-fdcb-11ea-9fb1-b9582a25224e.png). Things like For this library to be competitive, I think we need to make the core library as lean as humanly possible, and then wrap adapters around it, rather than adding types into the core. |
Definitely on board with supporting fewer public types. TBH, I don't know what real use cases of this library look like well enough to have an intuition for what types we SHOULD support. Do we know any real usage (other than nuget.org) that we can use to guide us here? I'm sure we don't want to require our users to completely de-/re-serialize potentially large documents into some intermediate format that we dictate if they already have data in a JSON DOM of a supportable flavor lying around. That's many megabytes and also many hundreds of milliseconds. Speaking from personal experience, nuget.org would have resisted this library if it cost too many megabytes or milliseconds, and it seems we generally want server developers to feel like we meet their data where it already stands. My prototype now has almost all of the conformance tests passing with (I don't expect anyone to be wholly persuaded of anything until you can put your hands on my prototype, and I know y'all don't know me well enough to trust me when I say "this is shaping up pretty well", but it is. ;) ) IMHO, we should continue to internally use Also, I have a design for good package-based support for wrapping/unwrapping into |
@tpluscode, aren't you using jsonld.net? Can you provide some assistance to understand the requirements from a consuming application? |
I think your design idea and mine are heading in two rather different directions @sblom . I suggest that I stop my work if you are going ahead. FWIW, I am a real-life user using this library in production applications. |
@goofballLogic It's definitely premature to put all our chips on my not-quite-finished proof-of-concept. I promise I'm not trying to steal your wind--I just have an idea I'm excited about for which I'm building a demo. Once we can look at my code, we can compare and contrast its ergonomics and performance with a strings-everywhere approach. We'll probably find some downsides in addition to the upsides, and I don't claim to represent any perspective other than my own in the trade-offs discussion that we'll need to have. |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
The current API requires the use of Newtonsoft.Json in order to pass data into and out of the API. It would be good to provide a dependency-free core implementation (acting on either strings or simple objects), but also provide a drop-in version of the package which supports the existing Newtonsoft.Json signature.
The text was updated successfully, but these errors were encountered: