Adam Bien's Weblog

Upcoming Cloud, Microservice, Web and Java EE Events

  1. (free) Cloud Native @BMW, Munich, 24th January 2017, 8:15pm, "Live-Hacking: Microservices und HA-Patterns"
  2. (free) 35th / 2.2017 airhacks.tv, 6th February 2017, 6 pm CET, live Q&A streaming. Any questions left about Java (EE), Web, Architecture and Co?. Ask now: https://gist.github.com/AdamBien/4791c4a5e8f06b0b8772ab6df6772001
  3. Voxxed, 25th February 2017, Geneva / CERN (!!!), "Microservices on Java EE — As Cool As The LHC"
  4. Voxxeddays Bucharest, 10th March 2017, "Serverless HTML 5 Apps With Angular 2, React, Polymer 2.0 and Java EE Microservices"
  5. airhacks.com, 13th March 2017, Airport MUC, Workshop: "Building (=understanding) HTML 5 / ES 6 web applications without frameworks" [a little bit Polymer 2.0 included :-)]
  6. airhacks.com, 14th March 2017, Airport MUC, Workshop: "Building HTML 5 Applications with React"
  7. airhacks.com, 15th March 2017, Airport MUC, Workshop: "Building HTML 5 Applications with Angular2"
  8. airhacks.com, 4th - 6th April 2017, Airport MUC, Workshops: "Java EE 7 Architectures, Java EE 7 Microservices and NEW: "Java EE 7 Performance, Troubleshooting and Monitoring"
See you at 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 workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

Importance of Java EE, JCP, Java EE Guardians and Microprofile--Interview With Reza Rahman

Reza, please introduce yourself

I am just a professional server-side Java developer, architect and consultant. I have been involved in the Java EE community for a long time (about 15 some years now). For folks interested, a long version of my bio is on my LinkedIn summary. For most readers here, it's probably significant that I am the former official Java EE evangelist at Oracle and a long time contributor to Java EE JSRs in the JCP. My humble blog is here. I also try to do something useful with my personal Twitter account. As a relatively frequent speaker, I try to share pragmatic Java EE code on my GitHub account.

Which application servers, tools or IDEs are you using?

Like most Java developers I use a wide variety of things including Java EE, Spring, WebSphere, WebLogic, JBoss, GlassFish/Payara, Tomcat, Spring Boot, Eclipse and NetBeans. My clear favorites these days are Java EE, WildFly, WebSphere Liberty and NetBeans. I think WildFly Swarm is a really cool project. I am a little sad to say I had been a long time fan of GlassFish and to a lesser extent I still am. I think TomEE has a lot of yet unmet potential and could be a significant player if the right things are done.

You are the chief Java EE Guardian. How big is the Java EE Guardians community? Who else is involved?

I don't think there is actually a chief Java EE Guardian (and I hope there will never be). From the very start the core folks involved have had a gentleman's agreement to remain a very egalitarian community where everyone is treated absolutely equally. We try our best to operate under open collective consensus based decisions. It is certainly fair to say I am a key Java EE Guardian responsible for bringing our community and concerns to the open. It is also equally fair to say the core Java EE Guardians started their most important work together far before I had anything to do with it.

I would say considering our age, the Java EE Guardian community is quite large. Our full list of supporters are always available on our web site. Without needlessly naming names, our support comes from fifty JUGs, about a dozen official Java Champions, forty some JUG leaders, many JCP members, bloggers, authors, speakers and educators. One name I think is fair to mention is James Gosling - the father of Java. Most importantly, many ordinary Java developers choose to support us. There are well over 3K signatures on our change.org petition to Oracle executives on Java EE. About 4K people follow us on Twitter. There are over 600 people subscribed to our Google Group account. There isn't a heavy Java EE vendor presence in our community. I think that's a good thing.

