Productive Clouds 2.0 with Serverless Jakarta EE--airhacks.fm podcast

Subscribe to airhacks.fm podcast via: RSS iTunes

An airhacks.fm conversation with Ondrej Mihályi about:

starting programming with Logo, Pascal, C, Pentium 386, Scratch, minecraft, delphi and Java, pointers and destructors, participating in programming competitions, learning programming with Java, GWT, JSF and Primefaces over GWT, Eclipse, NetBeans, Java EE 5 introduced Dependency Injection (DI), Nitra is the oldest City in Slovakia, "Enterprise needs to be complicated", code generation with xdoclet in J2EE, simplifications with Java EE 5 in 2006, starting at Payara, running a JUG in Prague, Sun Grid Engine, serverless WARs, ideas for productive Clouds 2.0, serverless Java EE applications, early clouds with Google App Engine, Docker and Kubernetes for application packaging, making cloud services injectable, AWS lambdas are distributed commands, improving developer experience in the clouds with DI instead of singletons, Payara Source To Image (S2I) for server configuration in the clouds, separating the immutable servers from application logic with docker and clouds, cloud vendors are evaluating microprofile, repeatable and reproducible builds with Java EE in private clouds, Java EE deployment model became accidentally "cloud ready", with ThinWARs there is nothing to (security) scan, with ThinWARs there is no conceptual difference to lambda functions, cloud vendors participation in Jakarta EE, GraalVM and native compilation. Ondro's blog and @OndroMih / twitter.

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


NEW: Online Workhop Effective WebApps without Frameworks is also coming to: MUC Airport.

Airport MUC workshops: Web (SPA, PWAs, Offline, Desktop, Mobile) Applications Essentials and Effective Web Applications. No migrations. #usetheplatform

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

J2EE, Java EE, Jakarta EE, MicroProfile - and The Release Cadence

J2EE was released every 2 years, Java EE every 3-4 years:

  1. J2EE 1.2 (December 12, 1999)
  2. J2EE 1.3 (September 24, 2001) (2 years)
  3. J2EE 1.4 (November 11, 2003) (2 years)
  4. Java EE 5 (May 11, 2006) (3 years)
  5. Java EE 6 (December 10, 2009) (3 years)
  6. Java EE 7 (May 28, 2013) (4 years)
  7. Java EE 8 (August 31, 2017) (4 years)
