Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


Follow @CodeOpinion

RESTful JSON: Adding Links to your APIs

There’s a new media type available, RESTful JSON, that was recently registered (Feb 1st 2018) with IANA.  It’s really the simplest possible media type to use in order to start adding links to your JSON APIs.  The new media type is application/vnd.restful+json  Adding Hyperlinks The simplicity here is that you can start using this media type with existing APIs to start adding links to your existing objects. JSON objects MAY include a url property to indicate a link to itself JSON objects MAY append _url to properties to indicate related links Example Here’s an existing payload of a e-commerce shopping cart.  It has one product… Read More »RESTful JSON: Adding Links to your APIs

State Driven UI in ASP.NET Core MVC

In most MVC applications when rending Razor Views, I think the tendency is to use the IUrHelperl.Action inside if anchor href or form action.  If you are using ASP.NET Core, maybe you are using tag helpers like anchor tag helper.  But there’s another option I don’t see very often, which is creating the relevant routes and define them in your ViewModel within in your controller action.   This can be really useful when you’re application’s available actions are driven by state. Razor Here’s a small example of a shopping cart.  The view model has a list of products that are in your… Read More »State Driven UI in ASP.NET Core MVC

EventStore for Orleans Grain Persistence

In my previous post, I used the JournaledGrain to create an Event Sourced grain.  This enabled us to raise events from within our grain which would be applied to our grain state.  Next up, which I’m covering in this post is how to use EventStore for Orleans Grain Persistence. This means when we raise events, they will also be persisted to EventStore.  When our grain is activated, we can re-hydrate it by retrieving prior events from an EventStore stream and re-running them in our Grain to get back to current state. Blog Post Series: Part 1 – Practical Orleans Part… Read More »EventStore for Orleans Grain Persistence