Skip to main content

New answers tagged

1 vote

What is the best way to comment a deprecated class in Java?

What you do not do is remove any documentation. Think about it: The class is deprecated so I want to replace all its uses. And I want to do that without breaking anything. To replace uses of the class ...
gnasher729's user avatar
  • 47.5k
1 vote

Should business logic classes be POJO only?

I think the term POJO is a distraction. It was basically a joke: ... We wondered why people were so against using regular objects in their systems and concluded that it was because simple objects ...
JimmyJames's user avatar
  • 28.9k
8 votes
Accepted

Should business logic classes be POJO only?

I read about three-tier architecture and I have a question: I read that in business logic (that is, what is in logic tier) there should be bare Java classes, These bare Java classes are called POJO's ...
candied_orange's user avatar
2 votes

Should business logic classes be POJO only?

Spring is just a library/framework, is there any difference between Spring and the JDK, at the end of the day both are just code written by someone else... If you take your argument to the next ...
DavidT's user avatar
  • 4,253
1 vote
Accepted

Feasibility of using different java version for different project with different compatibility properties

For command line use JEnv: https://www.jenv.be/ It allows you to set the JDK to use on a per directory/project basis. TIP: You can commit the .java-version file to source control, so only the first ...
DavidT's user avatar
  • 4,253
2 votes

How does the MVC pattern actually work?

I’m completely lost on what actually belongs in each layer and the best way to organize the code as a whole. You have come to a crucial realization: MVC is not a comprehensive software architecture. ...
Greg Burghardt's user avatar
1 vote

The best way to handle exceptions?

I think a good approach here would be to use a try-catch block in your method to print the stack trace and return null if an exception occurs Something like this: import com.opencsv.bean....
Adam Green's user avatar
5 votes

The best way to handle exceptions?

Since I only want the error and stack trace to be printed in the console and the application to be terminated, what is the best approach to deal with this? If you don't want to handle a checked ...
JimmyJames's user avatar
  • 28.9k
13 votes

The best way to handle exceptions?

Sometimes the best way to handle an exception is not at all. Since I only want the error and stack trace to be printed in the console and the application to be terminated, what is the best approach ...
candied_orange's user avatar
5 votes

The best way to handle exceptions?

Let the exceptions bubble up to your caller, by just adding a throws clause to the ler() method. If someone calls your ler() method, it's important for them to know whether that was successful, ...
Ralf Kleberhoff's user avatar
13 votes

The best way to handle exceptions?

For the purposes of this method that returns a list, just don't catch exceptions. Let it throw. Unhandled exceptions in your application still need to be handled, but the error handling occurs much ...
Greg Burghardt's user avatar
3 votes

How does the MVC pattern actually work?

In short: Views send UI Events to Controllers, Controllers figure out from Events what to send to Models, and Models, once processed data from Controllers, let Views know data has changed. The short ...
Alexander The 1st's user avatar
0 votes

Allowing users to add their own custom fields in a Spring MVC Hibernate application - What's an ideal approach?

Consider map approach, creating field on runtime in database in my opinion is a bad practice. With map approach you can enable dynamic-like field in database where key can be your field name and value ...
procrastinator1771's user avatar

Top 50 recent answers are included