« Tout Valtech à la carte… gratuitement !JBoss Messaging : a kind of magic… »

1 commentaire

Commentaire de: Andreas [Visiteur] Email · http://www.nikem.de
Hi Bruno,

as you know I am a fan of Gilead. Gilead makes development much faster because I can use the domain objects in the (GWT) client without filling the contents into DTOs or something like that.

I think it is a modern problem that hibernate instrumented instances must be serialized. In conventional webapps the values are filled into the view components on the server side so there were no need to serialize persistent objects.

Using Gilead I ran into two issues that I am not really sure how to solve:
1. proxy information. The User object I am using has got lots of collection mappings to other tables (e.g. address, buddies, invitations etc). I found out that the proxy information for a collection are about 200 Bytes (that serialized HashMap which is then Base64 encoded). So every user object has got a size of about 2kB (10 Collections x 200 Bytes). So if I want to display a user in a list on the client, much data must be loaded even if the collections are not initialized.

2. fields that must not be shown to the public: Like many applications in my app you can view the pages as guest (not logged in) and as logged in user. In many cases I want to show less information to guests than to logged in users. There are also differences if you are looking at "your" profile or at the profile page of someone else.
Of course I can setVisible(false) to a widget that must not be shown. But if you look at the data stream (i.e. with firebug) you can see all the information that is present in the database and has been mapped with hibernate for the particular User object.
I think putting more "delicate" informations into other tables that are not join-fetched is not the case for me because I need higher granularity...
example:
- Guest: show user's name.
- logged in Person: show user's name and address
- "my Profile": show user's name, address and birthday
In the "conventional" webapp I did not have this problem because the persistent objects only exist on the server side.

What are your experiences with these two issues? Do you know any patterns or best practice?

Kind Regards

Andreas
25.09.09 @ 14:22

Laisser un commentaire


Votre adresse email ne sera pas révélée sur ce site.

Votre URL sera affichée.
(Les retours à la ligne deviennent des <br />)
(Nom, e-mail & site Web)
(Autoriser les utilisateurs à vous contacter par un formulaire de message (votre adresse email ne sera not révélée.))
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)