Jonathan Peterson Paladin Cloudware FILE -> NEW PROJECT E: G+: +JonathanPeterson42 GitHub & StackOverflow: Eonasdan
DEFAULT VS MVC PROJECT Extra Packages like Modernizr Messy Code Hour + of preparation to get a project ready
HOW WE’RE GOING TO FIX IT Using PowerShell to get things going Less Web.config Code templates Data annotations EditorFor Templates Bundles
USING POWERSHELL TO GET THINGS SETUP PowerShell can be used to automate our first task Uninstall packages I don’t want Install packages I always install Update all the packages that are installed
USING LESS Less gives us Mixins Parameters and variables Separate files
WEB.CONFIG ADDITIONS View/web.config Web.config and web.release.config
INTERMISSION: PAPERCUT
CODE TEMPLATES Allows you to customize the OTB Views and Controllers No more unnecessary comments No more Resharper squigglies C:\Program Files (x86)\Microsoft Visual Studio 12.0\ Common7\IDE\Extensions\Microsoft\Web\Mvc\Scaffolding\Templates
DATA ANNOTATIONS Uses for validation (Required, Range, String Length) Specify field types (Phone, ) DisplayFor and ValidationFor text
EDITORFOR TEMPLATES Must be in Views > Shared > EditorTemplates Can be customized for each DataType
STRONGLY TYPED BUNDLES Takes away the guesswork Easier to make changes to the bundle’s route
LINKS Github: Code Templates: – C:\Program Files (x86)\Microsoft Visual Studio 12.0\ Common7\IDE\Extensions\Microsoft\Web\Mvc\Scaffolding\Templates Less: Papercut (SMTP Server):