QFramework Intro
QFramework is a framework. she supports solid principle、domain design driven、event-driven、data-driven、layered、mvc、cqrs、modularization、extendable、scalable architecture. Simple but powerful! she only has 800 lines of code and can save to a note-taking app.
Architecture diagram
For Example(😂)
Schematic diagram of various situations
Architecture Rule
QFramework System Design Architecture has 4 layers:
Presentation Layer:ViewController Layer. Using IController interface,receive input from user and state changed event from model. In unity MonoBehaviour is on presentation layer
Can get System
Can get Model
Can send Command
Can listen Event
System Layer:Using ISystem interface. share IController’s part of responsibility. Sharing logic shared across multiple presentation layers,such-as time system、shop system、achievement system.
Can get System
Can get Model
Can listen Event
Can send Event
Model Layer:Using IModel interface.Responsible for data definition, data addition, deletion, query and modification methods.
Can get Utility
Can send Event
Utility Layer:Using IUtility interface.Responsible for providing infrastructure, such as storage method, serialization method, network connection method, Bluetooth method, SDK, framework inheritance, etc. Nothing can be done. You can integrate third-party libraries or encapsulate APIs
In addition to the four layers, there is a core concept - command
Can get System
Can get Model
Can send Event
Can send Command
Layer Rule:
IController change ISystem、IModel’s state by Command
Notify iController after the change of ISystem and IModel must use event or BindableProperty
IController can get ISystem、IModel for data query
ICommand cannot have state
The upper layer can directly obtain the lower layer, and the lower layer cannot obtain the upper object
Events for lower layer to upper layer communication
The communication between the upper layer and the lower layer is called by method (only for query and command for state change). The interaction logic of IController is special, and command can only be used
(照抄自:学生课堂笔记1)
Environment
Unity 2018.4.x ~ 2021.x
Install
QFramework.cs
copy this code to your project
QFramework.cs With Examples
QFramework.ToolKits
QFramework.ToolkitsPro
install by Asset Store
Resources
Version |
||
---|---|---|
QFramework.cs |
Implementation of QFramework ontology architecture |
|
QFramework.cs With Examples |
QFramework.cs and Examples:CounterApp、Point Point Point、CubeMaster、FlappyBird、ShootingEditor2D、SnakeGame etc (QFramework.cs included) |
|
QFramework.ToolKits |
QFramework.cs with UIKit/ActionKit/ResKit/PackageKit/AudioKit (QFramework.cs and examples included) |
|
QFramework.Toolkits.Demo.WuZiQi |
Gobang Demo by QFramework.Toolkits(Need Install QFramework.Toolkits) |
|
QFramework.Toolkits.Demo.Saolei |
Mine clearance Demo by QFramework.Toolkits(Need Install QFramework.Toolkits) |
|
QFramework.ToolKitsPro |
More Powerful Tools version based on QFramework.ToolKits (QFramework.Toolkits included) |
|
Community |
||
github issue |
github community |
|
gitee issue |
gitee community |
|
ShowCase |
email me or publish on github’s issue. My email: liangxiegame@163.com |
|
《When The Train Buzzes For Three Seconds》 |
||
《The First Mountain》 |
||
《Hi Eggplant》 |
||
《Under The Ghost Mountain》 |
||
Official Toolkits |
||
SingletonKit |
||
ExtensionKit |
||
IOCKit |
||
TableKit |
||
PoolKit |
||
LogKit |
||
ActionKit |
||
ResKit |
||
UIKit |
||
AudioKit |
||
PackageKit |
||
Star Trends
Contributors
Other Awesome Framework
ET:ET Unity3D Client And C# Server Framework
IFramework(OnClick) Simple Unity Tools
JEngine The solution that allows unity games update in runtime.
TinaX Framework “开箱即用”的Unity独立游戏开发工具
Code Style:
Donate:
如果觉得不错可以在 Asset Store 给个 5 星哦~ give 5 star
或者给此仓库一个小小的 Star~ star this repository
以上这些都会转化成我们的动力,提供更好的技术服务!