None of this means we do not still need more support. The broadest possible support will help us achieve our mission faster, more effectively and ensure that the results of our efforts last a very long time. We are a grassroots organization. Our only job is to serve the best interests of the Java EE community. The most important voice that matters for us is the ordinary Java developer, particularly people that see the need to keep vendors on the Java server-side accountable for their words and actions.

What is your opinion about the Microprofile?

I think MicroProfile is a very important and timely initiative. The issue is that it is very difficult to separate hype from reality in microservices. I already see a number of clients struggling under the weight of vendor driven microservices hype. I fear a lot of these projects are headed towards needless failure by buying into hype driven products too quickly. Java EE is facing the same issue. There is a very real danger Java EE may wind up prematurely standardizing many features that in the end will not stand the test of time in a few years. The MicroProfile is a great way for Java EE vendors to pseudo standardize microservices features and market those features into their products without risking polluting Java EE too much with a bunch of yet unproven ideas (or worse, outright bad ideas that happen to be trendy for a moment).

MicroProfile also serves as an important reminder to Oracle that it does not have a monopoly on standardization in server-side Java. If it fails to be a good steward for Java EE, an alternate standard can and will be naturally formed.

Lastly, MicroProfile is a good antidote to some of the deliberately designed Java EE bashing some vendors engage in (I think we all know who these vendors and individuals are). They know fully well that Java EE tries to do the right thing by avoiding hype-driven features. They take advantage of this principled and disciplined standardization approach by continually claiming Java EE is "not relevant" because it does not immediately jump on the hype of the day. Things like MicroProfile are great because it allows vendors that embrace Java EE to still take part in the hype bandwagon in their products without destroying one of the core value propositions of standards as a critical insulator against vendor hype.

My only current concern with MicroProfile is the potentially needless duplication of effort with what Oracle has announced for an accelerated Java EE 9. I hope the people involved with MicroProfile are keeping a cool head and properly negotiating and collaborating with Oracle, even if it is behind the scenes. Whether we like it or not, any standardization effort without a major vendor like Oracle is weaker, not stronger. It is also a Herculean and perhaps Quixotic task to try to re-create the JCP. Given an opportunity, I know Oracle has the resources to do the right thing for it's business and the community. Like anywhere else, there are plenty of idiots at Oracle. The way to make sure the idiots are not too empowered is by working with the right people still inside Oracle.

Why Java EE is important?

Java EE is so important it is very difficult to explain its full significance in the span of a single interview. As soon as time allows I plan to blog about this very topic soon. The topic is timely because it is very poorly understood by most developers and that's very dangerous, especially with certain vendors taking a deliberately anti-Java EE stance to advance their own proprietary business agendas - especially on the cloud.

The most obvious critical function for Java EE is that it is the only open standard we have for server-side Java. That's been the case for a very long time and hopefully will remain the case for many more years. Without Java EE you have two very bad possibilities - one far worse than the other. The lesser of the two evils is a bunch of competitors that don't really collaborate and have basically incompatible products. In such a scenario developers are basically locked into a given vendor. If that vendor turns out to be the wrong choice for any reason you have to pay a very high cost of porting all the APIs your application uses. By far the most terrible situation is that the entire server-side Java ecosystem is left to the mercy of a single monopoly vendor with no viable competition. All this is even worse on the cloud since you are locked in not just at the API level but also at the infrastructure level.

By contrast what Java EE enables is a set of uniform APIs that are shared across vendors and implementations. Vendors can effectively compete on implementations, quality of service, price and extensions. Developers are far freer to choose between vendors at will. This is the model that has enabled a robust server-side Java ecosystem for a long time. Developers should be genuinely frightened of what will happen to Java without an important competitive safeguard like Java EE in place.

What is your opinion about JCP?

I have worked inside the JCP for a very long time and honestly have only good things to say about it. I felt I had a real impact, people that really care collaborate openly on the expert groups and the rules that govern the JCP makes sure everything happens in an open, transparent way. This is in sharp contrast to open source projects I have seen. Such projects are open in name but in reality are completely controlled by a small set of committers (often even just a single dictatorial committer). By far the biggest problem with the JCP that I have seen is that not enough developers take the time to participate or care.

