0
So what do so think of as classic? Pojo means "plain old Java object". You can literally not get more classic than that. The opposite of Pojo is "class implementing stuff from my fancy framework". For whatever framework that may be.
31st Oct 2017, 1:38 AM
1of3
1of3 - avatar
0
As I understand it you use some DAOs to send/retrieve Pojos to/from the db. Actually, there is no proper definition of Pojo. It's not a scientific term or anything. Pojo is a nickname for model or domain objects as they are otherwise called: The things your program is about. If your program is about books you probably have a class Book. And the Book should have all the functionality it needs to be a book. The reason you factor out the db access is that it's not an inherent part of Book or whatever. (Although other schools of thought will disagree about that.) So there are only two kinds of things here: The model classes your program is about and utility classes providing db functionality. The only reason not to put the business logic in the model classes, is changing the logic while keeping the model.
31st Oct 2017, 11:24 AM
1of3
1of3 - avatar