120 likes | 232 Views
File -> New Project. E: jonathan@paladincloudware.com G+: +JonathanPeterson42 GitHub & StackOverflow : Eonasdan. Jonathan Peterson Paladin Cloudware. Default VS MVC project. Extra Packages like Modernizr Messy Code Hour + of preparation to get a project ready.
E N D
File -> New Project E: jonathan@paladincloudware.com G+: +JonathanPeterson42 GitHub & StackOverflow: Eonasdan Jonathan Peterson Paladin Cloudware
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 http://papercut.codeplex.com
Code Templates • Allows you to customize the OTB Views and Controllers • No more unnecessary comments • No more Resharpersquigglies • 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, Email) • 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: http://goo.gl/UhMAFd • Code Templates: • C:\Program Files (x86)\Microsoft Visual Studio 12.0\ Common7\IDE\Extensions\Microsoft\Web\Mvc\Scaffolding\Templates • Less: http://lesscss.org/ • Papercut (SMTP Server): http://papercut.codeplex.com