Česky   |  Deutsch   |  English   |  Español   |  Français   |  Indonesia   |  日本語   |  한글   |  Polski   |  Português (BR)   |  Türkçe   |  中文   |  正體中文   |  Your Language  
PlanetNetbeans
Planet NetBeans is an aggregation of NetBeans related musings from all over the Blogosphere.
Feeds
[RSS 1.0 Feed] [RSS 2.0 Feed]
[FOAF Subscriptions] [OPML Subscriptions]
Do you blog about NetBeans ? Add your blog to PlanetNetBeans.
Feed Subscriptions
APIDesign - Blogs (feed)
Carsten Zerbst's Weblog (feed)
Winston Prakash's Weblog (feed)
NetBeans – Michael's blog (feed)
ProNetBeans (feed)
Paulo Canedo » NetBeans English (feed)
NetBeans – NetBeans Ruminations (feed)
Anchialas' Java Blog (feed)
Need to find a title (feed)
Category: NetBeans | Software and Science (feed)
Roger Searjeant's blog (feed)
Adam Bien (feed)
Inspiration and Expression » Netbeans (feed)
DukeScript (feed)
Bernhard's Weblog (feed)
Michel Graciano's Weblog (feed)
Ramon.Ramos (feed)
Ozone and Programming » netbeans (feed)
netbeans – markiewb's blog (feed)
Arun Gupta, Miles to go ... (feed)
Geertjan's Blog (feed)
.JARa's Bilingual Weblog (feed)
JavaFX Composer (feed)
The Java Jungle (feed)
Jesse Glick (feed)
Martin Grebac (feed)
The NetBeans Community Podcast (feed)
NetBeans Profiler (feed)
NetBeans for PHP (feed)
NetBeans Web Client (feed)
Rechtacek's (feed)
Virtual Steve (feed)
The Aquarium (feed)
Tinuola Awopetu (feed)
Insert Witty Irony Here (feed)
Netbeans – Gualtiero Testa (feed)
netbeans – James Selvakumar’s Blog (feed)
NetBeans – nB gUru (feed)
netbeans – Newsintegrator Blog (feed)
NetBeans – Praxis LIVE (feed)
NetBeans – TechAshram (feed)
Netbeans – There's no place like 127.0.0.1 (feed)
Anuradha (feed)
Netbeans6/6.5 my best practices (feed)
Java Evangelist John Yeary (feed)
Neil's Dev Stuff (feed)
Computer says null; (feed)
NetBeans Adventures, Java and more (feed)
NetBeans – John O'Conner (feed)
NetBeans Community Docs Blog (feed)
The Netbeans Experience (feed)
NbPython/ jpydbg / pymvs (feed)
Shanbag's Blog (ರಜತ ಲೋಕ) (feed)
Wade Chandler's Programming Blog (feed)
Devlin's Lab (feed)
Big Al's Blog (feed)
Code Snakes (feed)
In perfect (spherical) shape (feed)
Van Couvering Is Not a Verb (feed)
Diego Torres Milano's blog (feed)
Vroom Framework (feed)
Messages from mrhaki (feed)
Jeff's Blog (feed)
Manikantan's Netbeans (feed)
Oliver Wahlen's Blog (feed)
Shuttle between Galaxies (feed)
Welcome to my live... (feed)
Devel Blog (feed)
diamond-powder (feed)
Antonio's blog (feed)
Where's my Blog?!

Powered by:    Planet

Last updated:
February 21, 2017 07:08 AM
All times are UTC

Sponsored by
sponsored by Oracle

visit NetBeans website
NetBeans – Michael's blog - February 20, 2017 08:33 PM
JUGC: Java Web Development with TomEE and Vaadin – slides and more

In addition to my impressions of the JUGC evening about TomEE, Vaadin, Linkki and Arquillian, some of the speakers provided me slides and other documentation or links to it. Andy Gumbrecht This demo revolves around the MyBatis JPetStore 6 on Apache TomEE. It includes several examples on how to add EE technoligies to an existing […]

NetBeans – Michael's blog - February 19, 2017 09:14 PM
Impressions from JUGC: Java Web Development with TomEE and Vaadin

