Giter Club home page Giter Club logo

mvckickstart's Introduction

MvcKickstart

A base site template I use to start a new asp.net mvc project. This is a .net 4.5, asp.net mvc 5 project.

Overview

This project includes the following:

  • Basic user login, registration, and forgot password screens & logic.
  • A general 500 error page and 404 page are wired up. The 404 page can easily be customized to include suggested pages.
  • A basic admin area, to help directory/file naming conventions for scripts & stylesheets for areas.

Conventions

  • Attribute routing - All routes are named like MyController_MyAction or MyArea_MyController_MyAction.
  • There is no ~/scripts directory. The mvc team should have moved that directory to ~/content/js, where it belongs. That is where you'll find script files in this template.
  • All actions can have their own js and less file. These files will automatically be loaded via _ViewStart.cshtml. If the files do not exist, the site will not fail. The default convention is to place a file named the same as the action, inside a folder named the same as the controller.
    • Eg. ~/content/js/Account/Login.js and ~/content/js/Admin/Home/Index.js
    • Similarly: ~/content/less/Account/Register.less and ~/content/less/Admin/Users/Index.less
  • The site takes advantage of the mythical donut caching technique from the CacheStack library. Action results should be cached via the DonutOutputCache attribute.
  • Only MS SQL Server is supported at this time. It should take just a few tweaks to support other databases.
  • Data model objects can add CreatedBy, CreatedOn, ModifiedBy and ModifiedOn properties. The Save() method will auto update those properties, if they're present.

Optional inclusions

  • This project incorporates tracking internal metrics via statsd. It's good to know how your app is behaving. If you don't have statsd setup, you should. If you still don't want it, removing the "Metrics:*" keys from appSettings will disable metric tracking.
  • Unit testing is built into this solution. Please use what I have as a starting point.
  • This project includes a basic data migration framework. Migrations are one way (no rolling back) and are handled all in code.

Technology Choices

  • Dapper is the ORM of choice.
  • Spruce compliments Dapper
  • CacheStack takes care of a lot of the caching throughout the project
  • Asset bundling and minification is handled by cassette. The built in asp.net bundler sucks in comparison.
  • This template uses bootstrap for a UI starting point. Enjoy...
  • Service Stack is used throughout this project. Service Stack is to asp.net projects as Resharper is to Visual Studio.

Renaming Utility

The Rename Utility (/__Rename Utility/rename.bat) can be used to rename the project from 'KickstartTemplate' to whatever you need it named. When you run that file, it will prompt you for the new name. Once the name is entered, the utility will run through all the files to replace any occurrances of 'KickstartTemplate' (primarily the namespaces) to the name you entered. It will also rename the project files/folders, solution file, and update the solution file to reference the new project names.

Questions

Please have a look at the wiki. If you have a question about something that isn't in the wiki, please feel free to submit an issue and I'll do my best to provide an answer.

mvckickstart's People

Contributors

jgeurts avatar

Watchers

James Cloos avatar Pedro Augusto Freitas de Souza avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.