library_architecture_mvvm_modify 6.1.2
library_architecture_mvvm_modify: ^6.1.2 copied to clipboard
MVVM Modify for Dart but you can also port to another language
Getting Starting #
- Why Did I Create Software Architecture
- Example
- Template For LAMM
- Documentation
- Design Patterns
- Theory of Balance in Software Architecture
Why Did I Create Software Architecture #
- Everything starts with a problem, and problems give rise to solutions or technologies.
- Let's start with the fact that modern architectures do not provide a clear explanation:
-
- How classes, methods, and variables should be named ?
-
- How many objects are needed to update data in the view ?
-
- Where exactly the logic should be when a certain widget is selected in the view, and how this should be implemented ?
-
- Also, how the logic should be written, and how the logic itself is written in the VM ? (I mean that after each if, a return should be specified, and if it's a loop, then continue or break depending on the situation, and this is also done in the VM, but with the addition that after each if a method is created to continue the chain of logic, thus making the code more readable, and the readability of the code is measured in a science like psychology, which studies how our brain perceives information. For example: Gestalt Theory).
-
- Where and how constants should be stored to be structured and understandable ?
-
- Through whom we need to share data between VMs ?
Example #
Template For LAMM #
- How should I create projects on this architecture? (Github Template)
Documentation #
- But before reading the documentation, please read the entire example
Architectural Objects #
- In 'Architectural Objects' includes only those classes that can be refactored or inherited
- Name - [Refactoring | Inheritance]:
-
- NamedUtility - Refactoring
-
- NamedVM - Refactoring
-
- DataForNamed - Refactoring
-
- EnumDataForNamed - Refactoring
-
- ModelTTNamed[TTNamed]TTNamedTTIterator - Refactoring
-
- NamedException - Inheritance
-
- NamedState - Inheritance
-
- NamedStreamWState - Inheritance
-
- Model - Inheritance
-
- ListModel - Inheritance
-
- NamedService - Inheritance
-
- ModelWrapper - Inheritance
-
- ListModelWrapper - Inheritance
-
- ModelWrapperRepository - Inheritance
-
- IDispose - Inheritance
NamedUtility
Knows about: NamedVM, DataForNamed, EnumDataForNamed, ModelTTNamed[TTNamed]TTNamedTTIterator, NamedException, NamedState, NamedStreamWState, Model, ListModel, NamedService, ModelWrapper, ListModelWrapper, ModelWrapperRepository, TempCacheProvider, ExceptionController, Result, ResultWithModelWrapper, ResultWithListModelsWrapper, CurrentModelWIndex, IDispose
Rules
- Forbidden words:
-
- And
-
- Or
-
- Where
-
- For
-
- From
-
- Parameter/Parameters
- Alternative to forbidden words:
-
- W
- Exception to forbidden words in some situations (
):
-
And
- Global variables name:
-
- Name length - no more than 100 characters
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Local variables name:
-
- No Prefix:
-
-
- get
-
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Use try/catch (Yes/No):
-
- Yes
- Class Types:
-
- KeysNamedServiceUtility - a class that stores keys for a particular service:
-
-
- Global variables name (constants):
-
-
-
-
- Name length - infinite
-
-
-
-
-
- NamedQQNamedFirst(QQNamedSecond):
-
-
-
-
-
-
- () - optional
-
-
-
-
-
-
-
- Named - some kind of class
-
-
-
-
-
-
-
- NamedFirst - variable of this class
-
-
-
-
-
-
-
- (QQNamedSecond) - if there is already one, then you can add a detailed description, or add it even if there is no such one
-
-
-
-
-
-
- Example:
-
-
-
-
-
-
- iPAddressQQIpQQJsonipAPI
-
-
-
-
- KeysNamedUtility - a class that stores keys for anything (depending on your abstract thinking):
-
-
- Global variables name (constants):
-
-
-
-
- Name length - infinite
-
-
-
-
-
- Named(QQNamedFirst)(QQNamedSecond):
-
-
-
-
-
-
- () - optional
-
-
-
-
-
-
-
- Named - anything you like (
)
- Named - anything you like (
-
-
-
-
-
-
-
- (QQNamedFirst) - anything you like (
)
- (QQNamedFirst) - anything you like (
-
-
-
-
-
-
-
- (QQNamedSecond) - anything you like (
)
- (QQNamedSecond) - anything you like (
-
-
-
-
-
-
- Example:
-
-
-
-
-
-
- DataWAntiDDosSystemVMQQGetExceptionInStringWNotEqualsWCodeAndInputCode
-
-
-
-
- NamedUtility - it could be anything:
-
-
- TimerUtility, InsertUserUtility, etc...
-
- Methods names:
-
- 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 (
)
- (WhereNamed) - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- 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 (
)
- (WhereNamed) - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- Method name length - no more than 100 characters (if more than 100, then use numbers (Example - operationOtherModelWhereNamedFromOneParameterOne))
-
-
-
-
-
- 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 (
)
- isWhereNamed - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- 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]
-
-
NamedVM
Knows about: NamedUtility, DataForNamed, EnumDataForNamed, ModelTTNamed[TTNamed]TTNamedTTIterator, NamedException, NamedState, NamedStreamWState, Model, ListModel, ModelWrapper, ListModelWrapper, ModelWrapperRepository, TempCacheProvider, ExceptionController, Result, ResultWithModelWrapper, ResultWithListModelsWrapper
Rules
- Forbidden words:
-
- And
-
- Or
-
- Where
-
- For
-
- From
-
- Parameter/Parameters
- Alternative to forbidden words:
-
- W
- Exception to forbidden words in some situations (
):
-
And
- Global variables name:
-
- Name length - no more than 100 characters
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Local variables name:
-
- No Prefix:
-
-
- get
-
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Use try/catch (Yes/No):
-
- No
- A 'NamedVM' called from another 'NamedVM' will be named by its 'Named' as a prefix of 'NamedEENamedVM', and the directories will also be located::
-
- UserVM
-
-
- UserEEListMovieVM
-
-
-
-
- UserEEListMovieEEDetailsMovieVM
-
-
-
-
-
-
- UserEEListMoviesEEDetailsMovieEEActorsVM
-
-
-
- Private methods that are called in the callback:
-
- Summary in the form of variables: | Example: | Explanation:
-
-
- Summary in the form of variables:
-
-
-
-
- ${In which callback did this start ?}YY${What does this method do ?}
-
-
-
-
- Example:
-
-
-
-
- onPressedYYAddTask
-
-
-
-
-
- callbackYYListenUser
-
-
-
-
- Explanation:
-
-
-
-
- The methods created in this way allow us to understand who created this method
-
-
-
-
-
- Minimum and maximum one 'YY' - needed as a separator that helps to quickly understand what this method does
-
-
- Private methods that are invoked by other methods using if and return type 'void' (sometime 'string'):
-
- Summary in the form of variables: | Example: | Explanation:
-
-
- Summary in the form of variables:
-
-
-
-
- numberQQ${In what "method" did this madness begin ?}QQ${What "method" started this madness ?}
-
-
-
-
-
-
- numberBranchNumberQQ${In what "method" did this madness begin ?}QQ${What "method" started this madness ?}
-
-
-
-
-
-
-
-
- numberBranchNumberBranchNumberQQ${In what "method" did this madness begin ?}QQ${What "method" started this madness ?}
-
-
-
-
-
-
- Example:
-
-
-
-
- firstQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
- firstBranchOneQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
- firstBranchOneBranchOneQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
- Explanation:
-
-
-
-
- The methods created in this way allow you to write complex logic
-
-
-
-
-
- Minimum and maximum two 'QQ' - needed as a separator that helps to quickly understand what this method does
-
-
-
-
-
- 'if' create methods:
-
-
-
-
-
-
- firstQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService:
-
-
-
-
-
-
-
-
- firstBranchOneQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService:
-
-
-
-
-
-
-
-
-
-
- firstBranchOneBranchOneQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- firstBranchOneBranchTwoQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- firstBranchOneBranchThreeQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
- firstBranchTwoQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService:
-
-
-
-
-
-
-
-
-
-
- firstBranchTwoBranchOneQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- firstBranchTwoBranchTwoQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- firstBranchTwoBranchThreeQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
- firstBranchThreeQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService:
-
-
-
-
-
-
-
-
-
-
- firstBranchThreeBranchOneQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- firstBranchThreeBranchTwoQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- firstBranchThreeBranchThreeQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
- secondQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService:
-
-
-
-
-
-
-
-
- secondBranchOneQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService:
-
-
-
-
-
-
-
-
-
-
- secondBranchOneBranchOneQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- secondBranchOneBranchTwoQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- secondBranchOneBranchThreeQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
- secondBranchTwoQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService:
-
-
-
-
-
-
-
-
-
-
- secondBranchTwoBranchOneQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- secondBranchTwoBranchTwoQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- secondBranchTwoBranchThreeQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
- secondBranchThreeQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService:
-
-
-
-
-
-
-
-
-
-
- secondBranchThreeBranchOneQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- secondBranchThreeBranchTwoQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- secondBranchThreeBranchThreeQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
- thirdQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService:
-
-
-
-
-
-
-
-
- thirdBranchOneQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService:
-
-
-
-
-
-
-
-
-
-
- thirdBranchOneBranchOneQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- thirdBranchOneBranchTwoQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- thirdBranchOneBranchThreeQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
- thirdBranchTwoQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService:
-
-
-
-
-
-
-
-
-
-
- thirdBranchTwoBranchOneQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- thirdBranchTwoBranchTwoQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- thirdBranchTwoBranchThreeQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
- thirdBranchThreeQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService:
-
-
-
-
-
-
-
-
-
-
- thirdBranchThreeBranchOneQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- thirdBranchThreeBranchTwoQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
-
-
-
-
-
-
- thirdBranchThreeBranchThreeQQFirstRequestQQGetIPAddressWhereJsonipAPIParameterHttpClientService
-
-
-
-
-
DataForNamed
Knows about: NamedUtility, EnumDataForNamed, ModelTTNamed[TTNamed]TTNamedTTIterator, NamedException, Model, ListModel, ExceptionController
Rules
- Forbidden words:
-
- And
-
- Or
-
- Where
-
- For
-
- From
-
- Parameter/Parameters
- Alternative to forbidden words:
-
- W
- Exception to forbidden words in some situations (
):
-
And
- Global variables name:
-
- Name length - no more than 100 characters
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Local variables name:
-
- No Prefix:
-
-
- get
-
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Use try/catch (Yes/No):
-
- No
- Under what conditions are methods created ?:
-
- Void:
-
-
- When one variable interacts with itself
-
-
-
- When 2+ variables interact with each other
-
-
-
- When necessary to use loops: 'for', 'while', 'do while'
-
- Methods names:
-
- 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 (
)
- (WhereNamed) - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- 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 (
)
- (WhereNamed) - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- Method name length - no more than 100 characters (if more than 100, then use numbers (Example - operationOtherModelWhereNamedFromOneParameterOne))
-
-
-
-
-
- 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 (
)
- isWhereNamed - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- 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]
-
-
EnumDataForNamed
Knows about: -
ModelTTNamed[TTNamed]TTNamedTTIterator
Knows about: NamedUtility, Model, CurrentModelWIndex
Rules
- Forbidden words:
-
- And
-
- Or
-
- Where
-
- For
-
- From
-
- Parameter/Parameters
- Alternative to forbidden words:
-
- W
- Exception to forbidden words in some situations (
):
-
And
- Global variables name:
-
- Name length - no more than 100 characters
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Local variables name:
-
- No Prefix:
-
-
- get
-
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Use try/catch (Yes/No):
-
- No
- ModelTTNamed[TTNamed]TTNamedTTIterator
-
- [] - if available
-
- First 'TT', this is a 'Where'
-
- Second 'TT' this is a 'From'
-
- Third 'TT' this is a 'Parameter/Parameters'
-
- Fourth 'TT' it's just the end
NamedException
Knows about: NamedUtility
Rules
- Forbidden words:
-
- And
-
- Or
-
- Where
-
- For
-
- From
-
- Parameter/Parameters
- Alternative to forbidden words:
-
- W
- Exception to forbidden words in some situations (
):
-
And
- Global variables name:
-
- Name length - no more than 100 characters
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Local variables name:
-
- No Prefix:
-
-
- get
-
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Use try/catch (Yes/No):
-
- No
- Inherit the base class 'BaseException':
-
- LocalException
-
- NetworkException
NamedState
Knows about: NamedUtility, DataForNamed, NamedException, IDispose
Rules
- Forbidden words:
-
- And
-
- Or
-
- Where
-
- For
-
- From
-
- Parameter/Parameters
- Alternative to forbidden words:
-
- W
- Exception to forbidden words in some situations (
):
-
And
- Global variables name:
-
- Name length - no more than 100 characters
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Local variables name:
-
- No Prefix:
-
-
- get
-
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Use try/catch (Yes/No):
-
- No
- Inherit the base class 'BaseNamedState':
-
- DefaultState
NamedStreamWState
Knows about: NamedUtility, DataForNamed, NamedException, IDispose
Rules
- Forbidden words:
-
- And
-
- Or
-
- Where
-
- For
-
- From
-
- Parameter/Parameters
- Alternative to forbidden words:
-
- W
- Exception to forbidden words in some situations (
):
-
And
- Global variables name:
-
- Name length - no more than 100 characters
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Local variables name:
-
- No Prefix:
-
-
- get
-
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Use try/catch (Yes/No):
-
- No
- Inherit the base class 'BaseNamedStreamWState':
-
- DefaultStreamWState
Model
Knows about: NamedUtility
Rules
- Forbidden words:
-
- And
-
- Or
-
- Where
-
- For
-
- From
-
- Parameter/Parameters
- Alternative to forbidden words:
-
- W
- Exception to forbidden words in some situations (
):
-
And
- Global variables name:
-
- Name length - no more than 100 characters
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Local variables name:
-
- No Prefix:
-
-
- get
-
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Use try/catch (Yes/No):
-
- No
- Inheritance classes:
-
- Names of inherited classes:
-
-
- ModelNumber:
-
-
-
-
- Model - The name of the model itself:
-
-
-
-
-
-
- User, Movie, etc...
-
-
-
-
-
-
- Number:
-
-
-
-
-
-
- First, Second, Third, etc...
-
-
-
-
- Inheritance goes along one branch:
-
-
- User -> UserFirst -> UserSecond -> UserThird
-
-
- When inheriting, we also inherit:
-
-
- ListModel
-
-
-
- ModelWrapper
-
-
-
- ListModelWrapper
-
-
-
- ModelWrapperRepository
-
- Under what conditions are methods created ?:
-
- Void:
-
-
- When one variable interacts with itself
-
-
-
- When 2+ variables interact with each other
-
-
-
- When necessary to use loops: 'for', 'while', 'do while'
-
- Methods names:
-
- 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 (
)
- (WhereNamed) - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- 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]
-
-
-
-
- getModel(WhereNamed)[FromNamed]
-
-
-
-
- () - optional
-
-
-
-
-
- [] - if available
-
-
-
-
-
- getModel - when we return an object of our own class
-
-
-
-
-
- (WhereNamed) - describe in as much detail as possible what this method does (
)
- (WhereNamed) - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- Method name length - no more than 100 characters (if more than 100, then use numbers (Example - getModelWhereNamedFromOne))
-
-
-
-
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
-
-
-
-
-
- Local variable name - model(WhereNamed)[FromNamed]
-
-
-
- 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 (
)
- (WhereNamed) - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- Method name length - no more than 100 characters (if more than 100, then use numbers (Example - operationOtherModelWhereNamedFromOneParameterOne))
-
-
-
-
-
- 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 (
)
- isWhereNamed - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- 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
Knows about: NamedUtility, ModelTTNamed[TTNamed]TTNamedTTIterator, Model
Rules
- Forbidden words:
-
- And
-
- Or
-
- Where
-
- For
-
- From
-
- Parameter/Parameters
- Alternative to forbidden words:
-
- W
- Exception to forbidden words in some situations (
):
-
And
- Global variables name:
-
- Name length - no more than 100 characters
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Local variables name:
-
- No Prefix:
-
-
- get
-
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Use try/catch (Yes/No):
-
- No
- Inheritance classes:
-
- Names of inherited classes:
-
-
- ListModelNumber:
-
-
-
-
- ListModel - The name of the model itself:
-
-
-
-
-
-
- ListUser, ListMovie, etc...
-
-
-
-
-
-
- Number:
-
-
-
-
-
-
- First, Second, Third, etc...
-
-
-
-
- Inheritance goes along one branch:
-
-
- ListUser -> ListUserFirst -> ListUserSecond -> ListUserThird
-
-
- When inheriting, we also inherit:
-
-
- Model
-
-
-
- ModelWrapper
-
-
-
- ListModelWrapper
-
-
-
- ModelWrapperRepository
-
- Methods names:
-
- 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 (
)
- (WhereNamed) - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- 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 (
)
- (WhereNamed) - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- Method name length - no more than 100 characters (if more than 100, then use numbers (Example - operationOtherModelWhereNamedFromOneParameterOne))
-
-
-
-
-
- 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 (
)
- isWhereNamed - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- 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]
-
-
NamedService
Knows about: NamedUtility, NamedException
Rules
- Forbidden words:
-
- And
-
- Or
-
- Where
-
- For
-
- From
-
- Parameter/Parameters
- Alternative to forbidden words:
-
- W
- Exception to forbidden words in some situations (
):
-
And
- Global variables name:
-
- Name length - no more than 100 characters
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Local variables name:
-
- No Prefix:
-
-
- get
-
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Use try/catch (Yes/No):
-
- Yes
- Inheritance classes:
-
- Names of inherited classes:
-
-
- NamedNamedTwo:
-
-
-
-
- Named:
-
-
-
-
-
-
- Default, Timeout, etc...
-
-
-
-
-
-
- NamedTwo:
-
-
-
-
-
-
- HttpClient, SharedPreferences, etc...
-
-
-
-
-
- NamedNamedTwoService:
-
-
-
-
- Named:
-
-
-
-
-
-
- Default, Timeout, etc...
-
-
-
-
-
-
- NamedTwoService:
-
-
-
-
-
-
- HttpClientService, SharedPreferencesService, etc...
-
-
-
-
- Inheritance across different branches:
-
-
- BaseNamedHttpClient -> DefaultHttpClient
-
-
-
- BaseNamedHttpClient -> TimeoutHttpClient
-
-
-
- BaseNamedHttpClientService -> DefaultHttpClientService
-
-
-
- BaseNamedHttpClientService -> TimeoutHttpClientService
-
- Methods names:
-
- 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 (
)
- (WhereNamed) - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- 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 (
)
- (WhereNamed) - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- Method name length - no more than 100 characters (if more than 100, then use numbers (Example - operationOtherModelWhereNamedFromOneParameterOne))
-
-
-
-
-
- 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 (
)
- isWhereNamed - describe in as much detail as possible what this method does (
-
-
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
-
-
- [ParameterNamed] - what global variables were used (
)
- [ParameterNamed] - what global variables were used (
-
-
-
-
-
- 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]
-
-
ModelWrapper
Knows about: NamedUtility, Model
Rules
- Forbidden words:
-
- And
-
- Or
-
- Where
-
- For
-
- From
-
- Parameter/Parameters
- Alternative to forbidden words:
-
- W
- Exception to forbidden words in some situations (
):
-
And
- Local variables name:
-
- No Prefix:
-
-
- get
-
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Use try/catch (Yes/No):
-
- No
- Inheritance classes:
-
- Names of inherited classes:
-
-
- ModelWrapperNumber:
-
-
-
-
- ModelWrapper:
-
-
-
-
-
-
- UserWrapper, MovieWrapper, etc...
-
-
-
-
-
-
- Number:
-
-
-
-
-
-
- First, Second, Third, etc...
-
-
-
-
- Inheritance goes along one branch:
-
-
- UserWrapper -> UserWrapperFirst -> UserWrapperSecond -> UserWrapperThird
-
-
- When inheriting, we also inherit:
-
-
- Model
-
-
-
- ListModel
-
-
-
- ListModelWrapper
-
-
-
- ModelWrapperRepository
-
ListModelWrapper
Knows about: NamedUtility, Model, ListModel, ModelWrapper
Rules
- Forbidden words:
-
- And
-
- Or
-
- Where
-
- For
-
- From
-
- Parameter/Parameters
- Alternative to forbidden words:
-
- W
- Exception to forbidden words in some situations (
):
-
And
- Local variables name:
-
- No Prefix:
-
-
- get
-
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Use try/catch (Yes/No):
-
- No
- Inheritance classes:
-
- Names of inherited classes:
-
-
- ListModelWrapperNumber:
-
-
-
-
- ListModelWrapper:
-
-
-
-
-
-
- ListUserWrapper, ListMovieWrapper, etc...
-
-
-
-
-
-
- Number:
-
-
-
-
-
-
- First, Second, Third, etc...
-
-
-
-
- Inheritance goes along one branch:
-
-
- ListUserWrapper -> ListUserWrapperFirst -> ListUserWrapperSecond -> ListUserWrapperThird
-
-
- When inheriting, we also inherit:
-
-
- Model
-
-
-
- ListModel
-
-
-
- ModelWrapper
-
-
-
- ModelWrapperRepository
-
ModelWrapperRepository
Knows about: NamedUtility, NamedException, NamedService, ModelWrapper, ListModelWrapper, Result, ResultWithModelWrapper, ResultWithListModelsWrapper, IDispose
Rules
- Forbidden words:
-
- And
-
- Or
-
- Where
-
- For
-
- From
-
- Parameter/Parameters
- Alternative to forbidden words:
-
- W
- Exception to forbidden words in some situations (
):
-
And
- Global variables name:
-
- Name length - no more than 100 characters
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Local variables name:
-
- No Prefix:
-
-
- get
-
-
- Regarding duplicates - at the end add 'First', 'Second', etc...
- Use try/catch (Yes/No):
-
- Yes
- Inheritance classes:
-
- Names of inherited classes:
-
-
- ModelWrapperNumberRepository:
-
-
-
-
- ModelWrapper:
-
-
-
-
-
-
- UserWrapper, MovieWrapper, etc...
-
-
-
-
-
-
- Number:
-
-
-
-
-
-
- First, Second, Third, etc...
-
-
-
-
- Inheritance goes along one branch:
-
-
- UserWrapperRepository -> UserWrapperFirstRepository -> UserWrapperSecondRepository -> UserWrapperThirdRepository
-
-
- When inheriting, we also inherit:
-
-
- Model
-
-
-
- ListModel
-
-
-
- ModelWrapper
-
-
-
- ListModelWrapper
-
- Methods names:
-
- operationModel(WhereNamed)[FromNamed]ParameterNamed:
-
-
- () - optional
-
-
-
- [] - if available
-
-
-
- operation - insert, update, delete, set, init, get, etc...
-
-
-
- Model - name model
-
-
-
- (WhereNamed) - describe in as much detail as possible what this class does (
)
- (WhereNamed) - describe in as much detail as possible what this class does (
-
-
-
- [FromNamed] - if the method has parameters, then list (
)
- [FromNamed] - if the method has parameters, then list (
-
-
-
- ParameterNamed - services and other parameters (
)
- ParameterNamed - services and other parameters (
-
-
-
- Local variable name - operationModel(WhereNamed)[FromNamed]ParameterNamed
-
IDispose
Knows about: -
Not Architectural Objects #
- In 'Not Architectural Objects' includes only those classes that cannot be refactored or inherited:
TempCacheService
Knows about: NamedException
IterationService
Knows about: -
TempCacheProvider
Knows about: TempCacheService, IterationService
ExceptionController
Knows about: NamedException
Result
Knows about: NamedException, ExceptionController
Rules
- If successful, return only the primitive type (Int, String, Bool, Double, Long, DateTime, Float, etc...)
ResultWithModelWrapper
Knows about: NamedException, ModelWrapper, ExceptionController
ResultWithListModelsWrapper
Knows about: NamedException, ListModelWrapper, ExceptionController
CurrentModelWIndex
Knows about: Model
Diagrams #
- The diagrams will show all architectural and non-architectural objects
- There will be two types of diagrams:
-
- Where everything is shown
-
- Where everything is shown except one architectural or non-architectural object
- What sections will be under each diagram where a certain architectural or non-architectural object will be missing ?:
-
- What will happen to the software architecture if this '{architectural or non-architectural object}' is removed ?
Main
- Only architectural objects know about this square.
- The arrow that is attached to the square and points to the square means that he knows about this square. He can also know about those squares that the square the arrow points to knows about
- Not-architectural objects
- Architectural objects (Inheritance)
- Architectural objects (Refactoring)
Without 'NamedUtility'
What will happen to the software architecture if this 'NamedUtility' is removed ?
- Where should we store all the constants then, and what should we call them so that everyone understands it ? And not create constants randomly wherever we want, and call them as we want
- Other objects will be deprived of help. For example: Someone will need 'Timer', or will need to provide an encryption algorithm, or provide ready-made data (static data)
Without 'NamedVM'
What will happen to the software architecture if this 'NamedVM' is removed ?
- This is the basis of the basics (root), here the UI is written, and the logic that can change the UI, and the data in this UI
Without 'DataForNamed'
What will happen to the software architecture if this 'DataForNamed' is removed ?
- The purpose of 'DataForNamed' is to provide data to the UI and change this UI depending on conditions (The UI is in 'NamedVM'). Without 'DataForNamed' all global variables and methods would have to be moved to 'NamedVM', the problem would then arise that any global variables that were not part of 'DataForNamed' could be used in the UI.
Without 'EnumDataForNamed'
What will happen to the software architecture if this 'EnumDataForNamed' is removed ?
- We will not be able to provide an easy-to-read event in the UI (Which is in 'NamedVM'). Example: 'EnumDataForNamed.authorization' and 'user.uniqueId.isNotEmpty', where is it easier to understand when the user is authorized, on the left or on the right ?
Without 'ModelTTNamed[TTNamed]TTNamedTTIterator'
What will happen to the software architecture if this 'ModelTTNamed[TTNamed]TTNamedTTIterator' is removed ?
- We won't be able to sort the list of models
Without 'NamedException'
What will happen to the software architecture if this 'NamedException' is removed ?
- We will not be able to receive detailed information about the exception in the console (In which class the exception occurred. What class is the exception. Who is to blame for this exception (Developer, device, user). Detailed message about the exception)
- We will not be able to check by the key that determines what exactly caused this exception (Server not responding, code 404, code 403, no internet, etc.)
Without 'NamedStreamWState || NamedState'
What will happen to the software architecture if this 'NamedStreamWState || NamedState' is removed ?
- We will remain without the 'Observer' pattern that updates the UI itself. This is how MVVM is implemented, I transferred it as a standard (We do not take into account 'NamedState', it was created to comply with the rule that 'NamedVM' should not know 'DataForNamed' directly, otherwise it would violate the template, and violating the template leads to a loss of simplicity)
Without 'Model'
What will happen to the software architecture if this 'Model' is removed ?
- This is in any application, and without it we will not be able to get structured data
Without 'ListModel'
What will happen to the software architecture if this 'ListModel' is removed ?
- Without it, we will not be able to manage the list of models and call various sortings.
Without 'NamedService'
What will happen to the software architecture if this 'NamedService' is removed ?
- Without this object, we will need to create an instance of the service in 'ModelWrapperRepository' each time and refactor the service implementation to another if necessary, or duplicate methods with another implementation, which will lead to meaningless copycode. For example: HttpClient will be created each time it is called, and if it is necessary to change the implementation, then it is necessary to refactor a million lines of code, or inherit methods and override with a new implementation, and if another 'NamedVM' needs another implementation, then it will be necessary to duplicate methods
Without 'ModelWrapper'
What will happen to the software architecture if this 'ModelWrapper' is removed ?
- Without this object 'ModelWrapperRepository' will lose its simplicity, namely it will know about 'Model', 'ListModel', and will be able to use their methods, and these are already algorithms. The purpose of 'ModelWrapperRepository' is to take data from the network and cache, and then give it out, and adding algorithms will complicate this object, so such a solution was invented so that every developer in the world could understand 'ModelWrapperRepository', and he did not need to click on methods to understand the whole essence of the repository method
Without 'ListModelWrapper'
What will happen to the software architecture if this 'ListModelWrapper' is removed ?
- Same as without 'ModelWrapper'
Without 'ModelWrapperRepository'
What will happen to the software architecture if this 'ModelWrapperRepository' is removed ?
- Without it, we will have to take data from the network and cache, in 'NamedVM' itself
- We will not be able to reuse and inherit code, which will lead to meaningless copycode and refactoring
Without 'IDispose'
What will happen to the software architecture if this 'IDispose' is removed ?
- Without this object, we will not be able to free resources in such objects as 'NamedStreamWState', 'NamedState', 'ModelWrapperRepository', and this in turn will lead to a memory leak
Without 'TempCacheService'
What will happen to the software architecture if this 'TempCacheService' is removed ?
- Without it, there will be no temporary data storage that lives until the end of the application, and exchanging data between 'NamedVM' will be problematic, if not impossible
Without 'IterationService'
What will happen to the software architecture if this 'IterationService' is removed ?
- Without it, we won't be able to register unique listeners for the same 'TempCacheService' key. Why is this necessary? To turn off listeners and avoid memory leaks, because if we turn off by the 'TempCacheService' key, we will turn off all listeners that are in other 'NamedVM', and if we add 'IterationService', we will turn off only those listeners that are in a specific 'NamedVM' when the 'NamedVM' is closed
Without 'TempCacheProvider'
What will happen to the software architecture if this 'TempCacheProvider' is removed ?
- 'TempCacheProvider' is a combination of 'TempCacheService' and 'IterationService', in short, without 'TempCacheService' there will be no temporary storage with which you can share data between 'NamedVM', and without 'IterationService', you will not be able to turn off 'TempCacheService' listeners, which must be turned off when closing 'NamedVM', which will eventually lead to a memory leak
Without 'ExceptionController'
What will happen to the software architecture if this 'ExceptionController' is removed ?
- Without it, there will be no wrapper for 'NamedException', and it will be necessary to manually write a null check each time to check if there is an exception
- Without it, there will be no wrapper for 'NamedException', and the developer will have access to the exception itself, which is pointless, because the exception key is available to us, and we can use it to determine what to show to the user
Without 'Result'
What will happen to the software architecture if this 'Result' is removed ?
- Without it we can't get success (Only primitive type is returned) or exception. It can combine both success and exception, where with the help of 'ExceptionController' we determine whether we have an exception or not
Without 'ResultWithModelWrapper'
What will happen to the software architecture if this 'ResultWithModelWrapper' is removed ?
- Same as with 'Result', only in success the object is 'ModelWrapper'
Without 'ResultWithListModelsWrapper'
What will happen to the software architecture if this 'ResultWithListModelsWrapper' is removed ?
- Same as with 'Result', only in success the object is 'ListModelWrapper'
Without 'CurrentModelWIndex'
What will happen to the software architecture if this 'CurrentModelWIndex' is removed ?
- Without this object, we cannot get the 'Model' object that needs to be added to the list after sorting, and the index for deleting from the list that is used in sorting (We delete until the list is empty, after which we get a new sorted list (this is in the 'ModelTTNamedTTNamedTTNamedTTIterator' object))
Design Patterns #
- Design patterns used in 'LAMM' (--Design Patterns/---Classes):
-
- Observer:
-
-
- BaseNamedStreamWState
-
-
-
- DefaultStreamWState
-
-
- Similar to 'Pub/Sub':
-
-
- TempCacheService
-
-
-
- TempCacheProvider
-
-
- Singleton:
-
-
- TempCacheService
-
-
-
- IterationService
-
-
- Factory method:
-
-
- BaseModelTTNamed[TTNamed]TTNamedTTIterator
-
-
-
- BaseException
-
-
- Prototype:
-
-
- BaseModel
-
-
-
- BaseListModel
-
-
- Similar to 'Prototype':
-
-
- BaseModelWrapper
-
-
-
- BaseListModelWrapper
-
-
- Similar to 'Adapter':
-
-
- ExceptionController
-
Theory of Balance in Software Architecture #
- It is necessary to understand which classes to inherit and which to refactor. Because if we inherit everything, we will lose a lot of time, and if we refactor everything, we will lose a lot of time.
- Conclusion: It is necessary to balance between inheritance and refactoring so as not to lose a lot of time on software development