#1086 Implement microkernel architecture pattern #1237
Conversation
| @@ -0,0 +1,78 @@ | |||
| --- | |||
| layout: pattern | |||
| title: microkernel architecture | |||
iluwatar
May 31, 2020
Owner
Suggested change
title: microkernel architecture
title: Microkernel Architecture
| title: microkernel architecture | |
| title: Microkernel Architecture |
| ## Consequences | ||
| The Microkernel pattern offers some important **benefits**: | ||
| - Portability | ||
| - Flexibility and Extensibility |
iluwatar
May 31, 2020
Owner
Suggested change
- Flexibility and Extensibility
- Flexibility and extensibility
| - Flexibility and Extensibility | |
| - Flexibility and extensibility |
| - Portability | ||
| - Flexibility and Extensibility | ||
| - Separation of policy and mechanism | ||
| - Scakability |
iluwatar
May 31, 2020
Owner
Suggested change
- Scakability
- Scalability
| - Scakability | |
| - Scalability |
| package com.iluwatar.microkernel; | ||
|
|
||
| import com.iluwatar.microkernel.clients.Client; | ||
|
|
iluwatar
May 31, 2020
Owner
Please add here a brief explanation how this example implements the pattern. See the other patterns in the repository for examples.
Please add here a brief explanation how this example implements the pattern. See the other patterns in the repository for examples.
| */ | ||
| public static void main(String[] args) { | ||
|
|
||
| Client client = new Client(); |
iluwatar
May 31, 2020
Owner
We can use Java 11 var here
We can use Java 11 var here
iluwatar
May 31, 2020
Owner
Check this throughout the code and utilize the new language features
Check this throughout the code and utilize the new language features
| */ | ||
| public class Adapter { | ||
|
|
||
| private BudgetMicrokernel microkernel; |
iluwatar
May 31, 2020
Owner
Use final keyword
Use final keyword
iluwatar
May 31, 2020
Owner
Check this elsewhere too. Make the members final if they are not modified after the initialization.
Check this elsewhere too. Make the members final if they are not modified after the initialization.
mookkiah
Oct 12, 2020
Contributor
@iluwatar Is it a good idea to request authors as part of PR template to sonarqube lint tools to verify locally for avoid critical issues? This gives opportunity for the developer to look at smaller issues as well.
@iluwatar Is it a good idea to request authors as part of PR template to sonarqube lint tools to verify locally for avoid critical issues? This gives opportunity for the developer to look at smaller issues as well.
iluwatar
Nov 8, 2020
Owner
In principle yes, but I'm afraid it makes creating pull requests more complicated. It would be great if the CI build could check for Sonarqube issues in the incoming changed code. Not sure if Sonarcloud can be configured to do that..
In principle yes, but I'm afraid it makes creating pull requests more complicated. It would be great if the CI build could check for Sonarqube issues in the incoming changed code. Not sure if Sonarcloud can be configured to do that..
|
|
||
| private void executeService() { | ||
| double income = calculateForecast(this.incomes); | ||
| System.out.println("The next income forecast: " + income); |
iluwatar
May 31, 2020
Owner
Please use a logger component for output
Please use a logger component for output
| * @param accounts as all registered accounts | ||
| */ | ||
| public BudgetMicrokernel(Map<Integer, Account> accounts) { | ||
| this.accounts = Objects.requireNonNullElseGet(accounts, HashMap::new); |
iluwatar
May 31, 2020
Owner
this keyword is unnecessary
this keyword is unnecessary
| } | ||
|
|
||
| @Test | ||
| void receiveRequest() { |
iluwatar
May 31, 2020
Owner
Please use meaningful names for the tests, so it becomes self-explanatory what they do
Please use meaningful names for the tests, so it becomes self-explanatory what they do
|
There is a conflict preventing merge. |
|
@RudolfBun let me know when the PR is ready for another review. |
|
@RudolfBun The pull request has remained inactive and is about to be closed. Please comment if you're still working on it. |
Pull request
Microkernel architecture pattern implementation
The related issue: #1086