Skip to content

Latest commit

 

History

History
90 lines (61 loc) · 3.67 KB

quickstart.md

File metadata and controls

90 lines (61 loc) · 3.67 KB
title description keywords author
QuickStart
Shows how to get started quickly with Bifrost
QuickStart
einari

QuickStart

The quickstart is a NuGet package that sets you with a sample building on Bifrost. With the quickstart you get a Web based project that showcases Bifrost in an end-to-end scenario.

Step by Step

Note

The quickstart has only been tested with Visual Studio 2015, it might work with Visual Studio for Mac as well. For Visual Studio Code and using .NET Core and project.json - it will restore all packages and you get to compile and run. But all the artifacts making up the sample is not put into the project folder. This tutorial focuses on the Visual Studio 2015 experience.

  • Start a new project:
    File->New->Project

  • Select .NET Framework 4.6.1 and ASP.NET Web Application, give it a name and click OK:
    Select Project

  • Select the Empty template:
    Select correct ASP.NET

  • Manage the NuGet packages for the project:
    Manage NuGet Packages

  • Browse / Search for Bifrost and find the latest QuickStart package and then click Install:
    Find correct NuGet Package

  • During installation it will ask you accept licenses, accept these:
    Accept Licenses

  • You're now ready to run:
    Run

  • You should now see the following result:
    Result

Whats in the package

The package consists of configuration code and a sample running through the end to end of Bifrost.

Configurator

The Configurator.cs file is the entrypoint that Bifrost is looking for to configure it all. You can read more about how you can configure Bifrost here.

ContainerCreator

The ContainerCreator.cs file is where the IoC container is configured. Bifrost is heavily relying on dependency inversion. And has been built from the ground up to rely on something providing these dependencies.

Index

The index.html is the starting point of the application. Notice the following line:

<div data-navigation-frame="home:HumanResources/Employees/index"></div>

It represents a navigation frame, explained in detail here.

You can find the home view in which it is referring to in the HumanResources/Employeesfolder. The viewModel for the view is automatically hooked up by convention. Read more about how views work here.

Packages

QuickStart depends on other Bifrost packages to get started. It has taken a few decisions for you and is also configured in the simplest way that could possibly work.

The following packages has been pulled in:

Package Purpose
Bifrost The core of Bifrost
Bifrost.JSON JSON Serializer used throughout - utilizing NewtonSoft.JSON
Bifrost.Ninject Implementation for Ninject - IoC container
Bifrost.FluentValidation  Implementation for validation using FluentValidation
Bifrost.Web The Web part - including the Bifrost JavaScript SPA framework