Č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
NetBeans Zone - The social network for developers (feed)
APIDesign - Blogs (feed)
Pandaconstantin (feed)
David R. Heffelfinger (feed)
Carsten Zerbst's Weblog (feed)
Winston Prakash's Weblog (feed)
Michael's blog » NetBeans (feed)
ProNetBeans (feed)
Paulo Canedo » NetBeans English (feed)
Need to find a title (feed)
Category: NetBeans | Software and Science (feed)
Roger Searjeant's blog (feed)
Optonline Webmail (feed)
Allan Lykke Christensen » NetBeans (feed)
Inspiration and Expression » Netbeans (feed)
James Selvakumar's Blog » netbeans (feed)
open source. open mind. (feed)
John O'Conner » NetBeans (feed)
Koberoi Oracle (feed)
nB gUru » NetBeans (feed)
Newsintegrator Blog » netbeans (feed)
Praxis LIVE » NetBeans (feed)
TechAshram » NetBeans (feed)
There's no place like 127.0.0.1 » Netbeans (feed)
Adam Bien (feed)
Ignacio Sánchez Ginés » NetBeans (feed)
Michel Graciano's Weblog (feed)
Ozone and Programming » netbeans (feed)
NetBeans Ruminations » NetBeans (feed)
Tiplite » netbeans (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)
My First Blog - Satyajit Tripathi (feed)
The Aquarium (feed)
Tinuola Awopetu (feed)
Insert Witty Irony Here (feed)
mkleint (feed)
Anuradha (feed)
Netbeans6/6.5 my best practices (feed)
Java Evangelist John Yeary's Blog (feed)
Neil's Dev Stuff (feed)
Computer says null; (feed)
NetBeans Adventures, Java and more (feed)
Bistro! 2.0 (feed)
NetBeans Community Docs Blog (feed)
The Netbeans Experience (feed)
NbPython/ jpydbg / pymvs (feed)
Shanbag's Blog (ರಜತ ಲೋಕ) (feed)
Wade Chandler's Programming Blog (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)
Netbeans IDE Blog by Tushar Joshi, Nagpur (feed)
Devel Blog (feed)
diamond-powder (feed)
Antonio's blog (feed)
Where's my Blog?!

Powered by:    Planet

Last updated:
December 17, 2014 03:05 PM
All times are UTC

Sponsored by
sponsored by Oracle

visit NetBeans website
Adam Bien - December 17, 2014 04:01 AM
Java EE and HTML 5

NetBeans comes with HTML 5 project support. The project wizard accelerates the setup:

See you at Java EE Workshops at Munich Airport, Terminal 2, particularly at HTML 5 workshop or Virtual Dedicated Workshops / consulting.


Real World Java EE Workshops [Airport Munich]>

Adam Bien - December 16, 2014 05:10 AM
Pico Services with Java EE 7 on Java 8 and Docker: Devoxx 2014 Presentation

After introducing Nanoservices, now it is time for some Pico:

See you at:Java EE Microservices Workshop in MUC! or Dedicated Virtual Workshops.


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - December 15, 2014 05:47 PM
Tiling of Editor Documents in NetBeans Platform Applications

A very exciting development for NetBeans users (and developers of applications based on the NetBeans Platform) everywhere.

Take a look at the screenshot below.

Take a look at it again, in particular the buttons within the red rectangle:

Right now, as you can see, those buttons are disabled. Now, however, because more than one document is open, those buttons are enabled:

The buttons are for tiling the editor documents. Here you can see the effect of clicking "Tile Evenly", which is the third of the four buttons:

And this is "Tile Vertically":

There's also "Tile Horizontally" and "Tile Single" (which untiles the tiled documents).

If you'd like this in NetBeans IDE, download the plugin here (restart NetBeans after installing the plugin), while this is also a plugin that is relevant to any other application on the NetBeans Platform that has editor documents. These documents can either be actual text editors or TopComponents of some other kind, e.g., GUI components where the user should be able to enter data of some kind.

http://plugins.netbeans.org/plugin/56815

The source code of the above is here, so that you can integrate it into your own NetBeans Platform application, and where you can also read more about it, including the implementation code, of course:

https://github.com/GeertjanWielenga/TiledNetBeansEditors

Many thanks to Norman Fomferra and others from Brockmann Consult in Germany, who created and open sourced this solution as part of the ESA Sentinel Toolbox, a NetBeans Platform application that is being created for the European Space Agency:

https://github.com/senbox-org/snap-desktop

Here's the ESA home of the Sentinal Toolboxes:

https://sentinel.esa.int/web/sentinel/toolboxes

They've extended the tiling idioms already, so that they now have tileable internal desktops, i.e., workspaces, with floating TopComponents.



They'll be separating out this solution, so that this will be pluggable, and the sources available separately, too. Pretty cool having rocket scientists (OK, they'll deny they're that, but they work in the space industry and are computer scientists, which to me means you're a rocket scientist) working on NetBeans code, isn't it? :-)