On Friday, 17th we had another event at the Java User Group Cologne. An evening about Java web development with Apache TomEE and Vaadin. More than 40 Java enthusiasts participated that evening. The event was hosted by Faktor Zehn, the company which hosted the first NetBeans Evening Colonge, too. The evening was scheduled from 6:30 […]

Geertjan's Blog - February 19, 2017 01:36 PM
From AngularJS to Oracle JET at DevNexus

I'm going to DevNexus this week. There'll be a NetBeans booth and several NetBeans community members in attendance, drop by and come and chat about NetBeans, Apache, etc!

Also, I'll be talking about Oracle JET:

https://devnexus.com/s/devnexus2017/presentations/17974

I'll take an AngularJS/Ionic application Matt Raible created and talked about recently at Jfokus and I'll show how that application looks and how it is structured when created via Oracle JET. I'll discuss the similarities/differences and advantages/disadvantages. Here's the repo where I am working on this:

https://github.com/GeertjanWielenga/jet-hello-world

So, if you're exploring alternatives to AngularJS/Ionic, come to the session and see the approach you can take with JET to create web or mobile applications. The pic on the left is Matt's AngularJS/Ionic app, on the right is my JET app:

Geertjan's Blog - February 16, 2017 03:37 PM
Oracle JET at Transfer Solutions (Part 2)

I attended an excellent session about Oracle JET by Lai Ho Yueng and Maresa Bunschoten, from Transfer Solutions in Leerdam in the Netherlands. Transfer Solutions, an Oracle partner, regularly hosts free knowledge sharing sessions. Some time ago, I was invited to talk about Oracle JET (as described here in part 1) and in the meantime developers at Transfer Solutions are using Oracle JET to create mobile and web products for their customers.

Before the break, Maresa did a thorough overview of Oracle JET and all that it provides:

She started by talking about the difference between web, mobile, and hybrid development and then discussed how Oracle JET covers all of these paradigms from the same codebase. 

After the break, Lai showed an application that makes use of offline features in Oracle JET, based on a real application in production at a client site.

And it was clear that NetBeans IDE was a handy tool to use for JavaScript development, especially the integration with the Chrome browser, demonstrated by Lai.

It was a good event, with around 30 attendees. Clearly the message of Oracle JET as a toolkit for mobile and web development is spreading!

APIDesign - Blogs - February 16, 2017 10:40 AM
Codesnippet Doclet 0.20 Release

Enhance your Javadoc with Codesnippet4Javadoc version 0.20 which now supports special "coloring" for strings and comments.

--JaroslavTulach 10:40, 16 February 2017 (UTC)

Geertjan's Blog - February 14, 2017 11:37 AM
NetBeans and Apache (Part 2)

Since the various announcements about NetBeans transitioning to Apache, what's been going on and what's the current status?

Before reading on, take a look at the following:

Well, if you're asking "what's been going on?" it simply means you're not part of the discussion, which is a simple step-by-step process to be part of:

https://cwiki.apache.org/confluence/display/NETBEANS/How+to+Participate

After following the above, you'll be on the NetBeans Apache developer mailing list and be able to follow the process as it happens. Right now, weekly updates are provided on the process.

In short, Oracle is going through the process of making sure that the NetBeans repositories that are targeted at being donated to Apache do not contain anything that should not be donated. For example, Oracle cannot donate files that are not Oracle's to donate. The repositories contain code going back 20 years, since NetBeans has existed since 1995/96, and are therefore full of potential accidental reusages of code that may or may not belong to Oracle, e.g., that could be forks of the JDK, for example. All files are being examined for such instances, including missing copyright notices, and similar potentially problematic areas.

Which repositories are we talking about? How long will all this take? Scroll to the end of the page here for details:

https://cwiki.apache.org/confluence/display/NETBEANS/Apache+Transition

The aim is for NetBeans 9 to be released as a top level Apache project together with the release of JDK 9. Prior to that, i.e., in order to move out of the Apache Incubator, there needs to be at least one release of NetBeans done from within the Apache incubator, i.e., NetBeans IDE 8.2.1 or NetBeans IDE 8.3.

