Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented Monolithic Architecture according to the guidelines provided by issue #2664 #3111

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

MohanedAtef238
Copy link

What problem does this PR solve?

this PR relates to issue #2664, it contains an example for the Monolithic Architecture using MVC file structure, it also builds upon the previously abandoned code and uses a couple of time saving utilities such as Spring Data JPA and Mockito.

…ructure, and added basic model files using H2 database since its light and efficient
…ructure, and added basic model files using H2 database since its light and efficient
# Conflicts:
#	Monolithic-Ecommerce/src/main/java/com/iluwatar/monolithic/model/Orders.java
#	Monolithic-Ecommerce/src/main/java/com/iluwatar/monolithic/model/Products.java
#	Monolithic-Ecommerce/src/main/java/com/iluwatar/monolithic/model/User.java
…asses and used the CLI main class from the previous submission and enhanced upon it
Added Detailed Readme File in the md format
@MohanedAtef238
Copy link
Author

I am aware of the 40% coverage i'll be adding more test cases and submitting another PR

@@ -0,0 +1,126 @@
## Monolithic-Ecommerce App
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README.md has a specific structure that each example needs to implement. See here: https://github.com/iluwatar/java-design-patterns/wiki/01.-How-to-contribute

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could use monolithic-architecture as the folder/module name?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll revise them as soon as possible

</dependency>
</dependencies>
</project>

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include maven-assembly-plugin so that we can execute the app from the command line. See other patterns for examples.

Comment on lines 40 to 42
/**
* Main entry point for the Monolithic E-commerce application.
*/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain monolithic architecture brieftly. Describe how the code example implements it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought i went over it as much as i could in the Readme file but i'll include a brief introduction here as well

Comment on lines 56 to 59
User user = userRepository.findById(userId).orElse(null);
if (user == null) {
throw new NonExistentUserException("User with ID " + userId + " not found");
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could use orElseThrow in this situation?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes a lot more sense, I'll revise the code to make sure no other statements stand out like this

MohanedAtef238 and others added 3 commits December 20, 2024 11:39
Renamed the main module/directory. Added more content to the readme.md file. fixed the orElseThrow statements

Fixes

Renamed the main module/directory. Added more content to the readme.md file. fixed the orElseThrow statements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants