Bauer Developer Instructions
Bauer%20Developer%20%20-%20Instructions
User Manual:
Open the PDF directly: View PDF
.
Page Count: 4

Instructions
Theideaofthistestistogaininsightintohowyou,asadeveloper,think
aboutproblemsolvingwhiledemonstrating:
ApplicationofSOLIDprinciples.
Agoodunderstandingofseparationofconcernswithoutover-
engineering.
Overallapproachtounittesting.
Thistestandit’scontentisnotadirectreflectionoftheworkthatwillbe
undertakenatBauerMedia.Itisatechnicalscreentoseehowcandidates
solveproblems.
Torunthisproject,youwillneedVisualStudio2017orVisualStudio2017
CommunityEditionandthe.NETFramework4.7DeveloperPackinstalled.
Otherwise,therearenoenforcedlibrariesortoolsthat
have
tobeused.
Youarefreetousewhateverfeelsmostcomfortable.
TheBrief
Youhaveinheritedalegacyrestaurantguideapplicationthatrequires
someupgradestobringituptodatewithmoderntechniquesand
practices.Pleasetakeintoaccountseparationofconcerns,unit
testabilityandtheeaseofpostdeploymentdatabasetuningand
optimisation.AnyUIconsiderationsareavalueadd,butwillalsobe
seeninapositivelight.

1. Takingthelegacycodein HomeController ,refactorthe
applicationintoalayeredarchitectureusingthe Restaurant
domainmodelobjectasabaseandtheprovided AppData database
asadatastore.Useanypreferreddataaccess/ORMframework.
Scopefordemonstratingthefollowing:
Creationofadataaccesslayertakingintoaccountweb
securitybestpractices.Feelfreetouseanyappropriate
designpatternsyoufeelcomfortableimplementing.
Thepotentialdefinitionofaunittestablebusinesslogic
layertositbetweenyourcontrollerandyourdatalayer.
Theuseofdependencyinjectionforbetterunittesting.
Creatingastrongly-typedviewmodel.
2. Implementthe Save methodat /Restaurant/Edit .
Aswithtask1,showalayeredarchitecture.Refactorasyou
seefit.
Inadditiontosupportingeditingofthecurrentlyshown
fields(i.e. Name , PhoneNumber ),pleaseadda Chef field.
The Name , PhoneNumber and Chef fieldsmustbe
validatedandstoredcorrectlyaccordingtoruleslisted
below.Anyclientsidevalidationshouldnotinterferewith
compliancetotheserules.Pleaseunittestthislogic.
Thedatabaseupdatemustbeimplementedusingastored
procedure,butcanbeabstractedinanywayyouseefit.
3. Optionalbonuspointsforshow-offs:extendthe /Restaurant/Edit

formtoincludeanyotherfieldsinadomainspecificway.E.g.
Cuisine(adropdownlist).
Ratingfield.
Addressfields.
RestaurantNamerules
1. Thenameoftherestaurantismandatory.
2. Thenamecannotexceed250characters.
Chefrules
1. Thenameofthechefismandatory.
2. ThenameofthechefcancontainUnicodecharacters.
3. Thenameofthechefcannotexceed500Unicodecharacters.
PhoneNumberrules
1. PhonenumbersareassumedtobevalidwithinAustralia-theywill
neverbeinternational.
2. Theonlynon-digitcharactersacceptedbythe PhoneNumber field
are:
Thewhitespacecharacter.
Theopeningandclosingparentheses,butonlywhenthey
enclosethetwodigitareacode.
3. Thenon-digitcharactersstatedabovewillbeacceptedbytheUI
butignored/droppedduringvalidation.Phonenumberswithother

non-digitcharacterswillberejected.
4. Iflessthan9significantdigitsareentered,thephonenumberwill
berejected.
5. Anydigitsbeyondthe9thmost-significantareignored/dropped
duringvalidation.
6. Theresulting9-digitnumberwillbestoredinthe PhoneNumber
databasecolumn.
7. Whendisplayingthenumberfromthe PhoneNumber database
column,itmustbeformattedas (00)00000000 .
Submission
Whenyouhavecompletedthetask
Ziptheentiresolution.
Ensureyoursubmissionpassesthe“worksonmymachine”test.
Submissionsrequiringnugetrestorearefine(and
preferred).
Submissionsthatfailtorunduetomissing/nonrelative
databasepathswillbeatadisadvantage.
Returnittothecontactwhoprovidedyouthistest.
Youmaynothavehadtimetomodifythesolutionexactlyasyou
wouldlike.Ifnot,includesomecommentsaboutanytechnicaldebt
orthearchitectureyouwouldliketoimproveupon.