So, those are tight deadlines we're aiming for, though all sides are clear about what we're targeting and focused on meeting those deadlines. Things are looking good and, speaking for myself, I'm happy that we're going through such a thorough process, since the end result will be clear and comprehensive to everyone involved.

And, guess what, the Apache NetBeans community already has a new website in place, clearly a work in process though it's awesome we have it at this stage already, with thanks especially to Chris Lenz from Leipzig who is leading this project:

netbeans.apache.org

If you're out there and interested in joining in and keeping in touch with the process, go here to get started:

https://cwiki.apache.org/confluence/display/NETBEANS/How+to+Participate

Adam Bien - February 14, 2017 09:41 AM
Pushing Full Profile Java EE Applications To Amazon EC2 Container Service

In this screencast I created from scratch with Maven, built (CentOS, JDK, Payara, Thin WAR, taken from docklands) and pushed a Full Profile Java EE 7 (Payara Full) application to Amazon EC2 Container Service cluster.

The ECS cluster is running on the smallest "free tier" available Amazon EC2 machine t2.micro (1 CPU and 1 GB RAM). t2.nano (512 MB max) would also work -- but is not eligible for free tier.

See you at Java EE Microservices. Is Munich's airport too far? Learn from home: javaeemicro.services.


Real World Java EE Workshops [Airport Munich]>

Adam Bien - February 09, 2017 08:55 AM
20+ Topics in 45 mins -- 35th airhacks.tv Questions and Answers

90 live attendees, 20+ topics in 45 mins ranging from Java EE 8 News over JPA relations in MSAs to cross-field validation. The 35th (2.2017) airhacks.tv is available:

Watch past episodes with: airhacks.tv playlist.

Any questions left? Ask now gist.github.com/AdamBien/4500d4f7e546ea7f242baaec2e2f6616 and see you at March, 6th, 6pm CET.

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.


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - February 08, 2017 08:00 AM
NetBeans Day France 2017

The Laboratoire d'Informatique de Grenoble hosted NetBeans Day France yesterday.

The event was sponsored by Davidson in Paris, who provided the great lunch!

The program included the following topics:

  • Reactive Systems with Eclipse Vert.x and Red Hat Open Shift (Clement Escoffier, Red Hat)
  • Développement entreprise JavaScript avec Oracle JET (Geertjan Wielenga, Oracle)
  • Jouer avec Spring Boot et Docker (Nebrass Lamouchi, Davidson SI)
  • JBoss Forge, WildFly et Java EE (Emmanuel Hugonnet, Red Hat)

The day began with a session about the NetBeans project, its history, unique features, and transition to Apache.

Clement Escoffier demoed in a lot of detail Vert.x together with OpenShift and NetBeans IDE:

That was followed by me talking about Oracle's new JavaScript toolkit, Oracle JET:

I had to leave shortly after the above, though I heard Nebrass and Emmanuel did great sessions on Spring Boot and Docker (Nebrass) and JBoss Forge, WildFly, and Java EE (Emmanuel). Both Emmanuel and Nebrass are NetBeans Dream Team members, great to have worked with them to organize this event. And thanks again, Davidson in Paris, for sponsoring the lunch for this successful event.

Possibly we could have two NetBeans events in France each year. One in Grenoble and the other in Paris! 

Adam Bien - February 08, 2017 07:18 AM
JPA and Microservices, RxJava, CRUD and TX, Gradle, Cross Field Validation, Licensing, MDA or Topics For The 35th airhacks.tv

Questions (gist) for the 35th airhacks.tv, February 8th (exceptionally at Wednesday, not Monday), 6 pm CET:

  1. Java EE 8 News
  2. Java SDK for Oracle Bare Metal Cloud Services github.com/oracle/bmcs-java-sdk
  3. Handling JPA relationships in CRUD microservice scenarios
  4. The role of RxJava in typical enterprise applications
  5. JAX-RS: returning Response vs. objects and JSON vs. XML
  6. Useful Java EE 7 tools
  7. Cross-field entity validation
  8. GPL/LGPL, opensource and commercial projects
  9. What is www.pac4j.org?
  10. Transactions, CRUD-Services (BCE), EntityManager and connection sharing
  11. (SCM) Managing, Structuring and organizing microservices
  12. Gradle adoption, gradle vs. maven
  13. Dealing with (setup) scripts in Java EE environment
  14. Oracle JDK vs. openJDK and licensing
  15. Greatings from Panama: gitbook.com/book/avbravo/jmoordb
  16. The role of Model Driven Architecture in Java EE

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.
Real World Java EE Workshops [Airport Munich]>

