Question about Clean Architecture /u/Icy-Manufacturer7319 CSCQ protests reddit

In Clean Architecture, why we do something like this:

my-project/

├── models/

│ └── user.java

│ └── product.java

├── repositories/ #fetch database

│ └── userRepository.java

│ └── productRepository.java

├── service/ #business logic

│ └── userService.java

│ └── productService.java

rather than this:

my-project/

├── user/

│ └── userModel.java

│ └── userRepository.java
│ └── userService.java

├── product/

│ └── productModel.java

│ └── productRepository.java
│ └── productService.java

I think the second one easier to maintain cus every code in a file there related to each other, the folder are whole entity but not violate clean architecture cus still isolated. I just think using first approach just too much work if your project got bigger, navigate between folder that contain lots of entity, make me confused and cant focus to just 1 entity😭

submitted by /u/Icy-Manufacturer7319
[link] [comments]

​r/cscareerquestions In Clean Architecture, why we do something like this: my-project/ │ ├── models/ │ └── user.java │ └── product.java │ ├── repositories/ #fetch database │ └── userRepository.java │ └── productRepository.java │ ├── service/ #business logic │ └── userService.java │ └── productService.java rather than this: my-project/ │ ├── user/ │ └── userModel.java │ └── userRepository.java │ └── userService.java │ ├── product/ │ └── productModel.java │ └── productRepository.java │ └── productService.java I think the second one easier to maintain cus every code in a file there related to each other, the folder are whole entity but not violate clean architecture cus still isolated. I just think using first approach just too much work if your project got bigger, navigate between folder that contain lots of entity, make me confused and cant focus to just 1 entity😭 submitted by /u/Icy-Manufacturer7319 [link] [comments] 

In Clean Architecture, why we do something like this:

my-project/

├── models/

│ └── user.java

│ └── product.java

├── repositories/ #fetch database

│ └── userRepository.java

│ └── productRepository.java

├── service/ #business logic

│ └── userService.java

│ └── productService.java

rather than this:

my-project/

├── user/

│ └── userModel.java

│ └── userRepository.java
│ └── userService.java

├── product/

│ └── productModel.java

│ └── productRepository.java
│ └── productService.java

I think the second one easier to maintain cus every code in a file there related to each other, the folder are whole entity but not violate clean architecture cus still isolated. I just think using first approach just too much work if your project got bigger, navigate between folder that contain lots of entity, make me confused and cant focus to just 1 entity😭

submitted by /u/Icy-Manufacturer7319
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *