OSharp3.0 Frame Commentary Series: New Release Notes and new feature planning preview

Source: Internet
Author: User

Objective

Time passed really fast, small half a year passed again.

Osharp in github.com open-source has been half a year, half a year, we found that open source has not brought any development to OSHARP, concerned about the number of people, fewer people to submit bugs, as for willing to participate in the project, to Osharp to submit code,0.

I have nothing to say about the great environment.

A person's open source, open is not the source, is lonely.

In order to osharp the project can continue to develop, but also for the enthusiasm of the team (we all know, if only you are contributing, others only take, your enthusiasm will not last long), we made a decision ...

OSharp3.0 no longer open source

From the beginning of the OSharp3.0, away from the noisy open source environment, by a few like-minded small partners down the heart, serious to continue to develop the OSHARP framework. The following changes are made:

    • The source code before OSharp3.0 is still hosted on github.com, but is no longer actively updated.
    • OSharp3.0 and subsequent source code, only circulate among team members.
    • NuGet above the class library, will be continuously updated to provide "non-encrypted DLL class library files, PDB debug files, XML comment Files" in a way that provides the use of the source of the project can still be easily read through various ways.
    • With the new features of OSharp3.0, this series of blog will continue to update, the new features will be detailed technical description, welcome to enjoy this series of Bo friends continue to pay attention to.
OSharp3.0 Introduction

After a period of recent efforts, OSHARP3.0 has added a lot of features, such as framework initialization process, multi-database multi-context support, classification logging, and so on, including the function permissions and data permissions of the system is being designed, based on the entity configuration of the cache system, in the plan.

Compare with OSharp2.0

In contrast to OSharp2.0, OSharp3.0 has made some changes, except for the osharp.utility,osharp.web.client of these two generic libraries, and OSharp3.0 's other class libraries have gone beyond support for. NET 4.0. only. NET 4.5 and above are supported. NET environments.

From the project diagram on NuGet, you can see the changes in two versions:

OSHARP2.0 's Project Map:

OSHARP3.0 's Project Map:

Next, let's comb the role of each class library:

  • Osharp.utility:
    • Function: Tool class component, to encapsulate common tool class auxiliary operation
    • Dependencies: Json.NET
  • Osharp.web:
    • Role: Web tools class components, encapsulating common operations for web-related mvc,webapi,signalr
    • Dependencies: OSHARP.UTILITY,MVC5,WEBAPI5,SIGNALR2
  • OSharp.Web.Client:
    • Role: Web client components, encapsulating Web Client-related WEBAPI,SIGNALR desktop client features
    • Dependencies: Osharp.utility,webapi4 CLIENT,SIGNALR2 Client
  • Osharp.core:
    • Role: Framework core components, for framework definition configuration nodes, logs, data access, caching, framework initialization and other functions of the basic class, core interface, etc.
    • Dependencies: osharp.utility
  • OSharp.Core.Data.Entity:
    • Role: Data access Components, encapsulating the implementation of EntityFramework-based data access capabilities
    • Dependencies: Osharp.core,entityframework,automapper
  • OSHARP.CORE.DATA.ENTITY.MYSQL:
    • Role: MySQL data access component, support for data access components to provide MySQL database based on EntityFramework data access function
    • Dependencies: osharp.core.data.entity,mysql.data.entity
  • Osharp.sitebase:
    • Function: Site Foundation, provide the definition of site basic function and implementation of framework initialization
    • Dependencies: Osharp.web,osharp.core.data.entity,autofac,log4net
  • Osharp.framework:
    • Role: Framework NuGet installation boot, no actual class library
    • Dependencies: Osharp.sitebase,osharp.web
  • OSharp.Sample.Simple:
    • Role: A simple example of the OSHARP development Framework for the first experience of the OSHARP framework
    • Dependencies: Osharp.framework and some front-end frameworks
OSharp3.0 new function Planning and introduction

For each new function, here is simply to do a brief introduction, detailed design ideas and implementation, the following article is described in detail.

Categorical logging

In the "open source" Osharp Framework Commentary Series (6.1): Log system design, we have designed and implemented a scalable log system, as long as the output is defined adapter, you can output the log information in any form.

In the journal development, some logging requirements are required, such as Operation log, data change log, system Exception Log, etc., we want to integrate these general requirements into the OSHARP framework. With built-in support, when doing development, only need a very simple configuration, you can achieve the relevant requirements.

For example, the implementation of the Operation log, as shown in:

In the background management, the administrator can control whether the operation log and data log are turned on by the simple configuration of each function point.

Multi-database multi-context support

When building more complex systems, sometimes we need to separate libraries for different subsystems or modules, to split the data that was originally concentrated in one database into different databases depending on the module.

For example, the above operation log and data log, not the business data of the system, can not be recorded into the business database, but separately logged into the log database, can effectively reduce the amount of log data to the business database pressure.

OSHARP3.0 's data access layer, through the abstraction of the data context (Dbcontextbase), the data Initialization strategy (DBCONTEXT), makes it easy to group entity classes as needed and initialize them into different contexts.

function permission and Data permission system

In the Osharp system, when the system is initialized, all the function information of the system is collected and all the data entity information are stored as records in the database.

  

The permission system will control the point-to-point permissions of the function and data permissions according to the function information and data entity information received above, for different roles.

    • For feature permissions, each role can be configured with "Inherit, allow, deny" three state permission types for each feature
    • For data permissions, each role for each entity (or even the individual properties of the entity), can be configured by the sub-query condition, in the database data query, the query to add sub-query conditions, to the data for different permissions control.
Entity-Configured Cache system

In the cache system, according to the data entity information collected by the preceding permission system, it can be differentiated to different business data for each data entity, different cache policies (such as whether cache is enabled, expiration time), etc.

NuGet get assembly and update series navigation
    1. "Open source" Osharp frame Commentary Series (1): Overall design
    2. "Open source" Osharp frame Commentary Series (2.1): Easyui's background interface and extreme refactoring
    3. "Open source" Osharp Frame Commentary Series (2.2): Easyui complex layout and data manipulation
    4. "Open source" Osharp Frame Commentary Series (3): extension method
    5. "Open source" Osharp Frame Commentary series (4): Architecture layering and IOC
    6. "Open source" Osharp Frame Commentary Series (5.1): EntityFramework Data layer Design
    7. "Open source" Osharp Framework Commentary Series (5.2): EntityFramework data Layer Implementation
    8. "Open source" Osharp Frame Commentary Series (6.1): Log system Design
    9. OSharp3.0 Frame Commentary Series: New Release Notes and new feature planning preview

OSharp3.0 Frame Commentary Series: New Release Notes and new feature planning preview

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.