That is not by any means to say that the JCP is perfect (let's face it - nothing in real life is). Oracle definitely needs to open up more and relinquish more control of the JCP and Java. Participating in the JCP and implementing Java standards needs to be easier. The only way any of this will happen is by participating and working with Oracle. Having a more open and vendor neutral Java is in the interest of every developer. It is worth the effort and worth trying.

Oracle announced at JavaOne releases of Java EE 8 and Java EE 9 for the next two years. Did the announcement surprised you?

The fact that Oracle would be forced to recommit to Java EE does not surprise me at all. The underlying long-term fundamental financial factors really made what Oracle had been doing for a few months quite mindless. It is the result of the over-empowered idiots at Oracle that I alluded to earlier. Hopefully these people have now learned their lesson and the right people inside Oracle have been empowered to do the right thing for the community and Oracle's business.

What surprised me is the speed at which we were able to get Oracle to recommit. The problem with idiots is that it is hard to get them to admit they were wrong. It is possible these people were side-lined when decisions at Oracle were corrected once the right people with adequate authority figured out what was going on.

How Java EE 8 is doing? What is the progress?

At the moment Java EE 8 is looking quite good. Although we have not yet formally updated our public tracking data, anecdotally it looks like there is a significant up-tick in overall activity from Oracle. It may even be possible Java EE 8 will be delivered sooner than Oracle has promised. I think this is the right point to forgive Oracle's past mistakes and refocus on what they are doing right and can do right as the Java steward. That does not mean of course that we do not keep our ears and eyes open.

Can you share any resources (blogs, etc feel free to promote yourself) with us?

The best thing developers can do is stay tuned to the Java EE Guardian Twitter account and Google Group. Those are our main open coordination mechanisms. We need everyone's help to keep moving Java EE forward. No support is too big or too small. As we have shown already, the grassroots community working together can achieve remarkable things vendors can't even begin to imagine. Together humble server-side Java developers can ensure their interests are preserved above all.

Reza, thank you for the interview!


NEW workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

Java 8 Base64 Encoding / Decoding

Java 8 comes with the Base64 class which supports Base64 encoding / decoding out-of-the-box:


import java.util.Base64;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import org.junit.Test;

public class Base64Test {

    @Test
    public void encodeAndDecode() {
        final String rawString = "duke";
        Base64.Encoder encoder = Base64.getEncoder();
        byte[] encodedContent = encoder.encode(rawString.getBytes());

        Base64.Decoder decoder = Base64.getDecoder();
        byte[] decodedContent = decoder.decode(encodedContent);

        String decodedString = new String(decodedContent);
        assertThat(decodedString, is(rawString));
    }
}

See you at 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 workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

Java 8 partitioningBy Example

A developer has a favorite programming language:


public class Developer {

    private int age;
    private String favoriteLanguage;

    public Developer(int age, String favoriteLanguage) {
        this.age = age;
        this.favoriteLanguage = favoriteLanguage;
    }

    public int getAge() {
        return age;
    }

    public String getFavoriteLanguage() {
        return favoriteLanguage;
    }

    @Override
    public String toString() {
        return "Developer{" + "age=" + age + ", favoriteLanguage=" + favoriteLanguage + '}';
    }
}

A team has more than one developers. Now we would like to know which programming languages are used by developers younger than 30. Collectors#partitioningBy expects a Predicate (filter) which "partitions" all developers into two buckets identified by a "boolean":

import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.junit.Test;

public class PartitioningByTest {

    @Test
    public void partitionByAge() {

        List<Developer> team = Arrays.asList(
                new Developer(18, "java"),
                new Developer(20, "java"),
                new Developer(35, "javascript"),
                new Developer(50, "javascript"),
                new Developer(50, "logo"));

        Map<Boolean, List<Developer>> youngerThan30 = team.
                stream().
                collect(Collectors.partitioningBy(d -> d.getAge() < 30));
        System.out.println("Developers younger than thirty are using: " + youngerThan30.get(true).stream().
		map(d -> d.getFavoriteLanguage()).
		collect(Collectors.toSet()));
        //Output: Developers younger than thirty are using: [java]
        System.out.println("Developers older than thirty are using: " + youngerThan30.get(false).stream().
		map(d -> d.getFavoriteLanguage()).
		collect(Collectors.toSet()));
        //Output: Developers older than thirty are using: [logo, javascript]
    }
}

Related: Java 8 CompletableFuture Example

See you at 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 workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

Java 8 groupingBy Example

A developer has a favorite programming language:


public class Developer {

    private int age;
    private String favoriteLanguage;

    public Developer(int age, String favoriteLanguage) {
        this.age = age;
        this.favoriteLanguage = favoriteLanguage;
    }

    public int getAge() {
        return age;
    }

    public String getFavoriteLanguage() {
        return favoriteLanguage;
    }

    @Override
    public String toString() {
        return "Developer{" + "age=" + age + ", favoriteLanguage=" + favoriteLanguage + '}';
    }
}

A team has more than one developers. Now we would like to group the developers by their favorite language. Collectors#groupingBy groups classes by properties out-of-the-box:


public class GroupingByTest {

    @Test
    public void groupByFavoriteLanguage() {

        List<Developer> team = Arrays.asList(
                new Developer(18, "java"),
                new Developer(20, "java"),
                new Developer(35, "javascript"),
                new Developer(50, "javascript"),
                new Developer(50, "logo"));

        Map<String, List<Developer>> developersByLanguages = team.
                stream().
                collect(Collectors.groupingBy(Developer::getFavoriteLanguage));

        System.out.println(developersByLanguages);
	
		/* output:
            {java=[Developer{age=18, favoriteLanguage=java}, Developer{age=20, favoriteLanguage=java}], 
            logo=[Developer{age=50, favoriteLanguage=logo}], 
            javascript=[Developer{age=35, favoriteLanguage=javascript}, Developer{age=50, favoriteLanguage=javascript}]
            }
		*/

        Map<String, Double> favoriteLanguageByAverageAge = team.
                stream().
                collect(Collectors.groupingBy(Developer::getFavoriteLanguage,
                        Collectors.averagingInt(Developer::getAge)));
        System.out.println(favoriteLanguageByAverageAge);
		/* output:
    		{java=19.0, logo=50.0, javascript=42.5}
		*/
    }
}

Related: Java 8 CompletableFuture Example

See you at 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 workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

Java Is #1 In January 2017

Java is #1 (17.278%, -4.19%), C is #2 (9.349%, -6.69%) and Go jumps from #54 to #13 (2.325%, +2.16%). [Source: TIOBE Index for January]

See you at 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 workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

Spring Boot vs. Wordpress, SOAP Rocks, CDI CMT, Reactive vs. Blocking IO, or 34th airhacks.tv is available

The 1.2017 airhacks.tv was the most popular ever. 212 live viewers attended the 34th airhacks.tv with 20+ topics covered:

Still not everything crystal clear? Start asking now: https://gist.github.com/AdamBien/4791c4a5e8f06b0b8772ab6df6772001

See you at 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 workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

2017 Predictions

My 2017 predictions:

  1. Back to insourcing: If you are pragmatic, software development is easier than ever. The only challenge is the deep understanding of the domain concepts and requirements (=the product thinking). Companies starting to realize that if they outsource their core expertise, nothing remains left. They become a "gray mass" indistinguishable from their competition. I'm also expecting increased investments in internal teams.
  2. Java is fast, productive, mature and extremely popular. Therefore the year 2017 is going to be full of "Bashing On Java" articles like e.g. "Oracle finally targets Java non-payers" Writing negative articles about Java draws lot of attention and so traffic. Publishers are under pressure -- writing blog posts, articles and content targeted against the Java programming language increases traffic and is good for business.
  3. I expect to see the first failures of microservice projects accompanied by some negative press. There are many projects out there with trivial business logic deployed on an unnecessary high amount of independent deployment units.
  4. I would expect some backlash against Fat WARs, Ueber JARs etc. I don't see any benefits, just disadvantages. Mixing a big amount of barely changing dependencies at each build, with tiny amount of frequently changing business logic sounds like Cargo Cult to me.
  5. Finally the microservice movement increased the need for monitoring. I expect the first "data overflow exceptions". I observe the tendency to gather all possible metrics without thinking about their meaning. It reminds me of past projects which generated gigabytes of logs with only a little amount of contained information.
  6. Demise of JavaScript frameworks: JavaScript and HTML 5 standards are become more and more powerful. You can achieve a lot without any external dependencies. One could say: JavaScript development becomes more and more similar to Java EE.
  7. Projects become more pragmatic with more focus on users and less on fancy, but optional frameworks. "Brick and mortar" companies are going to recognize, that they requirements and scale differ from Netfix, Twitter, Facebook and Co. What works great for Netflix, might be an overhead for a regional company.
  8. JDK 9 is scheduled to 23rd March 2017. Particularly "senior" developers and architects are going to get really excited about Jigsaw. This will lead to proliferation of unnecessary modules. On the other hand Java 9 becomes even more interesting for microservice deployments.
  9. Companies will start to recognize, that Angular 2 is more similar to React, than to Angular 1.
  10. "Inclouding" :-) Hardware becomes less and less expensive and cloud management software becomes also available on premise. I'm expecting a slow trend towards private clouds.
  11. Java EE projects become more pragmatic. Already in 2016 it was relatively easy for me to let projects delete unnecessary patterns, indirections and modules. There are no arguments left against "Thin WARs", fast deployments, no setup and focus on the actual requirements
