java - Best practice for objects where not all properties will always be used -


here scenario:

i have object 10 properties (e.g. name, birthday, etc.). using object on 2 separate pages in jsf web app. on 1 page ever use 5 of properties, , on other potentially use 10. best practice / efficient way structure object(s)? have 1 object? have 1 object first page, , second extends first object? or have object each page both extending base object?

i wouldn't hung on properties, i'd think more class.

the class represents atomic thing, right? sounds person.

the fact in circumstances you're using of properties, what?

it makes no sense have halfaperson class!

so key me "atomicity" of class in first place. if if describes single, logical thing, why split further?


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -