Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Client Server Communication and Persistence Frameworks

When using Persistence frameworks like Hibernate, JPA etc. on the server side, what are the general practices of passing on the data between client and server ? Are there any existing design patterns for the same ?

Thanks.

like image 657
soontobeared Avatar asked Dec 07 '25 04:12

soontobeared


1 Answers

I do not know about patterns but I know in a design using for example EJB3 with JPA that it's not recommended to pass JPA entities to client through remote EJB's because proxies stay and it can generate a lot of useless network traffic. You'd better detach your entities or give to client simple value objects.

like image 183
Sebastien Lorber Avatar answered Dec 08 '25 23:12

Sebastien Lorber