What the structure of large Java projects would look like

Asked

Viewed 242 times

-1

In small web projects, we usually separate packages into DAO, Models and Controllers, but into large systems of the type ERP, with hundreds of tables, controllers and business logics, what this structure would look like?

  • 1

    If the project is small those things you quoted are just cannons to kill little bird. Some modern designs (made by real engineers who don’t just do it because everyone else is doing it) no longer use these things in large projects when they don’t make sense for that project. So the question already starts from wrong premise. , or at least bad. Maybe and only maybe the big one shows how crazy it is to make such a complex architecture. In the small only seems to be quiet because it is so small that gives almost in the same, after all the person only copies and glue things.

  • @Maniero the meaning of the question is of how the structuring of these projects would be. It is only a doubt. Of course it would not make sense to use this for a small project just for fashion.

1 answer

3

Depends on the architecture, which depends on the requirements

The answer is independent of the language, note that it could be C# or other, given that the concepts cited as DAO, Models and Controllers (imagined MVC), are not specific, own or unique to software developed in Java.

DAO, for example, is an instrument to implement the persistence layer of software (wikipedia), as well as the Repository pattern (this question Stackoverflow clarifies the difference between the two). That is, they are possible strategies to deal with data access. The use (which one to employ?), however, or the indication, will depend on the context (none of them is absolutely better than the other).

The question focuses on the architecture of the software, which in turn depends on the requirements of the software in question. Note that if you use a micro-service-based architecture, for example, it is possible that you no longer have "hundreds of tables" but a smaller number per micro-service, which may allow different approaches per micro-service.

Anyway, if you look at some of your Github projects, you’ll probably find that each one has a different architecture than the others, maybe some make use of DAO, for example, while others don’t.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.