Adam Bien - February 06, 2017 05:32 AM
JSON Is The New Data Transfer Object (DTO)

The JSON processing API comes with Java EE 7 and is already integrated with JAX-RS. JsonObject and JsonArray are serialized and deserialized by the JAX-RS runtime without any additional effort.

JsonObject is a Map<String, JsonValue> and so a generic and dynamic DTO.

Because the entities know their state and also have access to private data, the JSON-mapping happens directly within the domain objects:

    
public class Workshop {

    private String name;
    private int duration;

    public Workshop(String name, int duration) {
        this.name = name;
        this.duration = duration;
    }


    public Workshop(JsonObject input) {
        this.name = input.getString("name");
        this.duration = input.
                getJsonNumber("duration").
                intValue();
    }


    public JsonObject toJson() {
        return Json.createObjectBuilder().
                add("name", this.name).
                add("duration", this.duration).
                build();
    }
}
    
    

Now the JAX-RS resource class only has to invoke the entities method to map from and to the JsonObject representation:

        
@Stateless
@Path("workshops")
public class WorkshopsResource {

    @Inject
    RegistrationStore store;

    @GET
    public JsonArray all() {
        JsonArrayBuilder list = Json.createArrayBuilder();
        List<Workshop> all = this.store.all();
        all.stream().map(Workshop::toJson).forEach(list::add);
        return list.build();
    }

    @POST
    public void save(JsonObject input) {
        this.store.save(new Workshop(input));
    }
}
        
    
See you at Java EE Microservices. Is Munich's airport too far? Learn from home: javaeemicro.services.
Real World Java EE Workshops [Airport Munich]>

Adam Bien - February 03, 2017 09:46 AM
Asynchronous WAR To WAR Communication With WebSockets

WebSockets come with Java EE 7 and require no additional dependencies or libraries. Particularly in "microservices architectures" websockets are an interesting option for the implementation of WAR to WAR communication.

In this screencast I created two WARs from scratch and let them communicate via WebSockets:

See you at Java EE Microservices. Is Munich's airport too far? Learn from home: javaeemicro.services.
Real World Java EE Workshops [Airport Munich]>

Adam Bien - February 02, 2017 10:48 AM
Creating A CustomElement (WebComponent) From Scratch

Building a native, vanilla, HTML 5 Custom Element (a WebComponent standard) without any external dependencies from scratch:

Polyfills are available for older browsers.

See you at Java EE Workshops at Munich Airport, Terminal 2 and particularly at JavaScript and WebEssentials Workshop
Real World Java EE Workshops [Airport Munich]>

netbeans – markiewb's blog - February 01, 2017 04:21 PM
NBP: How to brand a Maven-based NB platform application using resource-filtering

Based on a discussion in the mailing list the following FAQ entry has been created. 

http://wiki.netbeans.org/DevFaqVersionNumber#How_do_I_set_the_version_number_automatically_in_maven-based_applications.3F
It explains how use the maven-resource-plugin to replace content in the bundles. The example there shows you how to set the title of your NB platform application based on the version in the pom.xml. 


Adam Bien - January 31, 2017 05:19 AM
60k eBills per Hour, Tiny WARs -- Or Java EE 7 In Mass Billing and Public Services Market in Slovenia

Aleksander, please introduce yourself

My name is Aleksander Bastl and I am a software engineer that has more than 30 years of experience in software development. I'm currently working on a PhD on the topic "Using the IOT devices for bridging the gap between Smarthome and SmartGrid". I am also president of the software vendors section in the "Chamber of Commerce and Industry of Slovenia", where I led a working body for the preparation of a national standard called e-Slog 1.6.1., which has since been accepted and now defines the legal basis of electronic exchange of invoices in Slovenia. https://e-slog.gzs.si/vsebina/e-SLOG-dokumentacija-za-XML-enostavni-ra%C4%8Dun-verzija-16. At the moment I'm also one of the few Vaadin certified engineers in Slovenia. I founded "Vaadin Meeting Group Slovenia", where Slovenian Vaadin users can exchange their experiences www.meetup.com/Vaadin-Slovenia/. I am also the owner and manager of a Slovenian company Bass d.o.o. (www.bass.si), where I am actively involved in our development cycle from a business perspective. We are well-versed and specialized in mass billing systems such as public water services, garbage collection, gas, heat, waste water... We have been in this particular business for more than 25 years and in this segment we currently cover more than 2/3 of the Slovenian market.