Geertjan's Blog - December 14, 2014 11:51 AM
NetBeans Tools for Teachers: Quick Runtime Properties Setter

Imagine you're a teacher. You're teaching a Java course and your students turn in their homework exercises in the form of NetBeans projects. Now you have thirty NetBeans projects, many of them open in NetBeans IDE. For each of them, you need to load an external file as an argument to the main class. Then that file is processed and you can then see whether the code works as expected.

To set the file as an argument for a project, you need to right-click the NetBeans project, choose Properties, and then go to the Run tab, where you can set the runtime argument. That's a lot of tedious work for 30 different projects, plus sometimes you need to change the argument because you want to run a different file or some other set of arguments against the code that your students have provided.

Precisely this problem was described to me at the Hanzehogeschool in Groningen some weeks ago by Michiel Noback, who is one of the teachers there. In the first implementation of the solution, I created a plugin that lets you type the runtime arguments of the current project in the status bar. But, of course, then new requirements came in, one of which was to have some kind of history of the entered arguments, so that the teacher can easily reuse previously used arguments. The status bar isn't a good place for this, since a drop-down list of some kind is needed, so I moved the feature into the toolbar:

Take note of the drop-down list in the toolbar above. How to use this feature? Firstly, make sure a file is open from the project where you want to set the runtime properties via the drop-down list in the toolbar. It can be any file from that project, most logically it would be a Java source file, since that's where you'll be focused on when examining a student's work. Then go to the drop-down list in the toolbar and type the arguments you'd like to pass into the constructor of the application. Then, importantly, press Enter. When you press Enter, a change is made to the project.properties file where the runtime arguments are defined. At the same time, the arguments you entered are added to the list in the drop-down, so that you can later look in that list, find the arguments you'd like to reuse, and then press Enter again to apply them to some other current project you're looking at.

Get the plugin here, works in NetBeans IDE 8.0.2:

http://plugins.netbeans.org/plugin/56693

Apparently there's a bug with this, related to setting breakpoints, but I haven't been able to reproduce that problem yet.

Geertjan's Blog - December 13, 2014 01:23 PM
YouTube: Integrate Code Templates into Code Completion

When you assign a code template to a context, the Code Completion box will show your code template in the context where you're working. Nice and powerful and hidden tip, watch it in action here:

Related discussion: https://netbeans.org/bugzilla/show_bug.cgi?id=212176

NetBeans Zone - The social network for developers - December 13, 2014 09:49 AM
Clement Levallois: My Five Favorite NetBeans IDE Features!

Continuing a series of articles focusing on NetBeans users and their five favorite NetBeans IDE features, here's the next part, by Clement Levallois. -- NetBeans team. Preview Text:  Robustness, code generation, hints, Java EE and more! Find out what Clement Levallois from Lyon, France, likes about NetBeans IDE. Legacy ...

Geertjan's Blog - December 12, 2014 11:10 PM
YouTube: Code Templates in NetBeans IDE

Everything you need to know about where and how to find, display, and configure code templates in NetBeans IDE!

Adam Bien - December 12, 2014 07:44 AM
Changing Working Directories In Nashorn Scripting

Assigning a directory name to the $ENV.PWD variable: $ENV.PWD="[DIR_NAME]" changes the working directory for the next command:

The ls command will print the contents for directory specified earlier:


#!/usr/bin/jjs -fv
print('Tmp Directory');
$ENV.PWD='/tmp';
$EXEC('ls -al');
print($OUT);
print('Root Directory');
$ENV.PWD='/';
$EXEC('ls -al');
print($OUT);

Thanks to Jim Laskey for the hint

See you at Java EE Workshops at Munich Airport or dedicated / custom virtual workshops!


Real World Java EE Workshops [Airport Munich]>

NetBeans Zone - The social network for developers - December 11, 2014 09:20 AM
Java Antidecompiler for NetBeans IDE

Bis Guard & Co provides  code protection tools for Java, among other languages and technologies. Recently, Bis Guard has released the Java Antidecompiler plugin for NetBeans IDE. Get started with it as described below. Installation 1.  Download "1418138973_JavaAntidecompiler.zip" from this location:   http://plugins.netbeans.org/plugin/51308/javaantidecompiler ...

Geertjan's Blog - December 11, 2014 08:00 AM
YouTube: How to Find the Source of Icons from NetBeans IDE

When you're creating plugins for NetBeans and you want to reuse an icon that you see in NetBeans, what do you do to find that icon in the NetBeans sources? Tackling this challenge is described in this short YouTube clip:

Geertjan's Blog - December 10, 2014 08:01 AM
Python in NetBeans IDE 8.0.2

Let's get started with Python in NetBeans IDE 8.0.2.

