Yearly archives "2016"

Coimbra JUG – Just Enough App Server

posted by Roberto Cortez on

The Fifteen Meeting of Coimbra JUG was about Application Servers. For a long time, developers complain about Application Servers. Developers find them heavyweight and the current trend is to develop lightweight, isolated and contained services. Most call this approach Microservices. In my opinion, there is not a 100% accepted definition of what a Microservice is, but this is another story. Anyway, are Application Servers prepared to answer the new demands? António Gonçalves has the answer in is new session. Have a look and decide for yourself:

Just Enough App Server

Are Websphere or Weblogic appropriate for your project? Too big” ? Do Jetty or Tomcat actually meet your needs? Too “small”?

Neither too big nor too small. What you need is “just enough app server” to support only the subset of APIs and services your application needs.

In this session I will make an inventory of Java EE application servers (Weblogic, Websphere, JBoss, GlassFish), Profile Web (Tomee, Payara, Siwpass) and Servlets (Tomcat, Jetty, Undertow). If Microservices is want you want, I will introduce other modular solutions such as WildFly Swarm, KumuluzEE, Spring Boot or Dropwizard. I will talk about performance, war, executable jar, monitoring, management, optimization, use cases and some personal feedback… all this by showing code and executing several types of applications (from the simplest to more complex) in several kinds of containers … and maybe even on a Raspberry Pi.

Video (in Portuguese)

Of if you prefer an English version check it out here:
Just Enough App Server (English)

Slides

In the end, we would like to thank Praxis and KWAN for sponsoring the event with the venue, food and drinks for everyone! Remember to check out KWAN Calculadora Salarial.

Coimbra JUG Meeting 15

Thank you very much for your support! And of course, the awesome number of attendees that participated in the event.

Java Tip of the Week #10 – NetBeans

posted by Roberto Cortez on

After my video from last week, about IntelliJ, I was approached by Geertjan Wielenga from the NetBeans teams about doing the same for NetBeans.

I’ve used NetBeans very briefly around 2006 or 2007, can’t remember exactly, so I’m not the best person to talk about it. Geertjan was kind enough to collaborate with my Java Tip of the Week and make a video with me while going through some of the NetBeans features. I was also very happy to have my first guest speaker in my videos.

I have to say that I was very surprised with NetBeans. I would definitely keep an eye on it and maybe use it for some stuff. Just watch the video and decide for yourself:

Do we have someone that wants to make an Eclipse one to complete the set? I’ll be happy to do it.

In the meanwhile, emember to follow my Youtube channel for faster updates!

Leave a comment if you enjoyed it, if not leave one as well!

Java Tip of the Week #9 – IntelliJ IDEA

posted by Roberto Cortez on

It’s not secret that my favourite IDE is IntelliJ IDEA. You have already seen me using it in my previous videos, so it was just a matter of time to bring it as a topic. Here it is! Not trying to convince anyone to change or to start an IDE flame war. It’s enough already with the Java EE vs Spring wars.

Anyway, in a bit longer than 5 minutes this time, I went through some of the features that I use the most in IntelliJ, on Navigation and Code Generation.

Here is the video:

Here are also some other posts I’ve wrote about IntelliJ:

Remember to follow my Youtube channel for faster updates!

Leave a comment if you enjoyed it, if not leave one as well!

Java Tip of the Week #8 – Java 8 Default Methods

posted by Roberto Cortez on

This week Java Tip of the Week we continue to explore some of the new features introduced in Java 8. This time is about Default Methods.

Before Java 8, Interfaces were a closed contract, meaning that after you published an Interface, every implementation would have to implement every method present in the Interface. If you changed your mind later and wanted to add new methods, you couldn’t without breaking the compatibility. Implementations would need to add the missing code to the new methods. The Collections API is a good example. It was designed since the early versions of Java, but it was missing operations that would help every day developer.

With Java 8, we can now implement methods in the Interface directly. This is done via a Default Method with the default keyword. As the name says, we are providing a default implementation for the method. So, if any implementation does not implement the method, it would use the default implementation. This change allowed to expand and extend API’s behaviour without breaking compatibility.

Default Method Interface

Here is a sample:

Yes, this works!

Check out this video with some live coding examples:

Remember to follow my Youtube channel for faster updates!

Leave a comment if you enjoyed it, if not leave one as well!

Java Tip of the Week #7 – Maven Slow?

posted by Roberto Cortez on

Maven SlowThis week Java Tip of the Week is a follow up of last session about Maven. The first video covered aspects related to Maven Dependencies. This video will cover some techniques to speed up your Maven build.

Maven Slow?

Since Maven 3, you are able to run your builds in parallel. Depending on the build machine and the project structure, you might get a 60% speedup increase!

Also, there are some ways to selectively pick just the things you want to build, using the -amd and -am flags. These are available since Maven 2, but for some reason they don’t seem to be used that much.

Check the video:

For reference, here are the commands:

CommandDescription
mvn clean install -T 1CBuilds the project with one Thread per Core
mvn clean install -T 2CBuilds the project with two Threads per Core
mvn clean install -T 4Builds the project with fours Threads
mvn clean install -pl [project-name] -amdBuilds just the project specified in -pl and all the dependent projects.
mvn clean install -pl [project-name] -amBuilds just the project specified in -pl and all the required projects to build it.

Check the Maven wiki page about Parallel Builds.

Also, check this other post I wrote: Maven Common Problems and Pitfalls.

Remember to follow my Youtube channel for faster updates!

Leave a comment if you enjoyed it, if not leave one as well!