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

dotnet new templates for EventFlow #806

Open
wants to merge 5 commits into
base: develop
from
Open

Conversation

@ibebbs
Copy link

@ibebbs ibebbs commented Nov 11, 2020

dotnet new templates for EventFlow

I thought some dotnet new templates for EventFlow would be more beneficial than additional examples as it'll significantly lower the barrier to entry for getting started with this fantastic project.

This PR contains a new top level project EventFlow.TemplatePack which, when packed, published and installed using "dotnet new --install EventFlow.Templates", presents the following new project templates:

Templates                                Short Name               Language          Tags
-----------------------------------      -------------------      ------------      ----------------------
EventFlow Console Application Te...      eventflowapp             [C#]              Console
EventFlow Library Template               eventflowlibrary         [C#]              Library
EventFlow WebApp Application Tem...      eventflowwebapp          [C#]              Web/WebApi

Each template takes an --entity parameter meant to represent the entity being modelled.

EventFlow Library Template

dotnet new eventflowlibrary -n Ordering --entity Order

Creates a new netstandard 2.0 Ordering project containing an Order aggregate root, OrderId identity and OrderState aggregate state, fully wired with sample Increment and Decrement commands/handlers/events.

EventFlow Console Application Template

mkdir Ordering
cd Ordering
dotnet new eventflowapp --entity Order

Creates a new Ordering solution containing two projects; "Ordering" and "Ordering.Domain". "Ordering.Domain" is a netstandard2.0 library with the same content as the EventFlow Library Template. "Ordering" is a netcoreapp 3.1 console application which receives key presses from the console and emits commands to / performs queries on, the Ordering.Domain.

EventFlow WebApp Application Template

mkdir Ordering
cd Ordering
dotnet new eventflowwebapp --entity Order

Creates a new Ordering solution containing two projects; "Ordering" and "Ordering.Domain". "Ordering.Domain" is a netstandard2.0 library with the same content as the EventFlow Library Template. "Ordering" is a netcoreapp 3.1 web application containing an 'Order' controller which provides POST/GET endpoints to emit commands to / performs queries on, the Ordering.Domain.

TODO

  1. Build process
    I wasn't able to run the automated build. I believe the EventFlow.TemplatePack project should be built and packed correctly but this needs to be confirmed

Comments

If you feel this PR is missing anything or would like additional templates just let me know.

Cheers,
Ian

@CLAassistant
Copy link

@CLAassistant CLAassistant commented Nov 11, 2020

CLA assistant check
All committers have signed the CLA.

@ibebbs
Copy link
Author

@ibebbs ibebbs commented Nov 12, 2020

It seems the AppVeyor build is failing due to missing license headers on the file.

Before I spend the time adding these headers, is there any interest in this PR?

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.