Take the following steps:

  1. Prepare. Watch this YouTube movie:

    <span id="XinhaEditingPostion"></span> </p>


  2. Make Sure You're Prepared. Watch the movie again. It takes less than 5 minutes.

  3. Get the Correct Version of NetBeans IDE. Download NetBeans IDE 8.0.2, the "Java SE" distribution, which is the one where I've tried the scenario below. You're free to choose any other distribution, I'd recommend never using "All" except if you really need to do Java ME and C/C++ development, for pretty much all other scenarios, one of the other distributions is much better, i.e., smaller, faster. However, do make sure that you only continue with the next step if you have NetBeans IDE 8.0.2 installed. Note that there is a "2" in the previous sentence, i.e., it is not enough to have NetBeans IDE 8.0, nor to have NetBeans IDE 8.0.1. Instead, dowload and install NetBeans IDE 8.0.2.

  4. Get the Python Plugin for NetBeans IDE 8.0.2. Go here, click Download on the page, and then unzip the file that you have downloaded: http://plugins.netbeans.org/plugin/56795

  5. Go to the Plugin Manager in NetBeans IDE. In NetBeans IDE, go to Tools | Plugins. Click the "Downloaded" tab, which you see below. Click Add Plugins and browse to the folder where you unzipped the files in the previous step. Select them all. You now should see exactly this:



  6. Install the Python Plugin. Click Install. Click Next. Put a checkmark in "I accept the terms in all of the license agreements." Click Install. Click Continue. Click Finish. Click Close.

  7. Go to the New Project Dialog. Go to File | New Project or press Ctrl-Shift-N. You should now see this:



  8. Get Started Creating a Python Application. Click Next. If you have Python installed correctly on your system, you'll see the installations available (look in the "Python Platform" drop-down below), possibly after a moment while NetBeans searches for your installations:



  9. Step Through the Wizard. Pick the Python Platform of your choice, provide a name (e.g., "HelloPythonWorld") and a location to store the application, in the step above, and click Finish.

  10. Run the Python Application. The application opens, click the green Run arrow in the toolbar or right-click the application and choose Run. You now should see this:

Right now, the main missing feature is the set of well established smart editor features in NetBeans IDE, such as code completion, i.e., when you press Ctrl-Space, nothing happens. No error checking, i.e., no parsing is done, either. These are things being worked on right now. However, you can code and run and debug your Python applications, which is a lot more than nothing.

Feedback welcome, especially if you're planning to contribute code to this project.

Adam Bien - December 10, 2014 04:58 AM
JUG Tricity, Microservices and The History Repeats

During the sold-out NetBeans day in Munich with Toni Epple and Geertjan Wielenga, we remembered (Geertjan's Report (green dot on a purple line), my coverage) a NetBeans World Tour trip from Poznan to Gdansk in October 2008 with a rent car and with iPhone 1 as a navigation with a poor internet coverage.

Six years later I gave a session Building Reasonable JavaEE 7 Apps on Java8 called “Microservices" for the Tricity Java User Group. It was exactly the same location and I also used NetBeans.

My airplane was supposed to land in Gdansk, but the weather conditions were bad and the airport was closed. We landed in Poznan instead. Buses were supposed to bring us to Gdansk, but no one knew when they will arrive.

After a hard negotiation I took a taxi instead. The taxi driver was very nice and funny. However, he did not knew the route to Gdansk and was afraid to go fast. I used my phone to navigate him to Gdansk and the venue. At the same time I cranked some Java EE code on the back seat and concurrently watched the speed of the car. I reminded the driver to go fast at any attempt to slow down.

As the driver recognized, that >100 attendees are waiting for us in Gdansk, he became really nervous and begun to sweat.

We had a single stop (at a graveyard) to detach the taxi-light at the roof--to go faster.

Via email I kept Kuba Marchwicki informed about the progress. I came one hour later and Kuba delivered a prelude talk to keep the crowd entertained.

I enjoyed the session, got many interesting questions. The event was stopped by the security--they wanted to close venue for the night.

Next day the airport was still closed. I rent a car and went to Warsaw. But this is a different story :-)

I'm really looking forward to the next Trinity Java User Group meeting. I'm curious what happens then :-).

See you at Java EE Workshops at Munich Airport, Terminal 2 or dedicated virtual workshops!


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - December 09, 2014 05:54 PM
Trip Report: DevFest Istanbul 2014

I had a fantastic time at DevFest Istanbul, Turkey, on Saturday 6 December. It was the first time I was in Turkey. However, over several months, even before knowing I'd be going to this conference, I'd been following a free on-line Yale course on medieval history and then, hey, there I was in Constantinople. Fortunately, Mark Stephens, from NetBeans partner IDRsolutions, and one of the new NetBeans Dream Team members, turns out to have studied medieval history for many years, so turned out to be a perfect tour guide, when we went with a small group to many historical sites, such as the Hagia Sophia.

The conference itself was excellent. Three thousand turned up, to the free conference, which is about twice as many as last year. Mark Stephens did a great session entitled "5 Reasons Why NetBeans Should Be In Every Developer's Toolkit" and I followed with a packed out room, i.e., 800 at least, since many were standing at the doors, "Coding for Desktop and Mobile with HTML5 and Java EE 7", which showed many features in NetBeans, such as the HTML5 tools, Chrome integration, AngularJS features, and Java EE code generators.

