library_architecture_mvvm_modify 0.2.8 library_architecture_mvvm_modify: ^0.2.8 copied to clipboard
MVVM Modify for Dart but you can also port to another language
Getting Starting #
- Example Project:
-
- Big project (This project will come later)
- Documentation
Documentation #
- In general, I will try to describe the architecture in detail (Modification of MVVM)
General Rules #
- Class names, Global variable names:
-
- Forbidden words ():
-
-
- And
-
-
-
- Or
-
-
-
- Where
-
-
-
- For
-
-
-
- From
-
-
-
- Parameter/Parameters
-
-
- Alternative to forbidden words ():
-
-
- W
-
- Try/catch only at 'NamedUtility','OperationEEModel(EEWhereNamed)[EEFromNamed]EEParameterNamedService'
Architectural Objects #
In what order to create and write architectural objects?
1234567 NamedUtility
- NamedView
- DataForNamed
- Model
- ListModel
- NamedService
- OperationEEModel(EEWhereNamed)[EEFromNamed]EEParameterNamedService
- NamedViewModel
NamedUtility
- You can use the same rules as 'Model' or your own rules
- Type classes (KeysNamedServiceUtility, KeysNamedUtility, NamedUtility):
-
- KeysNamedServiceUtility - a class where the keys of a specific service are stored, and the keys are distributed across models
-
-
- Example - Model 'IPAddress', Key 'Ip' (static const String iPAddressQQIp = "ip")
-
-
-
-
- QQ - needed as a separator that helps to quickly understand what this constant does
-
-
-
- KeysNamedUtility - a class whose keys belong to other classes and are attached to methods and can be used to store errors and various successes, etc.
-
-
- Example - Class 'DataForAntiDDosSystemView', Key 'GetExceptionInStringWhereNotEqualsParametersCodeAndInputCode' (static const String dataForAntiDDosSystemViewQQGetExceptionInStringWhereNotEqualsParametersCodeAndInputCode = "dataForAntiDDosSystemViewQQGetExceptionInStringWhereNotEqualsParametersCodeAndInputCode")
-
-
-
-
- QQ - needed as a separator that helps to quickly understand what this constant does
-
-
-
- NamedUtility - it could be anything
-
-
- Example - TimerUtility,InsertUserUtility (To NamedService), etc...
-
NamedView
- The same rules as the 'Model'
DataForNamed
- The same rules as the 'Model'
Model
- Method names (Get,Void,Bool):
-
- Forbidden words ():
-
-
- And
-
-
-
- Or
-
-
-
- Where
-
-
-
- For
-
-
-
- From
-
-
-
- Parameter/Parameters
-
-
- Alternative to forbidden words ():
-
-
- W
-
-
- Where to apply (And)
-
- Get:
-
-
- get(Named)(WhereNamed)[FromNamed][ParameterNamed]:
-
-
-
-
- () - optional
-
-
-
-
-
- [] - if available
-
-
-
-
-
- get - required word
-
-
-
-
-
- (Named) - we get primitive type or another model or briefly describe what we are taking
-
-
-
-
-
- (WhereNamed) - describe in as much detail as possible what this method does, you can use the [FromNamed] context ( And - for iteration)
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list ( And - for iteration)
-
-
-
-
-
- [ParameterNamed] - what global variables were used ( And - for iteration)
-
-
-
-
-
- Method name length - no more than 100 characters (if more than 100, then use numbers (Example - getNamedWhereNamedFromOneParametersTwo))
-
-
-
-
-
- Regarding duplicates - at the end add 'FIRST', 'SECOND', etc...
-
-
-
-
-
- Local variable name - named(WhereNamed)[FromNamed][ParameterNamed]
-
-
-
- Void:
-
-
- operation[OtherModelOrPrimitiveType] (WhereNamed)[FromNamed][ParameterNamed]
-
-
-
-
- () - optional
-
-
-
-
-
- [] - if available
-
-
-
-
-
- operation - insert, update, delete, set, init, etc...
-
-
-
-
-
- [OtherModelOrPrimitiveType] - if your class has a model list or primitive type list parameter. But if you specify a different model or primitive type in [FromNamed] then there is no point in specifying that. If you add the same "Model" to your "ListModel" then there is no point in specifying this
-
-
-
-
-
- (WhereNamed) - describe in as much detail as possible what this method does, you can use the [FromNamed] context ( And - for iteration)
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list ( And - for iteration)
-
-
-
-
-
- [ParameterNamed] - what global variables were used ( And - for iteration)
-
-
-
-
-
- Method name length - no more than 100 characters (if more than 100, then use numbers (Example - operationOtherModelOrPrimitiveTypeWhereNamedFromOneParameterOne))
-
-
-
-
-
- Regarding duplicates - at the end add 'FIRST', 'SECOND', etc...
-
-
-
- Bool:
-
-
- isWhereNamed[FromNamed][ParameterNamed]:
-
-
-
-
- [] - if available
-
-
-
-
-
- isWhereNamed - describe in as much detail as possible what this method does, you can use the [FromNamed] context ( And - for iteration)
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list ( And - for iteration)
-
-
-
-
-
- [ParameterNamed] - what global variables were used ( And - for iteration)
-
-
-
-
-
- Method name length - no more than 100 characters (if more than 100, then use numbers (Example - isWhereNamedFromOneParametersTwo))
-
-
-
-
-
- Regarding duplicates - at the end add 'FIRST', 'SECOND', etc...
-
-
-
-
-
- Local variable name - isWhereNamed[FromNamed][ParameterNamed]
-
-
ListModel
- The same rules as the 'Model'
NamedService
- The same rules as the 'Model'
OperationEEModel(EEWhereNamed)[EEFromNamed]EEParameterNamedService
- Class names, Methods names:
-
- Forbidden words ():
-
-
- And
-
-
-
- Or
-
-
-
- Where
-
-
-
- For
-
-
-
- From
-
-
-
- Parameter/Parameters
-
-
- Alternative to forbidden words ():
-
-
- W
-
-
- Where to apply (And)
-
- Class names:
-
-
- OperationEEModel(EEWhereNamed)[EEFromNamed]EEParameterNamedService:
-
-
-
-
- Minimum two 'EE'. Maximum four 'EE' - needed as a separator that helps to quickly understand what this class does
-
-
-
-
-
- () - optional
-
-
-
-
-
- [] - if available
-
-
-
-
-
- Operation - insert, update, delete, set, init, etc...
-
-
-
-
-
- EEModel - name model
-
-
-
-
-
- (EEWhereNamed) - describe in as much detail as possible what this class does ( And - for iteration)
-
-
-
-
-
- [EEFromNamed] - if the method has parameters, then list ( And - for iteration)
-
-
-
-
-
- EEParameterNamedService - what service do you use ( And - for iteration)
-
-
-
-
-
- Global variable names - _operationEEModel(EEWhereNamed)[EEFromNamed]EEParameterNamedService
-
-
-
- Methods names:
-
-
- OperationModel(WhereNamed)[FromNamed]ParameterNamedService:
-
-
-
-
- () - optional
-
-
-
-
-
- [] - if available
-
-
-
-
-
- Operation - insert, update, delete, set, init, etc...
-
-
-
-
-
- Model - name model
-
-
-
-
-
- (WhereNamed) - describe in as much detail as possible what this class does ( And - for iteration)
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list ( And - for iteration)
-
-
-
-
-
- ParameterNamedService - what service do you use ( And - for iteration)
-
-
-
-
-
- Local variable names - operationModel(WhereNamed)[FromNamed]ParameterNamedService
-
-
NamedViewModel
- Global variable names - _namedViewModel
- How are private methods created in this class ?
-
- numberQQ${InWhatMethod?}QQ${WhichMethodTriggersTheCreationOfAPrivateMethod?}
-
-
- How are private methods to private methods created in this class ?
-
-
-
-
- numberBranchNumberQQ${InWhatMethod?}QQ${WhichMethodTriggersTheCreationOfAPrivateMethod?}
-
-
-
-
-
-
- How are private methods to private methods to private methods created in this class ?
-
-
-
-
-
-
-
-
- numberBranchNumberBranchNumberQQ${InWhatMethod?}QQ${WhichMethodTriggersTheCreationOfAPrivateMethod?}
-
-
-
-
-
- Example:
-
-
- firstQQ${InWhatMethod?}QQ${WhichMethodTriggersTheCreationOfAPrivateMethod?}
-
-
-
-
- firstBranchOneQQ${InWhatMethod?}QQ${WhichMethodTriggersTheCreationOfAPrivateMethod?}
-
-
-
-
-
-
- firstBranchOneBranchOneQQ${InWhatMethod?}QQ${WhichMethodTriggersTheCreationOfAPrivateMethod?}
-
-
-
-
- Minimum and maximum two 'QQ' - needed as a separator that helps to quickly understand what this method does