ASP. NET MVC 5 Scaffolding multi-layer Architecture Code Generation Wizard Open Source project (invite you to participate)

Source: Internet
Author: User

Visual Studio.NET ASP 5 Scaffolding Code Generation Wizard Open Source project

The best way to improve development efficiency and standardize code writing is to use simple design patterns (MVC, repoistory pattern) + template generation tools. Every small software company seems to have its own basic development platform, most of which is based on the data dictionary + template dynamically generated CRUD operations page; The generic project 80% code can be generated from the template but does not mean that it can shorten the project development time by 80%. After all, a lot of business operations are based on the needs of users to customize the development or need a lot of time to understand and develop. However, as the project experience accumulates and precipitates, it can be helpful for future projects.

Now with the mobile internet, mobile phone app,ipad and other mobile devices popular, it seems that all the needs of mobile applications, I think this is why the recent MVC is getting more and more fire reasons. Not just because of the simplicity of MVC (relative to the Web form), but also the fact that MVC is more suitable for browsing on different devices than Web form, and easier to encapsulate and reuse (Partial view,layouttemplate).

The recent time to develop a living MVC code generation tool, in fact, in other people's basic changes, if you are also interested to participate in the improvement, GitHub is a good thing is the speed of domestic access is too slow.

My Project Address Https://github.com/neozhu/MVC5-Scaffolder

Project Stage

At present, it basically realizes the function of adding and deleting individual entities.

Next implementation of navigation menu dynamic configuration dynamic creation

The page part is all real Ajax local Refresh

Top navigation bar notification function

Add Login Registration page template

One-to-many new edit templates

Mvc5-scaffolder Open Source Project

The functionality of this tool automatically generates EntityFramework + unitofwork Repository Framework Project code through templates, and the overall project architecture is fully referenced in the Generic Unit of work and repositories (l Ightweight fluent) framework with Sample Northwind ASP. 5 Application as shown in the very perfect architecture.

  • UI (Presentation) Layer
    • ASP. NET MVC-(Sample App:Northwind.Web)
    • Kendo UI-(Sample App:Northwind.Web)
    • AngularJS-(Sample App:Northwind.Web)
  • repository pattern-framework (Repository.pattern, Repository.Pattern.Ef6, northwind.repository)
  • Span style= "color: #253340; Font-family:segoe UI; font-size:10pt; " >unit of work pattern-framework (Repository.pattern, Repository.Pattern.EF6, northwind.repository)
  • entity Framework
  • service Pattern-framework (Service.pattern, Northwind.service)
  • Domain driven Design (*slated for release v4.0.0)
    • Domain Events
    • *more to come

The approximate style of operation is as follows with Boostrap Sb-admin.css

Mvc5-scaffolder Project Structure and composition

Demo

---unitofworkframework– source code downloaded from the Web (http://genericunitofworkandrepositories.codeplex.com/)

--webapp-web Project

Mvc5scaffloding-vs.net 2013 Code Generation Wizard plug-in project

---Templates---All code-generated templates include view,controller,repoistory,service, dependent external classes

mvc5scaffloding.vsix– Installation Project

Code templates

Mvccontrollerwithcontext–controller Code Templates

_layout– home page templates

_sidenavbar– Main Menu Navigation bar

_topnavba-the top navigation bar of the main page

Sb-admin--css style Download the simplest style on the web

Mvcview--crud Templates

Repoistories-Build extension method can be understood as the data access layer

services– Generating business Logic Layer code

Entity class structure

Metadata the original data class also generates the necessary validation rules through the wizard

can also be very convenient to modify

Repoistories,services Code Structure

The template generates an entity method associated with the entity, such as a collection of entity objects associated with a foreign key

The service layer also generates all the methods and entities associated with it

Service layer above the repoistory layer, if the business logic complex requires multiple repository implementations then a service will contain multiple repository

Controller code structure

In addition to the basic additions and deletions, index method to achieve a paged query, sorting has not been implemented

Iproductservice,iunitofworkasync is created with unity Dependency Injection

Configure Unity Registration Information

First project to install Unity Boostrapper for ASP. NET MVC through NuGet

Register the created Repoistory,service class in

Run debugging

This is the basic build style.

Index home page has pagination and query function

Modifications can be deleted

At present is just a prototype, there are many features need to be perfected, if you are interested can participate in Help.

ASP. NET MVC 5 Scaffolding multi-layer Architecture Code Generation Wizard Open Source project (invite you to participate)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.