Also on the agenda were sessions by PrimeFaces and Vaadin, while Martijn Verburg, London JUG lead, Java champion, etc etc, and one of the new NetBeans Dream Team members did his "The Habits of Highly Effective Teams". But there was much more, in four tracks, most of which I missed because I was at the NetBeans booth answering heaps of questions about NetBeans. We also worked on the next NetBeans community podcast, which will again feature interviews done by NetBeans users with each other, all recorded during the conference.

Another highlight was that Dorine Flies from "Encouraging Programming in Kids" (together with Luke Mayell and others) did another Minecraft hacking session with kids and their parents. Of course, they started by setting up NetBeans and the JDK, after which they ran Minecraft from NetBeans and then hacked it.

It was great seeing heaps of little kids with NetBeans on their laptops!

And I'll be working a bit more on the NetBeans shisha integration soon, in gratitude to all the nargile I consumed.

All in all, a great few days, thanks everyone for making it possible, for being so enthusiastic, and I hope I'll be there again next year!

NetBeans Zone - The social network for developers - December 09, 2014 08:50 AM
16 New NetBeans Dream Team Members!

The NetBeans Dream Team has expanded massively over the past week! Sixteen new members have joined, from many corners of the world. Preview Text:  The NetBeans Dream Team has expanded massively over the past week! Sixteen new members have joined, from many corners of the world. Legacy Sponsored:  ...

Geertjan's Blog - December 08, 2014 01:53 PM
ERP System for the Printing Industry on the NetBeans Platform

One of the organizations present at NetBeans Day Germany last week was SSB Software Service und Beratung GmbH, based in Munich, a software company with more than 20 years of experience focused on integrated solutions for the printing industry.

Diso21 Client is a NetBeans Plattform application created by SSB to provide an ERP system for modern printing companies. It helps to manage and to automate enterprise processes. The application has a modular architecture and allows for a flexible arrangement of workplaces. The Diso21 Client has an integration API to embed third party systems to increase productivity.

Here's a screenshot, click to enlarge it:


It will be added to the NetBeans Platform Showcase soon.

NetBeans Zone - The social network for developers - December 08, 2014 05:46 AM
NetBeans at DevFest Istanbul

Over the weekend the second DevFest Istanbul conference took place. It is a sign of the growing uptake of NetBeans above and beyond its traditional users that there was also a big NetBeans element. It is the second time it has been run and about 3000 people attended. There were two talks on NetBeans, an introductory talk on reasons to use NetBeans... and a detailed tutorial on writing web...

Adam Bien - December 08, 2014 05:20 AM
9th Airhacks.tv Q & A Uploaded --OData, Logging, Fast Deployments, EntityManager Injection and The Giblets Of My Server

20+ questions answered in 50 mins: the 9th airhacks.tv.

See airhacks.tv for past episodes.

Any questions left? Then join the conversation at each first Monday of the month at 6 P.M. live, and ask questions commenting / pulling on github (hurry up, some questions are already asked) or write comments on this blog.

See you at Java EE Workshops at MUC Airport or on demand and in a location very near you: airhacks.io!


Real World Java EE Workshops [Airport Munich]>

APIDesign - Blogs - December 07, 2014 05:21 AM
Publish Bck2Brwsr Libraries as Maven Artifacts

Bck2BrwsrLibraries can now be published as Maven Artifacts which greatly reduces edit/compile/run time.

--JaroslavTulach 05:21, 7 December 2014 (UTC)

Geertjan's Blog - December 06, 2014 12:50 AM
AsciidoctorJ and NetBeans IDE

AsciidoctorJ is the official library for running Asciidoctor on the JVM.

Here's the start of support for AsciidoctorJ in NetBeans IDE. New AsciiDoc files can be created and you have a source editor where you can write AsciiDoc. Currently, no syntax coloring, etc, yet.

When you click the Visual togglebutton above, AsciidoctorJ is used to convert the AsciiDoc:


Right now, the conversion options are hardcoded, using CodeRay, a Ruby library for syntax highlighting. Thanks to AsciidoctorJ, no Ruby needs to be installed, since AsciidoctorJ wraps the gems. Notice the code below, which was as much fun to figure out as something really not fun and could still be wrong and looks problematic. But it works.

Asciidoctor doctor = Asciidoctor.Factory.create(Arrays.asList(
        "gems/asciidoctor-1.5.0/lib",
        "gems/coderay-1.1.0/lib",
        "META-INF/jruby.home/lib/ruby/1.8"));
String html = doctor.convert(obj.getPrimaryFile().asText(), getInitialOptions());
htmlEditorPane.setText(html);

Need to integrate the Progress API into the above so that the progress bar runs while the conversion is taking place.

The source code of the above is here, looking forward to clones and pull requests:

https://github.com/GeertjanWielenga/AsciidoctorJ4NB

Adam Bien - December 05, 2014 09:55 AM
Setting Timeout For The JAX-RS 2.0 / Jersey Client

