as way of raising standards of our codebase new web projects (where possible) use mvc5 inversion of control. i'd have service, domain , repository layers. plus unit tests them started. lot of code front every project, , want avoid "just copy projectxyz , strip out don't need" has been fraught human errors in past.
how take basic skeleton solution , turn template colleagues file -> new project etc ? copy .sln create, seems there might more professional way it.
perhaps there 1 out there can use?
i developer of asp.net mvc boilerplate (i found question checking github traffic , seeing @floatas's link, thank @floatas).
the default mvc project template basic , gives little out of box. idea behind asp.net mvc boilerplate write boilerplate code you, don't have to.
now not contain unit tests, repositories etc. include lot of other things every website requires.
secure default
the default mvc template not secure be. there various settings (mostly in web.config file) insecure default. example, leaks information version of iis using , allows external scripts access cookies default!
asp.net mvc boilerplate makes secure default goes further , uses various http headers sent browser restrict things further.
it makes use of new content security policy (csp) http header using nwebsec nuget packages. csp revolutionizes web security , highly recommend reading above link.
setting ssl/tls, site runs on https made easy easy step step instructions , links.
fast default
the default mvc template pretty poor job in performance department. because don't make assumptions web server using. of world , dog writing asp.net mvc sites use iis , there settings in web.config file under system.webserver section can make big difference when comes performance.
asp.net mvc boilerplate makes no such assumptions. turns on gzip compression static , dynamic files being sent browsers making them smaller , quicker download. uses content delivery networks (cdn) default make common scripts jquery quicker download (you can turn off of course point asp.net mvc boilerplate fast default).
that's not all! there bunch of other tweaks , examples of practices can improve performance of site. asp.net mvc boilerplate achieves score of 96/100 on yslow (its not possible full 100 of it's criteria contradict each other , site scripts need moved cdn need yourself).
search engine optimization (seo)
the default asp.net mvc template takes no consideration of search engine optimization @ all. asp.net mvc boilerplate adds dynamically generated robots.txt file tell search engines pages can index. adds dynamically generated sitemap.xml file can search engines further giving them links pages.
asp.net mvc has useful settings appending trailing slashes url's , making url's lower case. unfortunately, both of these turned off default, terrible seo. project turns them on default.
it includes mvc filter helps redirect non-canonical url's (url's without trailing slash or mixed case characters considered different url's search engines) canonical equivalent.
accessibility
4% of world population estimated visually impaired, while 0.55% blind. more statistics here. asp.net mvc boilerplate ensures site accessible adding aria attributes html mark-up , special shortcuts people using screen readers.
browser compatibility
websites need reach many people possible , on range of different devices. asp.net mvc boilerplate supports browsers old ie8 (ie8 still has around 4% market share , used corporations lazy port old websites newer browsers).
asp.net mvc boilerplate supports devices other desktop browsers as possible. has default icons , splash screens windows 8, android, apple devices , few other device specific settings included default.
resilience , error handling
at point site going throw exception , need handle , log exception able understand , fix it. asp.net mvc boilerplate includes elmah, popular error logging addin default. it's preconfigured , ready use.
asp.net mvc boilerplate uses popular content delivery networks (cdn) google , microsoft happens in unlikely event these go down? well, asp.net mvc boilerplate provides backups these.
not standard error pages such 500 internal server error, 404 not found , many others built in template. asp.net mvc boilerplate includes iis configuration protect denial-of-service (dos) attacks.
easier debugging , performance testing tools
asp.net mvc boilerplate makes use of glimpse (as advertised scott hansleman here). it's great tool use developing, find performance problems , bugs. of course, glimpse preconfigured, don't need lift finger install it.
patterns , practices
doing things right take little time. using inversion of control (ioc) pattern example should default. asp.net mvc boilerplate uses autofac ioc container default. people bit tribal when talking ioc containers honest, work great. autofac picked because has lots of helpers asp.net mvc , microsoft uses azure mobile services.
asp.net mvc boilerplate makes use of popular less files making life easier css. example, can make overriding colours , fonts in default bootstrap css cinch.
asp.net mvc complicated beast. can end lots of magic strings can nightmare when renaming something. there many ways of eliminating these magic strings trade maintainability slower performance. asp.net mvc boilerplate makes extensive use of constants trade-off between maintainability , performance, giving best of both worlds.
search
there lot more implementing search in application sounds. asp.net mvc boilerplate includes search feature default leaves open choose how want implement it. implements open search xml right out of box. read scott hanselman talk feature here.
social
open graph meta tags , twitter card meta tags included default. not asp.net mvc boilerplate includes documented html helpers allow generate open graph object or twitter card met tags , correctly.
Comments
Post a Comment