Modern OO Techniques in Java

This is more of a conceptual question than a technical one related to Java. I've noticed that lately programmers tend to avoid creating classes for passing data and just move them around, using JSONObject

if available, or base HashMap

. Many new interviewees prefer to use what I call JavaScript coding code. So instead of creating a class with a name, Address

they would store it all in JSONObject/HashMap

and pass it on as the object later transitioned to the appropriate type. Also I notice a lot

try { ... } 
finally { return str; } 

      

structured methods.

Is this something normal and accepted these days? For me, it just contradicts everything I thought at school. I mean, no generalization, no encapsulation, etc. And when asked, they claim to JSONObject

be encapsulation. Well, I don't agree, but I just didn't expect something.

The task is always completed at the end, but the way it is done worries me. This practice creates many loose structures with a lot of potential bugs if programmers are not careful. Aren't java generics created to avoid this?

Feel free to move this question to another exchange, but I'd love to hear some opinions from experienced people.

+3


source to share





All Articles