Timeouts are crucial for robustness of the communication between reasonable WARs (also known as micro services).

Timeout settings are not standardized and have to be passed as "proprietary" properties of the JAX-RS client:


import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import org.glassfish.jersey.client.ClientProperties;

        Client client = ClientBuilder.newClient();
        client.property(ClientProperties.CONNECT_TIMEOUT, 100);
        client.property(ClientProperties.READ_TIMEOUT, 10);


The "provided" dependency highlighted above can be omitted by using the String representation of the constants:

        client.property("jersey.config.client.connectTimeout", 100);
        client.property("jersey.config.client.readTimeout", 10);


Timeouts will cause: java.net.SocketTimeoutException: Read timed out exception which can be easily handled. A few years ago we would talk about exception handling and robustness, in the age of micro services we can call it now "resilience" :-).

See you at Java EE Workshops at Munich Airport, Terminal 2 or at a virtual, dedicated workshop!


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - December 04, 2014 12:21 PM
New NetBeans Power Tools: Key Promoter & Quick Member Search

Today I have two new/updated plugins for the price of one! One costs zero money and therefore two do, too.

Firstly, I find the concept of a key promoter very handy, but the initial version of the plugin provided too much noise. Now, instead of using the Notifications window, the keyboard shortcut, if there is one, that matches the action invoked from a menu item or toolbar button is shown in the status bar:

Get the above plugin here.

Secondly, I'm going to be using only the keyboard (and not the mouse) as much as possible and "Distraction Free Mode" as much as possible, from now onwards. That means I want the tools I need to use to be close at hand. Therefore, rather than all the clicking I need to do to undock the Navigator, bring it to where I want it to be, etc etc, I've created a new plugin that lets you press Alt-Q (the "q" is the "Q" in "Quick Member Search"), at which point the Navigator will undock itself and appear as a small dialog in the editor. Especially powerful when you're already in "Distraction Free Mode" (Ctrl-Shift-Enter).

The Navigator that you see above appeared in the editor when I pressed Alt-Q. I did not need to (1) open the Navigator via Ctrl-7 or a menu item in the Window menu and then (2) move my mouse to the Navigator in its docked position in the lower left and then (3) right-click in the tab of the Navigator with my mouse and then (4) choose Float in the popup menu with my mouse and then (5) drag the Navigator with my mouse into the editor. No, instead of all that, I simply pressed Alt-Q and automatically the Navigator was put where I wanted it.

Get the above plugin here.

Anyone have requests for other small and handy power tools for NetBeans IDE? Let me know, especially if you're interested in working on them together with me.

Adam Bien - December 04, 2014 05:50 AM
Introducing afterburner.fx TopGun Edition

afterburner.fx is the leanest possible MVP / MVVM "framework" for Java FX 8 / Java 8.

As afterburner.fx became more popular, I got many interesting community contributions. I rejected most of the pull requests, because I could not find the "killer use case" for most of them. afterburner.fx should remain lean and simple.

The solution to this unsatisfying situation is the branch topgun. Recent pull requests, like e.g. weld integration and support for @Named qualifiers are already merged.

In addition the "topgun" edition is also available from maven central:


<dependency>
	<groupId>com.airhacks</groupId>
	<artifactId>afterburner-topgun.fx</artifactId>
	<version>1.6.2</version>
</dependency>

There are no changes for coordinates of the default afterburner.fx:


<dependency>
	<groupId>com.airhacks</groupId>
	<artifactId>afterburner.fx</artifactId>
	<version>[LATEST_RELEASE]</version>
</dependency>

Now all contributions are welcome. Use the branch: topgun as base for feature implementations and the default branch master for possible bug fixes.

See you at Java EE Workshops at Munich Airport!


Real World Java EE Workshops [Airport Munich]>

NetBeans Zone - The social network for developers - December 04, 2014 05:00 AM
Yes, NetBeans Can Do Polymer!

Last weekend I was training a small group of developers on Polymer during a local Google Developer Group DevFest here in Burkina Faso. Basically, Polymer is a new web UI framework that helps programmers to develop modularized web applications with cross-browser capabilities. Polymer is composed of four main layers: Preview Text:  Last...

Geertjan's Blog - December 03, 2014 02:10 PM
Trip Report: NetBeans Day Germany 2014

NetBeans Day in Munich, Germany, held yesterday, was pretty amazing. Despite having been arranged at the last minute, and undermined a bit by Lufthansa strikes and Deutsche Bahn hiccups, the room was filled to almost maximum capacity, certainly around 100 attendees were present. (Registration for the event had to close soon after it opened, because there was only room for 100.) The key people to thank for the event are Peter Doschkinow from the Oracle office in Munich and Toni Epple from Eppleton. They set up the whole day, invited speakers, and so on. Oracle hosted the event, provided coffee and lunch, and the room itself was really nice.

