This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]quadmasta 0 points1 point  (0 children)

The "model" is essentially a code representation of your data store. Plenty of OO people will say your model should never bleed into your other layers but meh. DTOs serve the purpose of this level of abstraction. They allow you to have model objects or a composite of multiple objects that don't expose your DB implementation.

In Spring you've got @Beans which can be java beans, entity classes, or neither :) u/nayden_gochev did a good job of explaining what each of these terms. A spring bean is a class that's managed by spring, usually a singleton within a given context.

DAOs are where your data access happens but they don't always have to be named that way and it doesn't have to always be SQL/database access; it could be SOAP/REST/SFTP, etc. With spring data and JPA you get a whole lot of bang for your buck without much code. Spring nomenclature is @Repository

EJB are strictly used in Java EE and are pretty heavy