UI5 WebComponent DatePicker -- Receiving Events

After installing the UI5 DatePicker custom element, now the DatePicker is used within a view, which reacts to the change event (CustomEvent):

See you at (Enterprise) Single Page Applications with WebStandards, Terminal 2. Also checkout the (Single Page) Web Applications online learning path.


Cloudy Jakarta EE and MicroProfile: Microservices, Clouds and Beyond Jakarta EE / MicroProfile airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

Installing and Integrating a UI5 DatePicker WebComponent

Installing, and integrating a DatePicker from UI5 WebComponents into a vanilla HTML page. This free, bonus screencast is part of the https://webcomponents.training workshop:

See you at (Enterprise) Single Page Applications with WebStandards, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


Cloudy Jakarta EE and MicroProfile: Microservices, Clouds and Beyond Jakarta EE / MicroProfile airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

"I Don't Your Dependency Injection"--an airhacks.fm podcast

Subscribe to airhacks.fm podcast via: spotify| iTunes| RSS

The #45 airhacks.fm episode with Jarek Ratajski (@jarek000000) about:

Java, Java EE and superfluous Dependency Injection with dangerous Aspects
is available for download.

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.


Cloudy Jakarta EE and MicroProfile: Microservices, Clouds and Beyond Jakarta EE / MicroProfile airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

Simplest Possible WebComponent with JAX-RS Backend

A Java class:


public class Hello {

    public String greeting;

    public Hello(String greeting) {
        this.greeting = greeting;
    }
}    
exposed via a JAX-RS:

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path("/hello")
public class HelloResource {

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public Hello hello() {
        return new Hello("hello, component");
    }
}    
can be easily accessed from a vanilla WebComponent:

class HelloComponent extends HTMLElement { 

    async connectedCallback() { 
        const response = await fetch("/hello");
        const { greeting } = await response.json();
        this.innerHTML = `
            <h2>${greeting}</h2>
        `;
    }

}
customElements.define("hello-component",HelloComponent);     
...declared in a HTML page

<!DOCTYPE html>
<html lang="en">
<head>
<body>
    <hello-component></hello-component>
    <script src="app.js" type="module"></script>
</body>
</html>    

No dependencies, no migrations.

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 (e.g.: webcomponents.training).


Cloudy Jakarta EE and MicroProfile: Microservices, Clouds and Beyond Jakarta EE / MicroProfile airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

Simplest Possible Quarkus Scheduler / Timer

quarkus.io does not support EJBs and so EJB Timers (like e.g.: Simplest Possible EJB 3.1 Timer). The extension quarkus-scheduler (to install use: mvn quarkus:add-extension -Dextensions=quarkus-scheduler) offers adequate functionality:


import java.time.LocalDateTime;
import java.util.concurrent.atomic.AtomicLong;

import javax.enterprise.context.ApplicationScoped;

import io.quarkus.scheduler.Scheduled;

@ApplicationScoped
public class Scheduler {

    private AtomicLong COUNTER = new AtomicLong();

    @Scheduled(every="1s")
    public void increase() {
        System.out.println("+"+COUNTER.incrementAndGet() + " " + LocalDateTime.now());
    }

    @Scheduled(every="2s")
    public void decrease() {
        System.out.println("-"+COUNTER.decrementAndGet() + " " + LocalDateTime.now());
    }
}    
Output:

2019-07-12 06:16:48,316 INFO  [io.qua.dep.QuarkusAugmentor] (main) Beginning quarkus augmentation
2019-07-12 06:16:48,855 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 539ms
2019-07-12 06:16:49,053 INFO  [io.quarkus] (main) Quarkus 0.19.0 started in 0.808s. Listening on: http://[::]:8080
2019-07-12 06:16:49,055 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy, scheduler]
+1 2019-07-12T06:16:49.064741
-0 2019-07-12T06:16:49.064740
+1 2019-07-12T06:16:50.055152
-0 2019-07-12T06:16:51.053965
+1 2019-07-12T06:16:51.054133
+2 2019-07-12T06:16:52.058805

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.


Cloudy Jakarta EE and MicroProfile: Microservices, Clouds and Beyond Jakarta EE / MicroProfile airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

JAX-RS: Parameter to Object Mapping

A class containing a constructor with a single String parameter:


public class Ping {

    public String content;

    public Ping(String content) {
        this.content = content;
    }
}    

can be used as parameter of JAX-RS resources without any additional configuration:

@Path("ping")
public class PingResource {

    @GET
    @Path("{ping}")
    public String ping(@PathParam("ping") Ping ping) {
        return "Enjoy Jakarta EE with MicroProfile: " + ping.content;
    }
}    
curl -i http://localhost:8080/[WAR_NAME]/resources/ping/now yields:

HTTP/1.1 200 OK
Server: Payara Server  5.191 #badassfish

Enjoy Jakarta EE with MicroProfile: now%    

Project created with javaee8-essentials-archetype, the 4kB ThinWAR was built and deployed with: wad.sh in 2.1s

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.


Cloudy Jakarta EE and MicroProfile: Microservices, Clouds and Beyond Jakarta EE / MicroProfile airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

#slideless #nomigrations Workshops, Events, JUGs, Conferences

Also: Subscribe to airhacks.fm podcast via: spotify| iTunes| RSS


Cloudy Jakarta EE and MicroProfile: Microservices, Clouds and Beyond Jakarta EE / MicroProfile airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

Plugging Things Together With Reactive Programming--airhacks.fm podcast

Subscribe to airhacks.fm podcast via: spotify| iTunes| RSS

An airhacks.fm conversation with Gordon Hutchison (@hutchig) about:

"You Are Not Google", Transactions, MicroProfile, Reactive Programming, Reactive Messaging and Event Sourcing

Gordon Hutchison on twitter: @gordhut

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.


Cloudy Jakarta EE and MicroProfile: Microservices, Clouds and Beyond Jakarta EE / MicroProfile airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

Listening to CustomEvents with lit-html

lit-html introduces binding not only to standard DOM-Events - you can bind to CustomEvents emitted by WebComponents as well:

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.


Cloudy Jakarta EE and MicroProfile: Microservices, Clouds and Beyond Jakarta EE / MicroProfile airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

VSC Config, Singleton Concurrency, Supply Chain Management, BCE, MIcroSerivces, OSGi, Service Registries--64th airhacks.tv

64th airhacks.tv episode with following topics:

"VSC Config, Concurrency, Supply Chain Management Frameworks, BCE, Microservices, OSGi, Service Gateways, EJBs and CompletableFuture, SSE events and headers, WAD vs. Eclipse Plugins, BCE structure, GlassFish in production, Java EE application framework"

Any questions left? Ask now: https://gist.github.com/AdamBien/87815259f16ea1080df7b34a394958f1 and get the answers at the next airhacks.tv.

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.


Cloudy Jakarta EE and MicroProfile: Microservices, Clouds and Beyond Jakarta EE / MicroProfile airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

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