Aside from the rockstar speaker line up, which included Adam Bien, Gerrit Grunwald, and Markus Eisele, quite some well known faces attended, such as Sven Reimers, Florian Vogler, and Martin Klähn, as well as uber NetBeans plugin developer Benno Markiewicz. And Reinhard Schmitz flew all the way from Luxembourg. I met Norman Fomferra and Marco Peters for the first time, who're working on a NetBeans Platform application for the European Space Agency, though there were so many people that I didn't get to talk to nearly all of them. Especially, I missed talking to guys who attended from ConSol, where NetBeans Platform work is also being done, while I learned about several NetBeans Platform applications that I'd never heard of before, such as at SSB and Transver, both organizations in Munich.

But, in fact, most of the day was focused on Java EE, and web development in general. Adam talked about Java EE in combination with AngularJS, Markus about WildFly and OpenShift, while I talked a bit about the Oracle Cloud and Oracle Developer Cloud Service, for both of which there are plugins in the NetBeans Plugin Manager. Peter Doschkinow talked on server-side JavaScript, Toni Epple on DukeScript, Sven Reimers on the NetBeans Platform, and Gerrit Grunwald started the day by talking (via Skype) about wearables and Java. I showed some interesting features in NetBeans IDE and talked a bit about the community around NetBeans.

09:00 - 09:10 Anton Epple, Geertjan Wielenga, Peter Doschkinow: "Welcome to NetBeans Day"
09:15 - 10:10 Gerrit Grunwald: "Catch me if you can" - Java on Wearables
10:15 - 11:10 Markus Eisele: "Manage JBoss EAP, WildFly and OpenShift with NetBeans"
11:15 - 12:15 Adam Bien: "The Microservice IDE: From Java EE To Angular"
12:15 - 13:15 Mittagspause & Open Space
13:15 - 14:10 Anton Epple: "Write Once Run Anywhere with DukeScript"
14:15 - 15:15 Peter Doschkinow: "Server-Side JavaScript on the JVM"
15:15 - 15:45 Kaffeepause
15:45 - 16:45 Geertjan Wielenga - "Heaps of Cool Hidden Goodies in NetBeans IDE"
16:50 - 17:50 Sven Reimers: "NetBeans Platform - Inifinite Evolution"
18:00 - 18:30 Geertjan Wielenga: "Manage Oracle Cloud, Oracle Developer Cloud Service, and WebLogic with NetBeans"

For me, the question of the day was asked during a break in the program by Stefan Gürtler from Transver who asked me: "How do you find your methods in NetBeans IDE?" (Somebody then said "if you need to look for your methods, your class is too large", which was an interesting assertion.) I mentioned the Navigator but he said he'd like to be able to pop up a small dialog, like in other IDEs, within the editor, and then quickly search for a method, at which point the list would filter down to the one he wants to work with. That sounds cool and here's the start of that:

The current implementation is that you start typing and immediately the filtering happens:

It's very simple so far, but the idea is you'll be able to press Alt-Q, do your search, find the member you need, click on it, and then the popup closes and the cursor is on the member in the editor. The plugin can be cloned and I'm looking forward to getting pull requests!

https://github.com/GeertjanWielenga/QuickMemberSearch

The plan is for multiple NetBeans Days to be held around the world. Now that we have a good location in Munich, we'll be able to hold more such events there. The next NetBeans Day is planned to be held during March or April next year. Probably it will be done quite differently to yesterday. For example, maybe there'll be multiple tracks and definitely there should be more time for talking and getting to know each other. Maybe small workshops on e.g., creating NetBeans plugins, could be good to include too.

Thanks to everyone who came, looking forward to next time!

NetBeans Zone - The social network for developers - December 01, 2014 09:56 PM
Track Your Programming within NetBeans using the WakaTime plugin

The WakaTime plugin tracks time by project, branch, language, among other things for individual developers as well as teams.  Here’s what the dashboard looks like: Preview Text:  The WakaTime plugin tracks time by project, branch, language, among other things for individual developers as well as teams.

Geertjan's Blog - December 01, 2014 05:26 PM
Top 7 Reasons to Consider Using NetBeans IDE

There are many reasons why it makes sense to use NetBeans IDE for your software development work. But, of those many reasons, what are the top reasons? Here they are, the top 7 reasons, explained together with demos and slides!

&amp;amp;amp;amp;lt;span id=&amp;amp;amp;amp;quot;XinhaEditingPostion&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;lt;/p&amp;amp;amp;amp;amp;gt;

Go here for many more similar YouTube movies.

Adam Bien - November 30, 2014 09:06 AM
Service Discovery, Micro Service Communication, Fast Deployments, JPA-JSON Serialization, ECB again or 9th Airhacks Q&A

