dotnet / wcf

This repo contains the client-oriented WCF libraries that enable applications built on .NET Core to communicate with WCF services.
MIT License
1.72k stars 558 forks source link

Roadmap of SyndicationFeed #2098

Closed zhenlan closed 6 years ago

zhenlan commented 7 years ago

SyndicationFeed on .NET Core

While we are making System.ServiceModel.Syndication available on .NET Core, we are also looking into improvements in following areas.

A new syndication feed

While we are improving on the existing SyndicationFeed, which gives users best compatibility for porting existing code from .NET Framework to .NET Core, we are investing in a new syndication feed reader/writer, which is expected to suit better for modern programming when users are writing new code.

Feedback

Both the improved SyndicationFeed and the new syndication feed reader/writer will be built on .NET Standard so they can be used anywhere .NET Standard is supported (yes, you can even use them on full .NET Framework). Both projects are still working in progress, but we'd love to hear what you think as your feedback is crucial for us to make it right for you.

RehanSaeed commented 7 years ago

jsonfeed.org has sprung into existence since I raised the original issue https://github.com/dotnet/wcf/issues/76. It would be nice to be able to support that too, since Atom and RSS are a decade old format with a lot of problems and undefined behaviour.

dodyg commented 7 years ago

jsonfeed is too new to be supported. There are so many attempts to JSONify syndication format and so far nothing catches on.

dodyg commented 7 years ago

The new feed reader/writer will have graceful error handling, extensibility model and other improvements we have been doing for the existing SyndicationFeed

What is the model in handling namespaced extensions?

Will the new library (Microsoft.SyndicationFeed) helps with format detection?

RehanSaeed commented 7 years ago

@dodyg It's the chicken and egg problem, if frameworks don't support it, it won't get popular and frameworks won't support it. According to Google Trends, jsonfeed.org is on par with Atom feeds in terms of interest.

Agreed that it might be too soon but @zhenlan's post mentions extensibility, a pluggable architecture so we could add a reader/writer for JSON should be considered.

zhenlan commented 7 years ago

I hope this example will show some ideas of the extensibility model of the new syndication feed reader. Every time reader.Read() is called it will return the next syndication element. If it is a "known" element type, you can use one of built-in parsers; otherwise, it can be parsed as ISyndicationContent, which will contain raw Xml content among other things. Users can also pass in their own implementation of ISyndicationFeedFormatter when instantiating the reader for custom parsing.

Current implementation of syndication reader and formatter are built on XmlReader. To read JSON, however, I think it's possible for someone to implement ISyndicationFeedReader and ISyndicationFeedFormatter based on a "JsonReader". It does not have to be implemented by the "framework", but it will good for the framework to provide proper foundation.

What is the model in handling namespaced extensions?

This is an interesting question. Current design probably needs more work for this. @dodyg do you have any more specific example in mind? @drago-draganov do you have any thoughts about this?

dodyg commented 7 years ago

I bet there are plenty more used internally.

zhenlan commented 7 years ago

@dodyg thanks for the examples. We will look into them.

dodyg commented 7 years ago

I hope it can be supported as the extension mechanism for RSS and ATOM is the same. For enterprise development I have seen people writing a custom RSS parser just to process extensions.

More:

lviana1 commented 7 years ago

You mention there will be default parsers for RSS and Atom feeds, but you don't specify which versions. There are multiple versions in use out there, with the important ones being: RSS 1.0 (RDF), RSS 2.0, Atom 0.3, and Atom 1.0. Ideally there would be support for all of these. Support for JSON Feed is also a good idea, IMO.

As for namespace extensions, here's a directory of different ones: http://www.feedforall.com/directory-namespace.htm. The big ones are really: iTunes, Media RSS, Dublin Core, and Content. Ideally there would be support for these as well.

I'm glad to hear that there will be a more forgiven date parser. There are many feeds out there with nonconforming dates and other fields. A less strict parser that allows the raw data to be extracted would make this library significantly more useful.

zhenlan commented 7 years ago

@lviana1 thanks for the question and additional information. Our plan is to support RSS 2.0 and Atom 1.0.

I am excited to announce that we just released a preview of Microsoft.SyndicationFeed on nuget.org. Here is a bit instructions and examples to get you started. We are eager to hear your feedback. Please let us know how it works for you.

RehanSaeed commented 7 years ago

An Atom feed writer does not currently exist in the new API. Someone has raised https://github.com/dotnet/wcf/issues/2169 to address this issue. Any guestimates for when one might be built?

drago-draganov commented 7 years ago

@RehanSaeed We are actively working on an Atom feed writer. I'm expecting the code to be available in the next week. It will be included with the next release of the NuGet package. There are some logistics that we have to take care, but I'm not expecting significant delays of it.

drago-draganov commented 7 years ago

Atom feed writer was added with #2250

RehanSaeed commented 7 years ago

Any plans to update the NuGet package with the Atom feed writer and also give it a strong name?

drago-draganov commented 7 years ago

@RehanSaeed An update of the NuGet packages is in progress. I mentioned some logistics, thus can't be very explicit about ETA at the moment. We are also considering stepping out of the preview and issue an official 1.0 version. I will update the thread next week with more details on the ETA.

drago-draganov commented 7 years ago

Here is a quick update plan for the next week

drago-draganov commented 7 years ago

Microsoft.SyndicationFeed.ReaderWriter 1.0 is now live. Release notes.

Please refer to the new repository for continuing development and discussion regarding Microsoft.SyndicationFeed.ReaderWriter.

DFsharp commented 6 years ago

Is System.ServiceModel.Syndication still in the backlog?

zhenlan commented 6 years ago

@DFsharp, System.ServiceModel.Syndication has a prerelease about a month ago. This release should have high compatibility with the Syndication libraries in full framework. We are working in progress on the improvement of parsing and optional items mentioned in the road map above. https://www.nuget.org/packages/System.ServiceModel.Syndication/

We also moved its source code to corefx repo. If you run into any issue, please open issues on corefx repo. https://github.com/dotnet/corefx/tree/master/src/System.ServiceModel.Syndication

zhenlan commented 6 years ago

Closing this issue. Here is just a quick summary of the two syndication related libraries we released. Please see the first comment of this thread for their difference.

  1. System.ServiceModel.Syndication Source: https://github.com/dotnet/corefx/tree/master/src/System.ServiceModel.Syndication NuGet package: https://www.nuget.org/packages/System.ServiceModel.Syndication/

  2. Microsoft.SyndicationFeed.ReaderWriter Source: https://github.com/dotnet/SyndicationFeedReaderWriter NuGet package: https://www.nuget.org/packages/Microsoft.SyndicationFeed.ReaderWriter/

oliverw commented 1 year ago

Closing this issue. Here is just a quick summary of the two syndication related libraries we released. Please see the first comment of this thread for their difference.

  1. System.ServiceModel.Syndication Source: https://github.com/dotnet/corefx/tree/master/src/System.ServiceModel.Syndication NuGet package: https://www.nuget.org/packages/System.ServiceModel.Syndication/
  2. Microsoft.SyndicationFeed.ReaderWriter Source: https://github.com/dotnet/SyndicationFeedReaderWriter NuGet package: https://www.nuget.org/packages/Microsoft.SyndicationFeed.ReaderWriter/

And both are dead.