You told me during the airhacks, you are a founder of several companies. Are all companies using Java EE?

Companies Bass d.o.o (www.bass.si) and Ring d.o.o ( www.ring.si ), which are involved with development of new mass billing software are using Java EE 7. Using java EE we have developed quite a few solutions. To name a few examples: a paperless business environment, that can be used as a full cloud solution with personal certificates for security (BassDok), a time record for employees, a mobile work order program that is accessible with a tablet etc. Novatel and Eurotel (www.novatel.si , www.eurotel.si) are involved with VoIP technologies. We are developing software in Scala - also a JAVA derivative. We put special emphasis on better responsiveness, so we use more process oriented software that can handle transit for VoIP exchange with a few thousand parallel VoIP channels at once.

What are you currently building with Java EE?

At the moment we are developing several projects. Salary accounting (which is complex from a legal aspect), information portal for utility services, invoices with massive PDF generation (500.000+ monthly), mass billing used in public services (Developing new generation in JAVA EE)...

Can you share with us some geeky numbers like e.g. TX per seconds, heap sizes, thinnest WARs etc -- whatever Java EE devs might find interesting.

Java EE enables us to write highly scalable and compact programs. I find our electronic Invoices very interesting, since despite being one of the biggest providers in our country, our business logic part of WAR is less than 6MB big and without load balancing a virtual machine with a configuration of 12GB of ram and 4 cores is capable of around 60.000 transaction per hour if the eBill is not larger than 500 KB (normally they average around 300KB). Our Salary accounting business logic is only 350KB and 9MB with Vaadin UI.

Are you happy with Java EE so far? Is Java EE productive?

Yes im very pleased with Java EE 7 so far, because our main focus lies in the business logic, for which we invest a lot of time. Using Java EE results in a very fast development cycle and its usage enables us to write compact and readable code. We are also very pleased with UnitTesting, because it helps us release better products for our users.

Which application servers, tools or IDEs are you using?

We are currently using Payara. Our migration to it from Glassfish was smooth. For developing, we are using IntelliJ and Vaadin.

How important are standards for you? Does your application depend on application server specific APIs?

Java EE standards are very important and we follow JAVA EE 7 standards. Our applications are not dependent on application server specifics, we are very strict and use only on Java EE 7 specifications which are more than sufficient for our needs. With this strategy we are fully JAVA EE server independent.

Which Java EE APIs are your favorites?

JAX-RS, JPA, EJB, CDI (@Inject)

You attended the airhacks.com several times. Did you had the chance to chat with other attendees during the airhacks? If yes, what was the most interesting project / problem / use case in the workshops?

Yes we talked with other training participants about our and their projects and exchanged some ideas and benefits of JAVA EE.

How much code have / external libraries you deleted after the airhacks workshop? :-)

Every time we come back from an Airhacks workshop we have a fresh look on how to code in Java EE. We actually attended Java EE bootstrap and Java EE effective workshops before we started first big projects in Java EE, which helped us to differentiate between do's and don'ts very early in the development. We adopted and applied BCE patterns from the very beginning with very few external libraries except Vaadin framework for UI. With later visits of workshop we managed to simplify development cycles with simple tricks that were shown, like using abstract classes and simple unit tests. We have been coming back ever since to find out about new technologies and to strengthen our confidence that we are on the correct path.

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

In Java EE7, we have developed and manage a processing center for the exchange of e-invoices ( www.procesni.center), which received EuroCloud award in category "Best cloud solutuion for horizontal market". Online portal designed to end customers of public service www.komunala.info. A user can find out about the state of meters, review account message, payment status, download e-invoice schedules of waste collection, service contract ...

