In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
In this issue, the editor will bring you about how to build the ASP.NET MVC Bootstrap rapid development framework. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
Preface
Every new development project has to be designed from scratch? Is there a general rapid development framework? And it has to be ASP.NET MVC And Bootstrap? Do not create the database by hand? Does the framework have good scalability for future business support? Does it take one day to build a basic environment for such a simple function? Can you only care about the business I need?
There is such a project, based on the rapid project development framework of ASP.NET MVC, EntityFramework, Memcached, Bootstrap, it only takes 3 seconds to create a project with simple user management.
One-click installation
Lazy people click to install the package download address, double-click the "install.bat" batch to add the template project to the VS project template list.
Extreme speed creation
Just click the OK button to create a daemon with simple user management and login functions, as shown in the following figure:
Operating effect login interface
Manage the background main interface
User management
Automatically created database
Export your own project template
Export a sample screenshot of the project template:
The source code highlights the service interface layer, completely rejecting the junk and redundant code of BLL.
Service abstract base class public abstract class ServiceContext: IDisposable {/ database operation context / public readonly DefaultDbContext DbContext = new DefaultDbContext (); / caching component / public CacheContext CacheContext {get; private set } / dynamically set a new instance of the cache object / cache instance object public void SetCacheInstance (CacheContext cacheContext) {/ / release the existing cache component if (CacheContext! = null) {CacheContext.Dispose () CacheContext = null;} / / initialize the new instance of the cache component CacheContext = cacheContext;} public void SetCacheInstance (Type cacheContextType) {if (cacheContextType = = null) {throw new ArgumentNullException ("cacheContextType") } if (! typeof (CacheContext) .IsAssignableFrom (cacheContextType)) {throw new ArgumentException (string.Format (CultureInfo.CurrentCulture, "this type {0} must inherit from abstract class CacheContext", cacheContextType), "cacheContextType") } try {CacheContext = Activator.CreateInstance (cacheContextType) as CacheContext } catch (Exception ex) {throw new InvalidOperationException (String.Format (CultureInfo.CurrentCulture, "failed to create an instance of abstract class CacheContext {0}", cacheContextType) Ex) }} public void Dispose () {if (DbContext! = null) {DbContext.Dispose ();} if (CacheContext! = null) {CacheContext.Dispose () } caching components that can be dynamically switched during operation
Specific business implementation of service interface layer
Have a penchant for cleanliness of the new keyword? In deep pain and evil?
All interfaces are configured.
Don't get away with anything unusual.
Wait every day under the tree, in the hope that a hare would kill itself by crashing into a tree trunk
The basic framework of the project provides you with a quick start, and more NB design requires further imagination.
The above is how to build the ASP.NET MVC Bootstrap rapid development framework shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.