[from: https://en.wikipedia.org/wiki/Java_Platform,_Enterprise_Edition#cite_note-4]

With a Jakarta EE release in 2019 (status), the release cadence would come back to 2-years cycle of J2EE days. A Jakarta EE release in 2020 would be still aligned with the Java EE cadence. However: Jakarta EE plans to have more frequent releases.

All major application servers are already supporting both: Java EE 8 and MicroProfile at the same time (see matrix).

MicroProfile and most application servers are already released quarterly. Now you can write your ThinWAR applications against the stable Java EE 8 API and enjoy new MicroProfile features several times a year.

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


NEW: Online Workhop Effective WebApps without Frameworks is also coming to: MUC Airport.

Airport MUC workshops: Web (SPA, PWAs, Offline, Desktop, Mobile) Applications Essentials and Effective Web Applications. No migrations. #usetheplatform

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

"Jakarta EE" Eclipse GlassFish 5.1 Docker Image is Available from Docklands and from Dockerhub

Eclipse GlassFish 5.1 docker image is available as Dockerfile from Docklands (glassfish) and docker image directly from dockerhub: airhacks/glassfish.

All projects created with the Java EE 8 Essential Archetype ship with a Dockerfile already pointing to airhacks/glassfish.

To create a project run:

mvn archetype:generate -DarchetypeGroupId=com.airhacks -DarchetypeArtifactId=javaee8-essentials-archetype -DarchetypeVersion=0.0.2 -DgroupId=com.airhacks -Dversion=0.0.1 -Darchetype.interactive=false --batch-mode -DartifactId=eclipsefish

to build:


cd eclipsefish
mvn clean install && docker build -t airhacks/eclipsefish .    
    

to run:

docker run -d -p 8484:8080 --name thinfish airhacks/thinfish

...and do smoke test:

curl http://localhost:8484/thinfish/resources/ping output:

HTTP/1.1 200 OK
Server: GlassFish Server Open Source Edition  5.1.0 
X-Powered-By: Servlet/3.1 JSP/2.3 (GlassFish Server Open Source Edition  5.1.0  Java/Oracle Corporation/1.8)
Content-Type: text/plain
Content-Length: 16

Enjoy Java EE 8!%          

Checkout wad.sh for continuous deployments.

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


NEW: Online Workhop Effective WebApps without Frameworks is also coming to: MUC Airport.

Airport MUC workshops: Web (SPA, PWAs, Offline, Desktop, Mobile) Applications Essentials and Effective Web Applications. No migrations. #usetheplatform

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

KISS your WARs--Skipping the Superfluous

Both apache maven and Java EE heavily rely on (Convention over Configuration). Productive, straight-forward "Don't make me think" ThinWARs, fast builds and deployments, short pom.xml are a result of applying the built-in, sensible defaults.

Your WAR is KISS, if the maven artifactId and:
  1. project folder
  2. name in pom.xml (name is derived from artifactId, so remove it)
  3. WAR name
  4. finalName
  5. and so the JAX-RS URI
are identical.

Also

  1. there are no nice-to-have runtime dependencies
  2. there are no maven plugins declared
  3. there is no pom inheritance
  4. the only provided dependencies are the Java EE / Jakarta EE and MicroProfile API
Example:

<project>
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.airhacks</groupId>
   <artifactId>thinwar</artifactId>
   <version>0.0.1</version>
   <packaging>war</packaging>
   <dependencies>
       <dependency>
           <groupId>javax</groupId>
           <artifactId>javaee-api</artifactId>
           <version>8.0</version>
           <scope>provided</scope>
       </dependency>
       <dependency>
           <groupId>org.eclipse.microprofile</groupId>
           <artifactId>microprofile</artifactId>
           <version>1.3</version>
           <type>pom</type>
           <scope>provided</scope>
       </dependency>        
   </dependencies>
   <build>
       <finalName>thinwar</finalName>
   </build>
   <properties>
       <maven.compiler.source>1.8</maven.compiler.source>
       <maven.compiler.target>1.8</maven.compiler.target>
       <failOnMissingWebXml>false</failOnMissingWebXml>
   </properties>
</project> 

The resulting ThinWAR is KISS and YAGNI, without any Cargo Cult Programming involved.

A conventional ThinWAR project can be directly created with javaee8-essentials-archetype and deployed with wad.sh.

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


NEW: Online Workhop Effective WebApps without Frameworks is also coming to: MUC Airport.

Airport MUC workshops: Web (SPA, PWAs, Offline, Desktop, Mobile) Applications Essentials and Effective Web Applications. No migrations. #usetheplatform

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

2min Tech Tip: Productivity with ThinWARs and Docker

In a few seconds you can build a Java EE + MicroProfile ThinWAR as a executable Docker container:

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


NEW: Online Workhop Effective WebApps without Frameworks is also coming to: MUC Airport.

Airport MUC workshops: Web (SPA, PWAs, Offline, Desktop, Mobile) Applications Essentials and Effective Web Applications. No migrations. #usetheplatform

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

2019 predictions, Java EE authentication, JAX-RS and BeanValidation, perfect cases for Microservices, Docker vs. OpenShift--59th airhacks.tv

In the 59th airhacks.tv episode we discussed the following topics (https://gist.github.com/AdamBien/d65135a87731eb1da396cf853a5e2a2d)

"2019 predictions, Java EE authentication, JAX-RS and BeanValidation, perfect cases for Microservices, Docker vs. OpenShift, Java EE hosting, JPA and MicroServices, structuring SPAs, JSF vs. angular, JSF performance"

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


NEW: Online Workhop Effective WebApps without Frameworks is also coming to: MUC Airport.

Airport MUC workshops: Web (SPA, PWAs, Offline, Desktop, Mobile) Applications Essentials and Effective Web Applications. No migrations. #usetheplatform

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

Adding additional HTTP headers with JAX-RS and Bean Validation

A JAX-RS resource with input validation:


@Stateless
@Path("ping")
@Consumes(MediaType.TEXT_PLAIN)
@Produces(MediaType.TEXT_PLAIN)
public class PingResource {

    @GET
    public String ping() {
        System.out.println(".");
        return "Enjoy Jakarta EE 8!";
    }

    @POST
    public void save(@Size(min = 2, max = 3) String ping) {
    }
}    

and installed ExceptionMapper

import java.util.stream.Collectors;
import javax.validation.ConstraintViolationException;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;

@Provider
public class ContraintViolationMapper implements ExceptionMapper<ConstraintViolationException> {

    @Override
    public Response toResponse(ConstraintViolationException exception) {
        String messages = exception.getConstraintViolations().stream().
                map(v -> v.getMessage()).
                collect(Collectors.joining(","));
        return Response.status(400).header("reason", messages).build();
    }

}

...will return additional information in header on each contraint violation.

A failed input validation: curl -XPOST -i -H"Content-type: text/plain" -d'duke' http://localhost:8080/jaxrs-beanvalidation/resources/ping mainifests as:


HTTP/1.1 400 Bad Request
Server: Payara Server  5.184 #badassfish
reason: size must be between 2 and 3
(...)

The 7kB ThinWAR was built and deployed with wad.sh in 3 seconds.

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


NEW: Online Workhop Effective WebApps without Frameworks is also coming to: MUC Airport.

Airport MUC workshops: Web (SPA, PWAs, Offline, Desktop, Mobile) Applications Essentials and Effective Web Applications. No migrations. #usetheplatform

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

Modern Frontends -- As Simple as Java EE (Istanbul JUG Session)

ThinWARs, no dependencies, a single specification source. Modern web applications based on web standards become as lean and productive: ...as modern Java EE with MicroProfile.

In this Istanbul JUG session "Modern Frontends -- As Simple as Java EE ", I'm building, deploying and connecting a "no dependencies", WebComponents / Custom Elements based fronted, with a ThinWAR microservice.

See you at "Build to last" effectively progressive applications with webstandards only -- the "no frameworks, no migrations" approach, at Munich Airport, Terminal 2 or effectiveweb.training (online).


NEW: Online Workhop Effective WebApps without Frameworks is also coming to: MUC Airport.

Airport MUC workshops: Web (SPA, PWAs, Offline, Desktop, Mobile) Applications Essentials and Effective Web Applications. No migrations. #usetheplatform

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

2019 predictions, Java EE authentication, JAX-RS and BeanValidation, Perfect cases for Microservices, Docker vs. OpenShift, Java EE hosting, JPA and MicroServices--or topics for 59th airhacks.tv

Topics (https://gist.github.com/AdamBien/d65135a87731eb1da396cf853a5e2a2d) for the 59th airhacks.tv:

  1. 2019 predictions background and discussion
  2. Java EE authentication and additional user information retrieval
  3. 400,500 or stuck with ConstraintValidationException with JAX-RS
  4. JAX-RS @Stateless or @RequestScoped
  5. Best use cases for microservices
  6. How to choose between app servers for a project? (glassfish, payara, wildfly, tomee etc.)
  7. How to start learning microservices with Java EE
  8. Docker and OpenShift
  9. BCE for SPA / PWA
  10. Where / how to host Java EE
  11. DB relations in microservices
  12. Is JPA well suited for microservices?
  13. JSF vs. SPA performance considerations
  14. Perfect cases for dozer

Ask questions during the show via twitter mentioning me: http://twitter.com/AdamBien (@AdamBien) or using the hashtag: #airhacks. You can join the Q&A session live each first Monday of month, 6 P.M at airhacks.tv or http://www.ustream.tv/channel/adambien

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


NEW: Online Workhop Effective WebApps without Frameworks is also coming to: MUC Airport.

Airport MUC workshops: Web (SPA, PWAs, Offline, Desktop, Mobile) Applications Essentials and Effective Web Applications. No migrations. #usetheplatform

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

Maven Commitment -- a Podcast Episode with Robert Scholte

Subscribe to airhacks.fm podcast via: RSS iTunes

An airhacks.fm conversation with Robert Scholte (@rfscholte) about:

"CGI Java Netherlands, Maven Invoker, never mvn clean, apache maven commitment and committing, Watch and Deploy (wad.sh), Atari 800XL, hacking basic with 10 years, peeks and pokes, MS DOS and startup screens, JDK 1.4, illegal generics, Java EE on JBoss was good, not the build process, intelligent builds with Maven, Apache Jelly, Jason van Zyl, Maven vs. Ant, loosing information with Google Web Toolkit (GWT), parsing Java with qdox, Paul Hammant, Maven Release Plugin "Fix It" video , Using Java console for passwords and the bash history, Java 6 and password encryption, clarifying the development of Maven plugins (default values and expressions), going from Maven 1 to Maven 2 and the respository structure, from Maven 2 to Maven 3, Eclipse IDE wanted Maven 3, Maven 3.7 is (probably) going to optimize downloads, there will be no Maven 4, Maven 5 will rely on pom's model version 5, splitting pom into local and remote part, writing POM in alternative formats, takari.io, takari polyglot, Maven extensions,plexus classworlds is Maven's OSGi, what is the default version of apache Maven plugins, is it possible to pull "latest" apache maven plugins, Maven extensions for plugin version configuration, clean poms, WAD runs all the time, using GraalVM to make a native version of Maven, Maven Archetype always generates parents, Up For Graps, Maven 5.x: How to be prepared for the future?, Maven is probably the only build tool, with tight integration with Java Platform Module System, Gradle, Apache Buildr is EoL, Bezel, Apache Ant is not dead and supports Java 11, Robert is a freelancer, CEO of SourceGrounds and available for hire."

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


NEW: Online Workhop Effective WebApps without Frameworks is also coming to: MUC Airport.

Airport MUC workshops: Web (SPA, PWAs, Offline, Desktop, Mobile) Applications Essentials and Effective Web Applications. No migrations. #usetheplatform

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

Online Workshops
realworldpatterns.com
...the last 150 posts
...the last 10 comments
License