Aleksander, thank you for the interview!


Real World Java EE Workshops [Airport Munich]>

Adam Bien - January 30, 2017 02:43 PM
Launching Java EE Thin WARs In The Clouds

Java EE (Full Profile) and Thin WARs are particularly suitable for cloud deployments. In this screencast I created from scratch, built (with Maven) a Java EE 7 Thin WAR and pushed the operating system (Cent OS 7) with JVM, Payara Application Server and the WAR to the clouds of jelastic.com.

After deploying it, I created an environment and started the application. Everything took ...6 mins.

See you at Java EE Microservices. Is Munich's airport too far? Learn from home: javaeemicro.services.
Real World Java EE Workshops [Airport Munich]>

NetBeans – Michael's blog - January 24, 2017 09:11 PM
JSF 2.3 Public Review

The specification is now officially available for public review. Get it from the JCP site [1]. One of the big ticket features of this upcoming version is the easy usage of the WebSocket protocol. The expert group defined a <f:websocket> tag. As promised in my last article, I’m going to present a small application next […]

NetBeans – Michael's blog - January 22, 2017 10:33 PM
Using WebSockets with Java EE, part I

The next version of JSF, 2.3 comes with the support of the WebSocket protocol. But can’t we use such with the current version of JSF (2.2)? Yes, we can. Using Java enterprise edition (Java EE) 7 you may create a so called endpoint. NetBeans support creating this out of the box, and it can be […]

NetBeans – Michael's blog - January 21, 2017 01:22 PM
Job opportunity at the Cologne/Bonn area

This site is home of my personal blog. But today I’m going to write about my principal occupation. I am the division manager software development at the German DRG institute [1]. In this role, I’m looking forward for a software developer to join the team. If you fluently speak Java or C# (best: both of […]

DukeScript - January 21, 2017 08:23 AM
Line Charts & more for Java

Including nice looking charts in your Java application has never been easier! DukeScript visual archetype 0.16 gives you absolutely smooth start - just a few clicks in the IDE or shell commands and you are ready to use for example a line chart in your JavaFX, Android, NetBeans Platform or iOS applications.

Explore

Follow the getting started tutorial and on archetype selection panel choose visual archetype:

Once the project is generated and DataModel.java class opened in the editor, you can locate the lineChart function and check what it does. Then you can execute the project. Once you click “Line Chart!” button, the lineChart method is executed and line chart graph is shown:

Now you can use the no redeploy features of DukeScript and change code in the lineChart method. For example modify the values to be drawn at the chart. Once you save and click the “Line Chart!” button again your changes shall be immediatelly applied and visible:

This is a handy way to explore the Charts API and interactively play with it.

Embed

Once your sample is working you can include your chart in any Java application: Let it be JavaFX, Android, etc. For example adding such nice charts into your NetBeans Platform application is a matter of pressing the “Run” button on the generated (if you selected such option in the wizard) project:

Embedding into JavaFX application is simple as well. Using great looking charts from Java has never been easier!

Command Line Usage

Last, but not least: you can follow the same tutorial without the need to start NetBeans IDE. Just type this on command line:

$ mvn archetype:generate
	-DarchetypeGroupId=com.dukescript.archetype
	-DarchetypeArtifactId=visual-archetype
	-DarchetypeVersion=0.16
$ cd generateddir
$ mvn install
$ mvn -f client exec:exec

The behavior of your project shall remain the same, including the no redeploy features and other DukeScript goodies.

Adam Bien - January 20, 2017 10:11 AM
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.
Real World Java EE Workshops [Airport Munich]>

NetBeans – Michael's blog - January 18, 2017 05:53 AM
JSF 2.3 Public Review

Since today the latest JSF spec is available for public review [1]. Take a look! [1] javaserverfaces.java.net/docs/2.3

NetBeans – Michael's blog - January 17, 2017 10:48 PM
Retrieve ViewScoped bean from session map

Since JSF 2.0 it is preferred to use CDI beans over JSF managed beans [1]. Different annotations are available to support different scopes, e.g. @RequestScope or @SessionScope. Sometimes you need to access such a bean from a piece of software where you don’t have direct access to the FacesContext. Lets assume, you run a different, […]

