Code Monkey home page Code Monkey 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 4 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
  • All data querying should be done inside the the following using block. This allows us to adjust RavenDb cache durations dynamically.
using (RavenSession.GetCachingContext()) {
    // TODO: Add your query code here
}
  • The site takes advantage of the mythical donut caching technique via the MVC donut caching library. Content should be cached via the ConfiguredOutputCache attribute. The idea with that attribute is that the cache duration can be controlled via an admin screen.

Additional Information

  • 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.
  • Some technology choices:
    • RavenDb is the datalayer of choice. If you have problems with that, you can easily swap it out for something less enjoyable.
    • 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...
    • I use various parts of Service Stack throughout this project. Service Stack is to asp.net projects as Resharper is to Visual Studio.

mvckickstart's People

Contributors

jgeurts avatar

Watchers

 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.