Giter Site home page Giter Site logo

cleancodecasestudy's People

Contributors

sdegutis avatar slagyr avatar unclebob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cleancodecasestudy's Issues

Dependency Rule: UseCase depends on the ViewModel

The OutputBoundaries depend on their respective ViewModels.
As a result the UseCase component will also depend on the ViewModel, though it doesn't really need to.

What are some acceptable remedies here?
So far I see:

  1. Change the return type of OutputBoundary#getViewModel() to the generic Object, use unit tests on the Presenter to satisfy doubts.
  2. Add an empty ViewModelInterface for each UseCase component to be depended on by the OutputBoundary, UseCaseInteractor and the Controller while the Presenter uses the implementation directly.
  3. Make a single empty ViewModel interface (set as immutable/sealed if possible) to be referred to in all the UseCase component. All ViewModels implement that interface and the rest is as above in # 2.

ViewTemplate.create(String) uses non-portable code to read template file, fails on Windows

Exception in thread "pool-1-thread-2" java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/Brad/Projects/CleanCodeCaseStudy/target/test-classes/html/frontpage.html at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92) at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229) at java.base/java.nio.file.Path.of(Path.java:147) at java.base/java.nio.file.Paths.get(Paths.java:69) at cleancoderscom.view.ViewTemplate.create(ViewTemplate.java:13) at cleancoderscom.usecases.codecastSummaries.CodecastSummariesViewImpl.toHTML(CodecastSummariesViewImpl.java:13) at cleancoderscom.usecases.codecastSummaries.CodecastSummariesViewImpl.generateView(CodecastSummariesViewImpl.java:42) at cleancoderscom.usecases.codecastSummaries.CodecastSummariesController.handle(CodecastSummariesController.java:24) at cleancoderscom.http.Router.route(Router.java:20) at cleancoderscom.utilities.Main.lambda$main$0(Main.java:35) at cleancoderscom.socketserver.SocketServer$1$1.run(SocketServer.java:33) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)

Not sure if you want a PR for this as it would have to apply to all the commits all the way down. :)

Dependency Rule is Violated

@unclebob Is it not true that all the arrows should point inward?

image

In this codebase, I see that CodecastDetailsUseCase (in package cleancoderscom.usecases) imports cleancoderscom.Context, which in turn imports cleancoderscom.gateways.CodecastGateway (from package cleancoderscom.gateways).

Therefore, doesn't the Use Case layer import from the Gateway layer, which violates the dependency rule?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.