dotnet-templates
dotnet-templates copied to clipboard
Expand samples / templates / reference apps
Overhang work from jet/equinox#55 and jet/equinox#56:
- [x] (I'm likely to work on this next as a backburner task) Add TodoBackend sample (think: https://github.com/panesofglass/TodoBackendFSharp, but on aspdotnetcore like https://github.com/ChristianAlexander/dotnetcore-todo-webapi/blob/master/src/TodoWebApi/Controllers/TodosController.cs so we can run it via https://www.todobackend.com/) - see jet/equinox#63
- [x] Merge
feature/inventorybranch ? (I've put anInventoryItem.fsonmasterwhich is a port of https://github.com/gregoryyoung/m-r/tree/master/SimpleCQRS). The associated GUI is showing its age and to be honest I don't see much point progressing in that direction given how it's kinda a contrived tech example. - [x] allows us to e.g. do a sample of serialization using Fleece instead of json.net, without loading that dependency, volume of code and conceptual complexity onto this repo (moved to https://github.com/jet/FsCodec/issues/6)
- [x] apply CQRS to Todo app - see #29
- [ ] Polish Web to make it more representative? i.e.
Cartdoes not have a controller, and there is no checkout. I don't personally have much interest or bandwidth to do it at present, although I believe there's a good opportunity to do a very nice minimal example of event sourcing which most people can relate to - [ ] Work with @mateusz-kula to do a simplified edition of Store, TodoBackend, which would be emitted from a generator to add:
- a GUI clickable way of running something on Equinox (i.e. the Web endpoint only has APIs; we can give instructions for postman and curl all we like, it won't feel the same to some folks)
- consumer driven contracts (stuff used in the genned app will be considered to be core API, even before we start aggressively versioning)
- allows us to cut corners for pedagogical reasons
- (i.e. SFL and Favorites both do some very fancy pants use of .NET non mutable data structures for perf reasons which are interesting and important, but would be better replaced with more compact immutable representations)
- can also demonstrate testing story as more direct example based tests
cc @voronoipotato @troykershaw Status/thinking update wrt the general space of examples and/or starter kit materials for Equinox as a whole:
- The
dotnet newtemplate includes a minimalAggregate.fsdemonstrating the basic Aggregate shape per the Programming Model - The TodoBackend impl in the
dotnet newtemplate (-toption) now includes a Todobackend impl, with a controller - An m-r port is presently in https://github.com/jet/equinox/blob/master/samples/Store/Domain/InventoryItem.fs, but that probably does not make sense to keep there
- Wiring to Fleece and other such things are best maintained as template(s)
- there's a handwavy plan to build a mini-Jet sample, seeded from https://github.com/jet/equinox/tree/master/samples/Store - this will potentially also be housed as a
dotnet newtemplate, likely in https://github.com/jet/dotnet-templates (at least initially). At some point in that trajectory (think years :frown:), sample domain-level unit tests that presently live in this repo might find a new home, but continue to be an important aspect of the overall integration testing of Equinox as a whole. Key aspects of new facilities such as jet/equinox#61 may make sense to integration test by apply them in a representative fashion in a relevant sample - the general idea of having batteries-included benchmarks continue to be a concern this repo should cover
Sorry for ghosting you like that. I recently started a F# group in my local area and now we're talking about getting ready for a conference so my amount of "being busy" has gone up a lot. I'll look into this on the weekend.
Not a problem, it's all good - simply delighted to have gotten your insightful feedback in the first place; you've helped plenty even if it remains a drive-by interaction forever ;)
Please don't feel under any pressure within any timeframe - especially when you're doing real hard (and absolutely important) work!
Quick update - the incoming summaryConsumer and projector templates in #29 includes deeper examples of projections and rudimentary CQRS extensions to the todo app (only supports CosmosDb for now, EventStore support would rely on impl of https://github.com/jet/propulsion/issues/8)
https://github.com/jet/dotnet-templates/pull/40 adds some sample aggregates (though once again, does not provide a front end or end-to-end app as yet...)