Preface
I have been engaged in development for several years and have been working on architecture construction recently. The greatest sentiment of these times is:
- Only what you understand is yours.
- If you want to establish the architecture, you must first break it.
Therefore, we are ready to use our spare time to build this framework. Due to limited time and energy, this framework may be unreasonable in the early stage, but I believe that this framework will be polished to perfection sooner or later with perseverance. I am obsessed with the code because I stick to the principle of loving one line and one line, so I name it"Magiccode framework", I hope it will not humiliate this name in the future.
In the following time, I will maintain this framework for a long time and post my experiences.
Magiccode framework
Magiccode framework is a plug-in framework. Currently, it is in the webform version. After the webform version is stable, I will continue to build the MVC version. In terms of the design of the entire architecture system, in addition to the plug-in design of the backend framework, the modular design of the front-end framework is also part of the framework.
Well, if you don't talk nonsense, let's briefly list some of the technologies or concepts involved in this framework:
Backend |
Plug-in Architecture (magiccode Architecture) |
The plug-in architecture provides an open architecture to facilitate middleware selection, assembly, and integration. Application Framework reuse has become one of the most effective reuse methods in software development and production. Plug-in-based design has many advantages. The extension function is removed from the framework, which reduces the complexity of the framework and makes it easier to implement the Framework. The extended functions are coupled with the framework in a very loose way. The two functions can be changed and released independently while the interfaces remain unchanged. The open plug-in interface gives third parties the opportunity to expand the functions of the application, which can be shared by everyone. In addition, the open source and closed source can coexist in a set of software. Whether your plug-in is open source or closed source is up to you. |
Plug-in Framework (magiccode. Core) |
The plug-in framework is used to organize and manage the download, loading, combination, instantiation, and destruction of system plug-ins. It also provides a complete set of Operation interfaces for communicating with background services. |
Plug-in Interface (magiccode. Web. interfaces) |
All plug-ins of the system implement unified interface specifications of the system framework to effectively organize and manage plug-in objects. Plug-in policies are part of plug-in Interfaces. Plug-in policies are used to implement some common functions for various plug-ins to call. Currently, the magiccode framework provides the following policies:
- Cache-Cache Policy
- Email-Email Policy
- Logger-Log Policy
- Scriptmin -- script resource compression Policy
- Sesstion -- Session Policy
- SMS-SMS Policy
- Userauthentication-User Authentication Policy
|
Plug-in components (plus) |
The plug-in component is a specific plug-in program, which is an independent program that implements the plug-in interface. |
Entityframework |
ADO. NET Entity Framework is an O/R Mapping solution developed by Microsoft Based on ADO. net. Here I prefer code first + migration. |
Front end |
Frontend Modularization |
Similar to the back-end plug-in architecture, when the programming language reaches a certain stage, it must go through the process of splitting modularization to facilitate team collaboration and maintenance. Front-end development has also entered the modular development period in the chaotic phase. |
Requirejs |
The goal of requirejs is to encourage code modularization, which uses a script loading step different from the traditional <SCRIPT> label. It can be used to accelerate and optimize code, but its main purpose is to modularize the code. It encourages replacement of the URL address with the module ID when using the script. I have used seajs and requirejs, but I firmly chose requirejs. |
Jquery and jquery plug-ins |
Jquery is a lightweight JS library compatible with css3 and various browsers (IE 6.0 +, FF 1.5 +, Safari 2.0 +, and opera 9.0 + ), jquery2.0 and later versions will no longer support IE6/7/8 browsers. Jquery allows you to easily process HTML (an application in a standard General Markup Language), events, and animation effects, and provides Ajax interaction for websites. |
Bootstrap and other responsive frameworks |
Bootstrap is developed based on the jquery framework. It is more personalized and humanized Based on the jquery framework, forming a unique website style, and is compatible with most jquery plug-ins. Bootstrap contains a wide range of web components. Based on these components, you can quickly build a beautiful and fully functional website. |
Conclusion
The Framework Design has actually started two weeks ago, so today we will officially declare war. This framework will be maintained and updated for a long time, and we will try to share a technical post or architectural post every week to promote common progress. If something is wrong, please correct me.
In addition,The magiccode framework will be open-source for members (the child is about to be born, please understand, and the 600 pieces are really nothing, just as a reward for my first-line code farmer-buy address ). Currently, many commercial frameworks are not open-source. They are not open-source frameworks, but plug-ins are not open-source. Although many powerful tools or designers can be developed quickly, but it is not conducive to developers to learn and improve, and is not conducive to reusing plug-ins and debugging tracking. In my philosophy, only open source is conducive to the improvement of the architecture and the joint improvement of the architecture, so we can make open source plans.
Finally, I will share a poem that I just occasionally feel:
Xia Xue
You are a maverick snowflake
This suddenly appeared in the clear sky of the city.
Ice Crystal appearance, white Luo skirt
It seems that your beauty is blooming throughout the hot sun
I am just a passthrough in this city
All at once
You slowly floated down, and finally melted into my palm
You gave me all the splendor in your life
But I am a passthrough
Maybe you shouldn't be in this fierce clear sky
Maybe I shouldn't walk in this noisy city.
Only,
I don't know how this moment is met, but for the sake of its eternity
1. The path to the magiccode framework -- Starting