Questions for the 1st December, Monday, 6 P.M. CET, 9th edition of the http://airhacks.tv show:

  1. @AdamBien what would be your take on how to most elegantly deal with resilience and service discovery for JavaEE7 #microservices ? (tweet by @niko_nava)

  2. OData vs. RAW Json (email question from Louw)

  3. what logging framework do you normally use? Seems slf4j is the only library i can’t get rid of in my WARs… (tweet @MichelSchudel)

  4. How to transform entities with OneToMany relationships into json for JAX-RS (lazyinitialization exception is thrown if relationship is not fetched)? Let’s say I have methods getAllUsers() and getAllUsersWithDetails(). I was able to do it with jackson and its jackson-datatype-hibernate dependency. Is there any other, better way? MougLee

  5. I have seen your videos on ECB pattern, but I am not sure, what goes into Control and what into Boundary. You said, that you do it with refactoring, when Boundary gets to big … Could you please provide any more pointers? MougLee

  6. I have a feeling, I have to deploy/redeploy my application all the time during development. Do you have any tips to speed up development as much as possible and avoid deploying code? Without JRebel :-) MougLee

  7. What’s in your opinion the preferred way to handle service-versioning for REST services? mliebl

  8. We are running a JEE application with thousands of EJBs (EAR with 3 different projects refered) which takes around 10 minutes for server start up. Mainly time spent on creating and loading EJBs at startup. How can I bring down the startup time of Jboss server at least in development environment. surendrand

  9. What is the most efficient way to communicate between two μ-Services especially 1. when they are deployed as different WARs and 2. on different Docker images but on the same Docker “Host”/VM/machine. 0x001D

  10. What do you do for simple reporting in enterprise projects ?? Use a BI solution and integrate it ? any alternative ? cristhiank

  11. What are the possible solutions for API Gateway in JavaEE enviroments. Specifically when there is different JavaEE app per business line exposing RestAPIS. tegbird

  12. What are ur views on API management tools provided by vendors as centralized solution to APIs. Is it going the same way as ESBs did to SOA. Nobody understood them, overated and underused. tegbird

  13. I would like to ask you what is more preferable in your opinion: serializing enums to json using enum names in order to send via rest or using enum values instead of enum names for example in case as below: RED(“red”), BLUE(“blue”); 4tran

  14. sometimes you are talking about your personal server you build every 3 years. Can you provide some details (list of components) about your current configuration? github0x1

  15. Most of my JavaFX applications have composite views and so the sub-views have to communicate with each other. I hate nesting controllers using @FXML injection. I think it creates a strong coupling between the views. I use afterburner.fx in most of my projects. What do you think is the best way to communicate across sub-views within a composite view? Thanks. raghsr

  16. I have a hierarchy of organization unit objects (plants, centers, departments, teams, …). Each object has a reference to his parent and his children (getParent(), getChildren()). Everything is loaded and wired during application initialization and I have a service which provides me the object (getObjectByID, …) Now my problem: I want to allow and deny the access to the objects dependent on the user. Is there an easy JEE/CDI way to reach this goal? I mean, how do I tell the plantOrgUnit-Object to deliver only children or parent OrgUnit-Objects which are are permitted (eg by a criteria like a role, or an attribute reflecting the role relation)? May be the question is too stupid. Then please skip it. If you have any modern CDI/EE6 way to handle such kind of problems please provide it (Karsten)

Do you have any additional questions? Ask now, file them https://gist.github.com/AdamBien/a048fa8262ad12069e94 or wait a month :-)

The best of all: you can ask the questions live, during the show using the chat: http://www.ustream.tv/channel/adambien, twitter (hashtag "#airhacks") or (the best option): using channel ##airhacks on http://freenode.net.

See also other screencasts at: http://tv.adam-bien.com or subscribe tohttp://www.youtube.com/user/bienadam.

See you at Java EE Workshops at Munich Airport, Terminal 2.


Real World Java EE Workshops [Airport Munich]>

APIDesign - Blogs - November 29, 2014 01:07 PM
Wrap Your JAR as OSGi Bundle via Maven Easily!

Not all artifacts in a Maven repository are packaged as OSGi bundles. Yet, some systems (like for example the Bck2Brwsr ahead-of-time compiler) require JAR to contain OSGi meta-data. Luckily there is a simple way to turn any JAR into OSGi bundle by creating a simple Maven project. Here is the sample pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
  http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
    <modelVersion>4.0.0</modelVersion>
 
    <groupId>your.group.id</groupId>
    <artifactId>jar-id</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>bundle</packaging> <!-- we want to produce an OSGi bundle -->
 
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
 
    <repositories>
      <!-- we are wrapping a JAR from NetBeans Maven repository -->
      <repository>
        <id>netbeans</id>
        <name>NetBeans</name>
        <url>http://bits.netbeans.org/maven2/</url>
      </repository>
    </repositories>
 
    <dependencies>
        <!-- specify the dependency you want to wrap as OSGi bundle -->
        <dependency>
            <groupId>org.netbeans.external</groupId>
            <artifactId>nb-javac-api</artifactId>
            <version>RELEASE80</version>
            <!-- we need the dependency only during compilation -->
            <scope>provided</scope>
        </dependency>
    </dependencies>
 
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>2.3.7</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <!-- export the packages that should be externally accessible -->
                        <Export-Package>javax.*</Export-Package>
                        <!-- list other packages that should be included in your bundle -->
                        <Private-Package>com.sun.*</Private-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

