In each of the lessons, we will develop a set of fairly complex features in a Web application. Follow per-lesson instructions to complete each stage in the workshop.
These are the tools and libraries required to run the demos:
- .NET SDK 7.0 or later - downloaded from https://dotnet.microsoft.com/en-us/download/dotnet,
- An appropriate IDE, such as Visual Studio Code or Visual Studio (any edition, including Community),
- SQL Server support - all demos include connection string to a LocalDB database; support for LocalDB is installed as part of SQL Server Express; any other SQL Server edition would suffice, but with additional requirement that the attendee would need to manage the connection string,
- SQL Server Management Studio or any other tool to easily browse and query the database, including tools and extensions built into the IDE
- Git client, any
Each lesson is prepared on a separate Git branch. For example, to run the lesson on branching and looping, checkout the branch named lesson-branching-and-looping
:
git checkout lesson-branching-and-looping
Any lesson branch contains the starting code of the demonstration. Before running the initial demo, make sure to recreate the database:
cd .\Source\
dotnet ef database drop -f --project .\Bookstore\
dotnet ef database update --project .\Bookstore\
It is advisable to use watch run
to keep the application running during the whole development:
dotnet watch run --project .\Bookstore\
This workshop consists of the following lessons:
- Understanding emergent objects - implementing a feature with use of interconnected, cooperating objects.
- Avoiding branching and looping - implementing a series of features in such way that branching and looping constructs are replaced by polymorphic calls and delegation.
- Applying the map-reduce design - putting stress on sequences of objects and the ways we can process them.
- Specifications and strategies - applying specifications to query the database and strategies to transform and process objects.
- Using value objects - using value objects, records and record structs to simplify the domain code.
- Modeling optional objects - design a monad which represents an object that may or may not exist.