Whats new in version 3.0?
On request filtering
I’ve taken another look at filtering, which is a feature included from version 2. I’ve modified the inbuilt IFeedContentFilterer to allow Feed pages to filter items by category via querystring parameters. This has caused a breaking change (and helped me understand how abstractions can help stable API design).
The feature allows editors to set up single feeds and for those feeds to provide subsets of data by responding to Category names that are passed via a comma separated querystring value. e.g. www.mysite.com/feed?categories=Alloy,Blog,Technology.
The default FeedFilterer has also been modified so that a content item has to be a member of all categories (both querystring and editor set) to appear. Previously it had to be a member of just one category filter.
Editor set cache
Each feed page now includes a new property allowing an editor to cache the feed output for a given number of seconds. This is to help performance for those feed pages on sites with a large amount of content.
It’s on Nuget
The source code is available at https://github.com/markeverard/Chief2moro.SyndicationFeeds.
A package (currently v184.108.40.206) is available in the Episerver Nuget Feed – http://nuget.episerver.com/ – search for CHIEF2MORO.SyndicationFeeds
WebHooks are a way of connecting internet / cloud services together. They allow websites to communicate with each other via HTTP callbacks. Services can subscribe (via HTTP) to receive notifications from publishers about a specific event. Publishers, manage these subscriptions and then on each event push notifcations via an HTTP Post to each receiver, at an endpoint defined during subscription.
Microsoft have recently released a WebHook framework for ASP.NET that gives you a pattern for:
- Handling subscriptions from interested subscribers
- Sending subscriptions to publishers
- Sending published messages to subscribers
- Handling publisher messages from subscribed services (via Receivers)
Webhooks in EPiServer
What would an EPiServer implementation / usage of WebHooks look like?
- Publish content events to subscribers (system to system integration)
- Publish Form data inputs to external systems
- Publish / Subscribe to Catalog events and changes from integrated commerce systems (Stock control and pricing)
- Subscribe to events from external systems (Payments)
- Subscribe to external content events – Instagram / social
As part of a presentation I put together a simple solution demonstrating an EPiServer site with an Instagram receiver that provided a solution to the below user story.
“As a content editor, I want images that are uploaded on a social channel (Instagram) and tagged with ‘ascend15’ to be available in my content management system so I can use them on my awesome website”
The solution contained the following elements:
- A receiver accepting notifications from Instagram when a image with a tag of ‘ascend15’ was added (using the ASP.NET WebHook framework)
- A Dynamic Data Store implementation to store the number of notifications received
- A scheduled job: to request, download and import images into EPiServer as MediaData / IContent items
The solution and even the scenario was a little contrived, so I’m not going to show the code (though it you really want it just drop me a line). It did however work on the day, which when you’re trying a tech demo that relies on the cloud and external services and also your own code; is always nice
Another short, sharp blog post to note that a version of the CHIEF2MORO.ImageDataExtensions package which is compatible with EPiServer 9 is now available in the EPiServer Nuget Feed. Fellow EMVP Marija Jemuovic did all the hard work, and I got the easy part in blogging about it.
There not much more to say, so here is a space filler…..