And that is all! After building the project, you'll get an OSGi bundle that contains all the classes from the specified dependency found in exported and private packages. Just copy the above text into pom.xml file and in its directory execute yourself:

$ mvn package
$ unzip -l target/jar-id-1.0-SNAPSHOT.jar
# shortened ...
     4539  2014-02-14 11:52   com/sun/source/util/Trees.class
      125  2014-02-14 11:52   com/sun/source/util/package-info.class
     5109  2014-02-14 11:53   javax/annotation/processing/AbstractProcessor.class
# ...shortened
$ unzip -p target/jar-id-1.0-SNAPSHOT.jar  META*MAN*
Manifest-Version: 1.0
Bnd-LastModified: 1417267436493
Build-Jdk: 1.8.0_25
Bundle-ManifestVersion: 2
Bundle-Name: jar-id
Bundle-SymbolicName: your.group.id.jar-id
Bundle-Version: 1.0.0.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Export-Package: javax.annotation.processing;uses:="javax.lang.model,java
 x.tools,javax.lang.model.element,javax.lang.model.util";version="1.0.0.
 SNAPSHOT",javax.lang.model.util;uses:="javax.annotation.processing,java
 x.lang.model,javax.lang.model.element,javax.lang.model.type";version="1
 .0.0.SNAPSHOT",javax.lang.model;uses:="javax.lang.model.element";versio
 n="1.0.0.SNAPSHOT",javax.tools;uses:="javax.lang.model.element,javax.an
 notation.processing,javax.lang.model";version="1.0.0.SNAPSHOT",javax.la
 ng.model.type;uses:="javax.lang.model.element,javax.lang.model";version
 ="1.0.0.SNAPSHOT",javax.lang.model.element;uses:="javax.lang.model.type
 ,javax.lang.model";version="1.0.0.SNAPSHOT"
Import-Package: javax.annotation.processing,javax.lang.model.element,jav
 ax.lang.model.type,javax.lang.model.util,javax.tools
Tool: Bnd-1.50.0

Wrap your JAR's into OSGi bundles and let Bck2Brwsr obfuscate them effectively per library!

--JaroslavTulach 13:07, 29 November 2014 (UTC)

NetBeans Zone - The social network for developers - November 29, 2014 08:08 AM
Finance and Investment Software on the NetBeans Platform

My name is Brian Jenkins, and I am the Chief Financial Officer and Chief Information Officer for Newport Service Corporation. The company provides computer services to several companies in the retail hard assets marketplace; one of which is Monaco Rare Coins (“Monaco”). Preview Text:  "Monaco" is a rare coin dealer, which has account...

Geertjan's Blog - November 28, 2014 10:50 PM
Highly Personalized Pricing Structures

At Droidcon, beginning of this week, the main thing I learned was during a conversation in the hallway right at the end of the conference. According to the two guys I was talking with:

  • When you go to Booking.com, the price you're offered for your booking depends on whether you own an Android or an iPhone. This can be determined in dozens of different ways, e.g., the searches you do on-line. Apparently iPhone users are wealthier than Android users. Therefore, Booking.com offers a higher price to you if you're an iPhone user but, of course, you'll never know the difference because you're not shown the price offered to the Android user.

  • When you go to Amazon.com, the price you're offered for a product depends on whether you've searched for the same product on competing sites. I.e., if you've already searched for the book you're looking at on Amazon on some other book-related site, Amazon offers you a lower price, i.e., attempts to undersell the competition. But, of course, you'll never know that was the reason for the price of the book since you'll assume the price you're seeing is the same for everyone.

I'm sure they factor into the equation that the above perspectives aren't always correct. For example, an Android user might be wealthier than an iPhone user, but out of principles, e.g., related to open source for example, might base their decision on something other than wallet size, while simultaneously the iPhone user might be less wealthy while valuing the iPhone as a status symbol and might therefore pay more for a mobile device than wallet size would suggest. Etc.

Aside from the error factor at play, there's another way of looking at this scenario, assuming it is true—look at it as a progressive measure whereby the wealthy subsidize the purchases of those with thinner wallets. Again, though, factor in that not everyone fits the analysis and that you may not have been doing comparison-shopping when looking at competing sites for similar products.

And yet another way of looking at this is to see it as part of the larger trend of individualization, e.g., nowadays people don't watch TV but go to YouTube or other on-line channels for entertainment, choosing a highly individual entertainment track. However, here they have a choice. I don't like the idea of others choosing for me, e.g., deciding that I'm wealthier and thus offering me higher prices, without telling me about it.

Then again, all of this assumes that the two random guys in the hallway at Droidcon weren't talking rubbish. But, if it isn't happening already, it soon may be. Maybe a way around it all is to have different devices where you do different kinds of searches to confuse the analyzers. Or just go to the good 'ol travel agent and bookstore, instead of booking and buying on-line, if you can still find them, that is.