Giter Club home page Giter Club logo

Comments (2)

wojtekmach avatar wojtekmach commented on May 25, 2024

My current rule of thumb is to extract an app if:

a) it doesn't seem app specific and it's reasonable to have it as Hex package (even if it never gets OSSed)
b) I want to deploy it separately and/or it has separate storage

So for AcmeBank good candidates for separate apps would be some 3rd party service wrappers (that could be Hex packages eventually) or maybe FraudDetector that does some ML stuff off DB (probably bypassing Ecto). That being said, I have apps/auth which does not fit either of these criteria and looking back, I think this extraction was a bit premature. Especially that in theory it has separate Repo from Bank and the schemas are not associated in any way, but in practice in both dev and "prod" it ends up running on the same PG db.

Another angle is to look what logic I consider unique to my app, what's really the value added (that I'd keep in core OTP app) and what's still needed but not quite my core competency (apps/messenger is a good example of that). To answer your question, I probably would not split up business logic into separate apps unless you can draw a really clear line and in the meantime use good code organisation within one OTP app to keep it well organised maintainable.

from acme_bank.

overture8 avatar overture8 commented on May 25, 2024

Thanks @wojtekmach - that makes sense. Thanks for the lightning fast reply :)

from acme_bank.

Related Issues (16)

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.