Skip to content
This repository has been archived by the owner on Oct 24, 2018. It is now read-only.

mauroservienti/CompositeQuestionnaire

Repository files navigation

Composite Questionnaire PoC

A microservices powered Questionnaire sample - Based on SOA Principles and messaging using NServiceBus.

This sample aims to demonstrate how to compose, and de-compose, data owned by different services in order to display data to end users and allow users to manipulate data.

The application allows to create a very basic questionnaire, where each question can have multiple answers, one of which can be marked as the correct answer.

Currently supported features:

  • Display list of questions
  • Create a new question (via composite PUT support)
  • Recovery from services failure at write time

Partially supported features:

  • Edit an existing question:
    • UI is complete
    • composite POST support is missing

Not (yet) supported features:

  • Delete questions
  • Multiple questionnaires
  • Reorder questions
  • Reorder answers
  • Ability to execute questionnaire and store results

How to get the sample working locally

Get a copy of this repository

Clone or download this repo locally on your machine. If you're downloading a zip copy of the repo please be sure the zip file is unblocked before decompressing it. In order to unblock the zip file:

  • Right-click on the downloaded copy
  • Choose Property
  • On the Property page tick the unblock checkbox
  • Press OK

Check your machine is correctly configured

In order to run the sample the following machine configuration is required:

Databases setup

Open an elevated command prompt, navigate to your copy of this repo, and run:

powershell -NoProfile -ExecutionPolicy unrestricted -File scripts\Setup-LocalDBInstance.ps1

When you no longer need to run the exercises, you may optionally run Teardown-LocalDBInstance.ps1.

Now connect to your LocalDB instance and run:

  • scripts\Setup-Databases.sql.
  • scripts\Create-Tables.sql

You can do this using either SQL Server Management Studio (if you already have it installed) or Visual Studio. If using Visual Studio:

  • Open scripts\Setup-Databases.sql
  • From the Visual Studio menus, select SQL -> Execute
  • Choose this instance: Local -> CompositeQuestionnaire
  • Click "Connect"
  • After the query has run, ensure that you see "Command(s) completed successfully."
  • Do the same for scripts\Create-Tables.sql

NServiceBus configuration

This sample has no NServiceBus related pre-requisites as it's configured to use the new Learning Transport and Learning Persistence explicitly designed for short term learning and experimentation purposes.

They should also not be used for longer-term development, i.e. the same transport and persistence used in production should be used in development and debug scenarios. Select a production transport and persistence before developing features.

NOTE:

  • Do not use the learning transport or learning persistence to perform any kind of performance analysis.
  • All solutions are configured to use the SwitchStartupProject Visual Studio Extension to manage startup projects. The extension is not a requirement, it's handy.
  • A LINQPad script is available to automatically configure startup projects for all solutions in the demo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published