Giter VIP home page Giter VIP logo

clean-go's People

Contributors

captaincodeman avatar jbspeakr 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

clean-go's Issues

Add more domain type

I am trying to understand how to implement clean architecture.

Is there a chance that you add another domain example not just for Greeting domain?

Thanks

Note on Dependency Injection

Thanks for this example, it's really great.

I would like to comment one thing though, namely the section about Dependency Injection.

You state that dependency injection is not always necessary, you even say one doesn't need it and say something about runtime performance costs.

The fact is though, that there are examples of dependency injection in this project as well, like the one here.

Dependency injection is almost always necessary to adhere the Dependency Inversion Principle which is one of the key pillars of Clean Architecture. It's the moment when you pass a set of dependencies from the outside to your object instead of creating them inside (thus avoiding hard coupling between them).

It is true that you can do dependency injection manually, but at certain level it can become cumbersome.

I believe you meant to say dependency injection containers (which would make perfect sense for most of this section).

I would also argue with the runtime performance hit point. Clearly dependency injection frameworks/containers always use some sort of hacky way to make DI user friendly, but that cost is usually paid at the very beginning of the application initialization and does not affect the runtime performance.

(I have to admit that I haven't worked much with Java or .NET, so I'm not familiar with their DIC solutions, but I'm pretty sure the situation is still much better than in case of script languages where initialization happens for each request and to make things faster production builds "compile" the container to avoid rebuilding the dependency tree for every request)

using engine/internal for domain entities

Wouldn't it make sense to move the domain package to engine/internal?

When the go command sees an import of a package with internal in its path, it verifies that the package doing the import is within the tree rooted at the parent of the internal directory.

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.