3 ms·
I really like annotations. And I really enjoy working on JavaEE. For anyone who still thinks it means loads and loads of boilerplate code but wants to check,
by reitanqild 11y ago
I really like annotations.
And I really enjoy working on JavaEE.
For anyone who still thinks it means loads and loads of boilerplate code but wants to check, read Adam Bien, check out the TomEE examples, the Wildfly examples etc.
- smoyer 11y agoThis 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.
- slantedview 11y agoI'm guessing you like annotations because they're less painful than what you were used to previously. You don't need an EE server to serve up a basic web app. Or even a complex one.
- reitanqild 11y agoYou don't need, but they are free and wonderful. Everything already configured and tested to work out of the box, including transactions. Yes, you might get away with a smaller initial download with something else but the server is a onetime download and your deployed apps are small.