3 ms·
This is so true! ... I was ready to give up on J2EE (prior to the name change and version 1.5). Java EE 7 is wonderful and more tools are coming. It's no long
by smoyer 11y ago
This is so true! ... I was ready to give up on J2EE (prior to the name change and version 1.5). Java EE 7 is wonderful and more tools are coming. It's no longer an XML configuration nightmare with 10 classes to define all the required interfaces and implementation.
To reduce even more boiler-plate, I've recently started using project Lombok [1]. Code generation provides all the standard methods and allows JPA @Entity objects or JAX-B objects to be completely declarative. Start with @Data and @Value.
[1] https://projectlombok.org/ https://projectlombok.org/
- slantedview 11y agoMy argument isn't about using tools that reduce boilerplate through codegen or annotations, it's to use tools where boilerplate doesn't exist. Why do you need JPA? Why do you need EE? Chances are, you don't.
- reitanqild 11y agoBoilerplate and annotations are two wildly different beasts on my understanding : Boilerplate is things I have to repeat mindlessly every time I want to do something. Annotations on the other hand usually is one single line of code. Disclaimer : not a native English speaker although I am fairly sure about this. Edit: look at hodao from the tomitribe GitHub account. Or DeltaSpike from Apache.