-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: [Design] POJO Value Object view
PostPosted: Mon Oct 25, 2004 4:10 am 
Newbie

Joined: Mon Oct 25, 2004 3:54 am
Posts: 4
Forum Hy!

I have a designe question?
We have been working on one project for 4 months with hibernate as ORM and Webwork as MVC. We first started using POJO in our view layer but now
after 4 months our POJO objects have became big and very confusing.
For example we started puting some functions in POJO like for user isAdmin()
isGuest(). Those functions are used only in view (to show or no to show same
link or button ...) but now our POJO objects have become very non readable
So my question is how to do some refactoring to maybe put those non POJO
functions and fields in some ViewPOJO Object.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 25, 2004 4:51 am 
Senior
Senior

Joined: Fri Jun 18, 2004 10:17 am
Posts: 140
this isn't really a hibernate question. a pojo with methods like isAdmin and isGuest should be called something like UserContext and reside in session scope. there is nothing wrong with these simple boolean methods, so long as their values are not computed by the pojo when the view is returned. you should get your model layer to perform the userCxt.setIsAdmin(bool). you've not really give much other information so it's not easy to answer but you should not reply because this is non-hibernate.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.