Sie sind auf Seite 1von 3

Requirements

* Create multi-layer architecture for the project (back-end)

o Project.DAL

o Project.Common

o Project.Model.Common

o Project.Model

o Project.Repository.Common

o Project.Repository

o Project.Repository.Tests

o Project.Service.Common

o Project.Service

o Project.Service.Tests

o Project.MVC/WebAPI

o Project.MVC.Tests/WebAPI.Tests

* Create AngularJS (not in case of MVC) application (front-end) that will


connect to back-end

o This should be a separate project or solution

Implementation details

* async/await should be enforced in all layers (async all the way)

* all classes should be abstracted (have interfaces so that they can be


unit tested)

* IoC (Inversion of Control) and DI (Dependency Injection) should be


enforced in all layers (constructor injection preferable)

o Ninject DI container should be used (


<https://github.com/ninject/ninject/wiki>
https://github.com/ninject/ninject/wiki)

* Mapping should be done by using AutoMapper ( <http://automapper.org/>


http://automapper.org/)

* Create DAL project using EF 6 or above with Code First approach (EF Power
Tools can be used)

o <https://www.youtube.com/watch?v=Z7713GBhi4k>
https://www.youtube.com/watch?v=Z7713GBhi4k Part 1 What is Entity Framework

o <https://www.youtube.com/watch?v=kbH-rqMl8cE>
https://www.youtube.com/watch?v=kbH-rqMl8cE Part 3 Entity Framework Code
First Approach

* Project.Common should be cross-cutting project containing utility classes

* *.Common projects should contain contracts (interfaces) for layers

* Repository project should implement the following

o Generic repository -
<http://www.codeproject.com/Articles/838097/CRUD-Operations-Using-the-Generi
c-Repository-Pat>
http://www.codeproject.com/Articles/838097/CRUD-Operations-Using-the-Generic
-Repository-Pat

o Unit Of Work - <https://gist.github.com/khorvat/2b1bf27f0047f62fdb60>


https://gist.github.com/khorvat/2b1bf27f0047f62fdb60 &
<https://gist.github.com/khorvat/dabbb408f7419235efd8>
https://gist.github.com/khorvat/dabbb408f7419235efd8
<http://www.codeproject.com/Articles/581487/Unit-of-Work-Design-Pattern>
http://www.codeproject.com/Articles/581487/Unit-of-Work-Design-Pattern

* Service project

o use composition pattern with repositories -inject them through the


constructor - <http://en.wikipedia.org/wiki/Composition_over_inheritance>
http://en.wikipedia.org/wiki/Composition_over_inheritance

o service methods should only use model contracts (interfaces) as input and
output parameters

* MVC/WebAPI project

o this is DI composition root so you should install Ninject here

o use controllers with async methods

o return proper Http status codes

* AngularJS

o enforce the following folder structure -


<https://scotch.io/tutorials/angularjs-best-practices-directory-structure>
https://scotch.io/tutorials/angularjs-best-practices-directory-structure

o enforce the following naming conventions -


<https://github.com/johnpapa/angular-styleguide#naming>
https://github.com/johnpapa/angular-styleguide#naming

o use UI router for navigation -


<https://github.com/angular-ui/ui-router/wiki>
https://github.com/angular-ui/ui-router/wiki

Candidate should open a dedicated GitHub repository for the purpose of test
project and occasionally report for code review.