S
StoogeManiac
I have been brought into a large application written in Java. The
application utilizes an MVC architecture, which is slightly modified but
still maintains the basic MVC structure.
I'm running into a lot of instances where the developers have passed object
references rather then parameters into methods. For example a method call to
get the Father of a user might pass in the reference to the Child object
rather then just the child's name, which is the only value needed.
Their reasoning behind this is simple, if the implementation needs to change
such as having to look at child name and another piece of information to get
the father then they do not have to modify the message signature. This
allows the application level code to remain untouched.
I have concerns about this since these are shared components/methods between
multiple applications and a desired change in implementation in one
application may not be the same in another.
I would like to see what others think of this practice.
Thanks.
application utilizes an MVC architecture, which is slightly modified but
still maintains the basic MVC structure.
I'm running into a lot of instances where the developers have passed object
references rather then parameters into methods. For example a method call to
get the Father of a user might pass in the reference to the Child object
rather then just the child's name, which is the only value needed.
Their reasoning behind this is simple, if the implementation needs to change
such as having to look at child name and another piece of information to get
the father then they do not have to modify the message signature. This
allows the application level code to remain untouched.
I have concerns about this since these are shared components/methods between
multiple applications and a desired change in implementation in one
application may not be the same in another.
I would like to see what others think of this practice.
Thanks.