@Controller
@RequestMapping("/dbo/patient/\*")
public class PatientCOntroller extends AbstractDboController{
@RequestMapping(value=”export.html”, method=RequestMethod(GET))
public ModelAndView exportService(){
System.out.println(‘exported excuted’);
Return new ModelAndView(“dbo/patient/export.jsp”);
}
}
Reason2: Database Service - ActiveRecord vs Hibernate
Ruby on Rails
1234
@patients = Patient.all
@patients.each do |patient|
return paitent.paient_name
end
Spring
12345
@Autowired
private DboDaoService dboDaoService;
public String function(){
return dboDaoService.getPatientService().getPaitent_Name();
}
Reason3: Model Initialization - Crazy ruby syntax
Ruby on Rails
app/model/patient.rb:
123456
class Patient < ActiveRecord :: Base
belongs_to :MRN
def exportService
return “activated”
end
end
app/controller/patients_controller.rb:
1
puts Patient.new.exportService
Spring
src/main/java/package/dbo/exporter/patient.java:
12345678910
@Service
public class Patient implements PetientService {
public String exportService(){
return “activated”;
}
}
src/main/java/package/dbo/exporter/patientService.java:
public interface PatientService{
public String exportService();
}