See you at 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 workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

Java EE vs. Spring, State of Microprofile, Is SOAP nice? Oracle targets non-payers or the topics for the 1.2017 / 34th airhacks.tv

In the first edition in 2017 (or 34th episode, 9th January, 2017, at 6pm CET) of airhacks.tv we (=me + chat) will cover the following questions:

  1. The state of microprofile.io
  2. Motivation for StatusTest
  3. Java EE -- feedback from JUGs
  4. Micro, Swarms and co. the possible killer use case.
  5. SPA and JAX-RS. One or multiple projects?
  6. Files filtering and Java FX
  7. REST architecture in 5 mins
  8. Should we keep SOAP?
  9. Personal opinions on article: "Oracle finally targets Java non-payers"
  10. CDI with transactions
  11. When should we start to worry about performance?
  12. How we can communicate multiple microservices without share their DTO's?
  13. A lean way to inject properties with Java EE.
  14. Java EE vs. Spring
  15. Is it possible to put HTML5 application after the .war has been compiled?
  16. Future of NetBeans
  17. Non blocking IO vs. JDBC, Java EE and scalability
  18. How to connect SPAs with backend efficiently
  19. Java EE vs. Spring Cloud -- how to deal with non functional requirements
  20. Can we start threads in a @Singleton?

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 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 workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

My Blog is a Personal Notepad

In the second post of this blog "Why blogging?" eleven years ago I was not sure about the whole point of blogging. After 11 years, my blog became a personal reference ( archive.adam-bien.com ) and notepad which I frequently use in my consulting / development / client work. I capture code snippets, ideas and sometimes expose my personal opinion and I'm curious about reader's feedback.

Probably caused by the popularity of Java EE, I get frequent (nearly weekly) proposals for guest articles intended to be published on this blog. I did not accepted any guest content so far -- and I don't plan to accept any guest articles work in future either.

However: if you are involved in an interesting, thin WARs (=productive, minimalistic, pragmatic) Java EE 6/7 projects or products, drop me a comment or tweet ( @AdamBien ). I would like to interview you.

Any questions left? See you at the next airhacks.tv.

See you at 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 workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

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