Geertjan's Blog - January 17, 2017 08:00 AM
London App Brewery and Oracle JET at Oracle London Office

London App Brewery is a great organization run by Philipp Muellauer and Angela Yu, focused on mobile development. They organize workshops, training sessions, and events. Yesterday Oracle hosted a London App Brewery event about Oracle JET, at the Oracle office in central London: How to Visualise Data and Analytics on Mobile and Web Apps using Oracle JET.

The event was well attended and very diverse, from students to professionals and from all kinds of industries. I introduced mobile development with Oracle JET to the group and there was a lot of discussion and interaction afterwards. People really appreciated how Oracle is taking an open source approach based on existing libraries and technologies, rather than reinventing the wheel and building new frameworks etc.

There were also some nice Tweets:

Anyone out there looking for a partner to organize sessions about mobile development in and around London, let Philipp and Angela know at London App Brewery, I can highly recommend them, they have a large database of technology enthusiasts and are great to work with! 

Also, many thanks to my colleague Paul Tinker, who made all the connections between people and organizations and enabled everything to happen. :-) 

Adam Bien - January 17, 2017 04:56 AM
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!


Real World Java EE Workshops [Airport Munich]>

Adam Bien - January 16, 2017 06:07 AM
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.
Real World Java EE Workshops [Airport Munich]>

NetBeans – Michael's blog - January 15, 2017 09:48 PM
Publication page updated

I updated the list of my publications [1]. I’ve been astonished, how much articles I wrote beside the articles of this blog during the last few years. Most articles dealing about software development. Some of them describing NetBeans or dedicated features of this great IDE. I hope, I could provide a lot of useful information […]

Adam Bien - January 15, 2017 02:39 PM
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.


Real World Java EE Workshops [Airport Munich]>

DukeScript - January 14, 2017 04:43 PM
Try native presenters!

There are new archetype versions that make it easy to use the native presenters. What are the native presenters? What is a presenter?

In DukeScript a presenter is a system that makes sure your Java application finds proper HTML rendering environment. By default, when running on desktop, we use and recommend to use JavaFX WebView. However sometimes you don’t want the JavaFX bloat - sometimes you want to render as lightweightly as possible.

With DukeScript webkit presenter, this is possible - on Linux and on Mac OS X. The ability is there for a few months, but now there also is a simple way to achieve that with the archetypes version 0.16. Here are the steps based on our command line tutorial:

$ mvn archetype:generate \
	-DarchetypeGroupId=com.dukescript.archetype \
	-DarchetypeArtifactId=knockout4j-archetype \
	-DarchetypeVersion=0.16
$ cd to_the_just_created_dir
$ mvn install
$ mvn -f client exec:exec

That gives you the classical JavaFX WebView component. The component uses WebKit, but the rendering often suffers from JavaFX bugs. Moreover DukeScript is the “Lightweight JavaFX” - e.g. it doesn’t require all the JavaFX overhead. To see that with your own eyes, try a different presenter:

$ mvn -Pbrowser-presenter -f client exec:exec

See the difference? No JavaFX! This is a real browser (or browser component). The actual view differs on your system and configuration (see the README of the presenter project to find out more). The “browser presenter” just starts local HTTP server and let the browser connect to it. That is highly portable, but not as lightweight as it could be.

However there is more: if you are on Linux or Mac OS X, you can also try the direct WebKit presenter:

$ mvn -Pwebkit-presenter -f client exec:exec

On Mac OS X the presenter shall work out of the box. On Linux you may need to install the WebKit component:

$ sudo apt-get install libwebkitgtk-3.0-0

In any case you can see as lightweight presenters as you can get: no unnecessary libraries (like JavaFX) - just Java and WebKit connected with the smart glue of DukeScript.

You can experiment with these presenters also from the NetBeans IDE. Follow the getting started tutorial and then you can easily invoke the presenters from a popup menu of the client project:

Both “lightweight” presenters are released under GPLv3 license. You can play with them as freely as you want. For commercial usage you may want to contact DukeScript and obtain a license. Enjoy Java and WebKit!

Adam Bien - January 14, 2017 07:33 AM
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.


Real World Java EE Workshops [Airport Munich]>