One of my friends has decided to pursue Java programming (Web Apps). So this idea just hit me - what are a few things a beginner Java guy should know?
Don't write your HTML and CSS in Java Serverside frameworks, unless serverside rendering is a requirement. If it is a an absolute requirement, avoid Struts, JSF, ... (JSP is probably the closest to pure HTML) otherwise you'll hate Java in 6 months time.
Rather go the API approach - build an API in Java and build the UI with JavaScript or some sort of transpiler like Dart / KotlinJS
Now is also a good time to get into Kotlin rather than Java, it cuts away most of the Java boilerplate
Beginning with java web development . You must have the good grasp on following.
Best of luck!!
Jacob
Software Engineer. Cupcake lover.
Lee Theobald
Passionate developer based in lovely Cambridge
Java web development has always been an interesting place. I'd agree with other comments about avoiding some of Java's own frameworks. I'm a much happier developer since I moved away from JSF. I always find it so far behind the state of the web (HTML5 support being one I always remember battling against). It's also so keen to make you produce stateful applications (hello
@ConversationScoped) going against the stateless, cloud native direction web development is heading in.I'd get them into some of the simple Java MVC frameworks to start off with. They could get something up & running with Spring Boot & Spring MVC for example. It will also help them learn what makes Java web development a power tool. Leave the view side of things to web technologies that can pace with the web, while having a real solid server base there to do some amazing things in your code.
I mainly do things myself in Spring using Handlebars as the view templating (the lack of logic really helps you keep logic out your views). Other frameworks like JHipster also look like they are doing great jobs of bring modern Java development to the Java world.