Č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)
Gualtiero Testa » 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)
Bernhard's Weblog (feed)
Michel Graciano's Weblog (feed)
Ramon.Ramos (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)
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)
Shanbag's Blog (ರಜತ ಲೋಕ) (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:
November 22, 2014 03:05 PM
All times are UTC

Sponsored by
sponsored by Oracle

visit NetBeans website
Adam Bien - November 20, 2014 06:25 PM
Free Article: "Structuring Complex JavaFX 8 Applications for Productivity"

With the article "Structuring Complex JavaFX 8 Applications for Productivity" I tried to answer as many Java FX / afterburner questions, as only possible.

Particularly I focussed in the article on the combination of WYSIWYG editor, Convention over Configuration and Dependency Injection in a multi-view scenario.

Thanks for reading!, see you at airhacks.com, or if you have questions at: airhacks.tv


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - November 20, 2014 10:13 AM
Ceylon for NetBeans IDE 8.0.1

The history of Ceylon support in NetBeans can be divided into three stages. In 2012, syntax coloring was created; in 2013, code completion was added; and yesterday, during Java2Days in Sofia in Bulgaria, where I ran into Ceylon lead Stephane Epardaud (@UnFroMage), i.e., in 2014, and under his guidance the Ceylon libraries in the NetBeans plugin were upgraded to the latest versions, syntax coloring was updated, the start of code folding has been implemented, and the Ceylon parser is partly integrated to check for syntax errors.

Above you see one of the Ceylon sample projects expanded to show one file, with syntax coloring, and the initial comment within a code fold.

And here you see the parser in action because a semi-colon has been omitted:

The message displayed when you hover over the red error icon or the red error mark is as follows, which comes from the Ceylon parser:

Here's the repo:

https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.1/misc/Ceylon

Geertjan's Blog - November 19, 2014 10:53 AM
Few Women Want To Be Programmers Because Few Male Programmers Are Kind

While at Devoxx a week or so ago, the discussion about "why there are not more female programmers" was held, yet again. The abstract of the BOF that was held on this topic starts off with: "It feels like women still are strongly underrepresented in the Java ecosystem. It is even worse than in the JavaScript or Python world." Etc. And then there's the usual discussion about why this might be, about how to get more involved, how to participate in projects, about mentoring programs, about needing to have more women speakers at conferences, etc etc.

In another session, rather oddly, I learned that balloons and cupcakes are needed. At first, I looked with raised eyebrows at the guy that I was attending the session with, and we both silently mouthed something like: "Wow, there would be an OUTCRY if a male programmer were to stand on that stage and say that there need to be cupcakes and balloons in order to bring women to programming conferences." (And he'd be blacklisted from speaking ever again at any conference anywhere in the world, on any topic at all, which as far as I know has never ever happened before, making for the shortest blacklist ever.) It was, however, a female programmer on the stage (with an atypical speaker background, i.e., not from the US or EU, so some cultural differences were the basis of the perspective I believe), who also talked about a need for daycare facilities at conferences, as a precondition for more women attendees.

I've thought more about this and in my humble opinion the balloons and cupcakes theory is closer to the mark than one might think. There is a pervasive curtness and to-the-pointness and a OK-I'll-help-you-but-you-better-not-waste-my-time-by-showing-you're-an-idiotness that is more than apparent throughout the developer community, regardless of the language or the technology, i.e., in the Java community, in the Python community, in all kinds of developer communities.

Myself included! I'm often very direct and curt and might more often than not come across as being unkind, in the context of my work within various, primarily Java, developer communities. And that's simply because I want to get the job done, help out, give advice, and then move on to the next thing to work on, or to help with, or to give advice on. "Being nice", smiling, being patient, etc, are always secondary to those aims. No matter how much you, if you're a male, reading this, are now thinking to yourself: "Well, speak for yourself. I'm pretty kind and I smile a lot," I don't believe you. I believe you're hurried and when you're hacking with someone, you want to work quickly, with a lot of speed, you want to hurriedly fix one thing, and then hurry on to another thing, you want to quickly add new features, and fix bugs, and there's time pressure, all the time.

In fact, the real question is, therefore not "Why do so few women want to be programmers?" The question, the real question, is: "Why do so many men want to be programmers", given this unkind (yes, yes, you're helpful, but you're hurried, you're on the clock, no time for cupcakes, and you think balloons at conferences are ridiculous, proving my point) ecosystem?

In short, the programming world is a pretty fast paced environment, in which you need to move fast and accurately, where you tend to get looked down upon when making mistakes, code fast, and do everything else fast. The point isn't that women aren't up to those tasks, I'm sure they are. But why would they want to be? So the question is why do men not find this environment so problematic that they choose to stay far away from it? The only exception to all this that I know of is mob programming, as explained to me by the wonderful Woody Zuill, which is a very kind environment, embracing of newbies and supportive from the beginning of the day to the end:

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

To me, a BOF worth having on this topic should not have any women in it, as every year at Devoxx and so many other conferences. Instead, there should be a BOF aimed at men (myself included!) and about being kinder, with a title like "Towards a Friendlier Developer Community". There's something seriously wrong with men (as well as the few women who are in the various developer communities) that we tolerate the unkind, intimidating, impatient, macho attitudes that pervade the software industry, as well as so many other industries, I might add.

Adam Bien - November 19, 2014 10:25 AM
Java EE 7 Bootstrap Is Available ...Online

Three times a year I deliver a series of Java EE 7 / Java 8 Workshops called airhacks.com (there are some seats left for December :-)). I get more and more requests to deliver the standard set workshops in other locations, but I'm a Singleton and Singletons do not scale.

Now the Java EE 7 Bootstrap course is available online. From annotations over DI, Bean Validation, CDI, EJB to UI. 22 modules are waiting for you.

My personal goal was to keep the course as short as only possible--sometimes I re-recorded the modules multiple times to shorten them. The whole course takes 3 hours of continuous coding with a few sketches. Originally I thought about 1h, so I missed the target a bit...

If you are more interested in specific topics / internal workshops, checkout Dedicated Online Workshops.

If you have questions, see you at airhacks.tv.

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


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - November 18, 2014 08:26 AM
Red Hat OpenShift

When you're thinking about creating a NetBeans plugin for your favorite technology, there's not much that hasn't been created already, in one way or another. For example, want to create a NetBeans plugin for your web framework? Not a problem, just look at all the open source projects, as well as the NetBeans source code, to see how tools for PrimeFaces, Wicket, Tapestry, etc etc, have been implemented. Want to create a NetBeans plugin for your favorite application server? No problem at all, just look at the code of the other application server plugins and then you can, as Emmanual Hugonnet and other guys at Red Hat have done, create a plugin for WildFly, etc.

And so Cojan van Ballegooijen and others in the Red Hat community interested in NetBeans integration for OpenShift don't need to worry, either, since there are several NetBeans plugins already for cloud providers, e.g., Oracle Cloud, Amazon Beanstalk, and Jelastic. Thanks to a bit of refactoring of the Amazon Beanstalk plugin, which is open sourced since it is part of the NetBeans sources, here's the start of the OpenShift plugin:

The basic infrastructure shown above is in place and can be found here:

https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.1/OpenShift

It should probably be put on GitHub so that anyone can clone it and then fill in all the OpenShift-specific settings, e.g., the logic for connecting to the OpenShift services, the logic for deploying to OpenShift, and the logic for displaying the artifacts deployed to OpenShift. And all that can be based on the Amazon Beanstalk code, too.

And all thanks to open source, without which none of the above would be possible. 

Related issue: https://netbeans.org/bugzilla/show_bug.cgi?id=227440

The NetBeans Community Podcast - November 16, 2014 06:25 PM
NetBeans Podcast 71

Podcast Guests: Mark Stephens, Ernest Duodu, Dorine Flies, Emily Hall, Ken Fogel, John Ceccarelli, Luke Mayell, and Johannes Weigend.

Download mp3: 28 minutes – 22 mb
Subscribe on iTunes

00:00 / Opening Chat with Mark Stephens from IDR Solutions

"The lunatics have taken over the asylum," announces Mark Stephens (@JavaPDF) in the NetBeans podcast opening chat. Mark's team at IDR Solutions and NetBeans community members from EPIK (Encouraging Programming in Kids) have taken over this edition of the NetBeans podcast. During JavaOne 2014 in San Francisco, they interviewed a range of developers who use NetBeans in one way or another, focusing on their coding stories and how they use NetBeans IDE.

And, this is the start of many similar podcasts! Do you and your friends or colleagues want to take over a future edition of the NetBeans podcast? Do you have a NetBeans related story to tell? Are you using NetBeans in a novel or unusual way? Write to nbpodcast at netbeans dot org and get involved!

02:47 / Ernest Duodu - Conversation with Dorine Flies, Co-ordinator of EPIK

Ernest Duodu from IDR Solutions chats with Dorine Flies (@EPIKhub), who runs EPIK, "Encouraging Programming in Kids", about the fun of programming, teaching kids to program, the relevance of open source, Minecraft, NetBeans as a teaching platform, and how to catch burglars with your RaspberryPi...

12:45 / Emily Hall - Conversation with Ken Fogel, Software Development Teacher in Canada

Emily Hall from EPIK chats with Ken Fogel (@omniprof), about how he got into coding (from a "dead end job working in a mailroom") and became a teacher in software development in Canada. "Can you pick up coding later on in life?" is one of the questions Ken deals with. "Anyone is capable of learning to code at any time," he explains.

16:50 / Emily Hall - Conversation with John Ceccarelli, Director of NetBeans Engineering

Emily continues her conversational contributions with John Ceccarelli, who leads the NetBeans engineering team. Learn about his background and what he sees as the two big new developments in software over recent years. What does the person overseeing NetBeans development see in his crystal ball for Java, NetBeans, and the software industry?

23:40 / Luke Mayell - Conversation with Johannes Weigend, Software Architect at QAWare, Munich

Luke Mayell (@_moonlapse) from EPIK gets to know Johannes Weigend (@JohannesWeigend), asking him how he started to use NetBeans, what he likes about it, and what could be even better!

*Have ideas for NetBeans Podcast topics? Send them to ">">">">nbpodcast at netbeans dot org.
*Subscribe to the official NetBeans page on Facebook! Check us out as well on TwitterYouTube, and Google+.

Geertjan's Blog - November 15, 2014 04:00 PM
YouTube: How to Work with HTML Files?

Plain and simple HTML files are the basis of a range of different applications, from websites to mobile apps. Working efficiently with HTML files, how do you do that? Here's a short new YouTube clip that starts off with a basic HTML file and then shows a range of free tools that can make your tasks a lot more pleasurable:

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

Go here for many more similar YouTube movies.

Adam Bien - November 15, 2014 02:08 AM
Unorthodox Enterprise Practices With Java EE 7 and Java 8 at JavaOne 2014

See you at Java EE Workshops at Munich Airport, Terminal 2, particularly at: Effective Java EE 7 or each first Monday of the month at 6 P.M. CET: http://airhacks.tv!


Real World Java EE Workshops [Airport Munich]>

NetBeans Zone - The social network for developers - November 14, 2014 11:29 AM
A New Proposal How to Reorganize the NetBeans Translation Project

In this article, I describe a proposal for how to reorganize the new NetBeans translation project described here:https://blogs.oracle.com/geertjan/entry/lightweight_process_for_translating_netbeans Also, I will show how to migrate the running project to the new project structure. The new project structure enables the following features the old one does not support: It is available as a Maven...

Geertjan's Blog - November 14, 2014 11:09 AM
Bug Fixes and Enhancements for NetBeans Cheat Sheets

I fixed several problems in the Cheat Sheets plugin and added a cool new feature.

  1. Installation problem. Several people weren't able to install the plugin in the first place, or didn't see the two new windows provided by the plugin when they thought they had installed it. That's because the plugin was built with all the patches for 8.0.1 included, which meant that one of the NetBeans modules used in the plugin was at a higher level than what you'd have in 8.0.1 if you hadn't updated it, i.e., to patch 1.1. I discovered that the problematic module (the Datasystems API) wasn't needed in any case, so removed that module from the dependency list. Now the plugin should install successfully if you're using 8.0.1 without any of the patches installed.

  2. Parsing problem 1. Several people were able to install the plugin but didn't see anything in the two windows provided by the plugin. That's because the parser attempts to validate and resolve any references in the document, automatically, including "netbeans.org". When you're using the plugin while not on-line or behind a proxy, the automatic resolver fails and the plugin crashes. I was able to reproduce this problem and, following the instructions here, I fixed the problem, and now even when I am not on-line, the plugin works, because the automatic resolution is disabled.

  3. Parsing problem 2. The PHP and HTML code templates files weren't parsed correctly, so that only the left-hand side of the Code Templates window was shown, not the right-hand side. That's fixed now.

  4. Context-sensitivity enhancement. I was demonstrating the plugin during Devoxx to my ex-colleague (and current Red Hatter) Cojan van Ballegooijen (and we encountered parsing problem 1 several times), who suggested the following new feature: "Whenever a document of a certain type is opened, the Code Templates window should automatically switch to the relevant set of code templates." That's a cool idea and thanks to the Lookup (i.e., in the TopComponent, listen to the Lookup for the current FileObject in the global context, check for its MIME type, and then switch the code templates accordingly).

Below you can see the point, i.e., now an HTML file is open and hence automatically the Code Templates window shows the code templates specific to HTML files.

From the above, you can also see that the plugin hasn't only been tried successfully on Windows, but on Ubuntu too.

Right now, code templates for PHP, HTML, Java, and XML are supported. A next feature could be support for more code template files, as well as an automatic update of the windows when the key bindings or code templates are changed in the Options window, because right now any changes you make will not be reflected, whether you restart or not. That's because changes to the settings shown above are done in different files to the ones that the plugin listens to, at the moment. So the next enhancement will be to listen to changes to the file where changes to these settings are stored.

If you'd like to try out these changes, go to the plugin's location in the Plugin Portal below, download the NBM, install it into NetBeans IDE 8.0.1 (you should notice in the Plugin Manager that the version of the plugin is 4.0), and then (after a moment, while the plugin installs) you should see your new windows appear, which are also openable under the Window menu, where you should see "Code Templates" and "Key Bindings" menu items.

http://plugins.netbeans.org/plugin/49660/netbeans-cheat-sheets

Adam Bien - November 13, 2014 08:19 AM
Upcoming Free JUG / Java EE Events

  1. Belfast JUG: Europa Ballroom at 5:30pm on Monday, 17 November Java EE Patterns, Anti-Patterns & Cool New Features
  2. Munich, 2nd December, NetBeans Day, 9 AM - 6 PM From AngularJS to Java EE Backend (of course fully microservices compatible :-))
  3. Tricity JUG, 4th December, Gdansk (register) Building Reasonable Java EE 7 Apps on Java 8 called "Microservices" A follow-up of the Nano services talk in Malmö and the "Pico Services" talk at devoxx 2014
  4. Any questions left? See you at: 1st December, 6 P.M. CET: 9th Airhacks Questions & Answers, also see archive http://airhacks.tv Ask here, or comment on this post.

See you at Java EE Workshops at Munich Airport, Terminal 2 or online course: airhacks.io!


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - November 13, 2014 08:00 AM
Obrigado Spellchecker for NetBeans IDE

Let's set up Portuguese spellchecking in NetBeans IDE. The aim is to see words like this, i.e., Portuguese words, instead of English words:

In the Options window, I registered a "pt_PT" spellchecker, as shown below:

To be able to register the above spellchecker, I clicked Add above and then used the Add Dictionary dialog, shown below:

The "aspell_dump_pt_PT.txt" file that you see above was created on the command line.

aspell --lang=pt_PT --master=pt_PT dump master | sort > aspell_dump_pt_PT.txt

The above assumes that Aspell has been installed and that the "pt_PT" Aspell dictionary has been installed.

To achieve the above, i.e., to set up Aspell and its Portuguese dictionary, simply follow step 1 of the document below:

http://lermitage.biz/devblog/index.php?post/2012/03/18/How-to-build-a-dictionary-for-the-NetBeans-online-spellchecker

The majority of the document above discusses how to create a NetBeans module that bundles the Portuguese dictionary. I think it can be done more simply than is described above and will make a blog entry about that. However, you now have enough information to at least make a dictionary file and register it into your own NetBeans IDE installation.

Obrigado! 

Geertjan's Blog - November 12, 2014 05:20 PM
Tools for MVC in Java EE 8 (Part 2)

What's happened since part 1 of the blog series on tools for MVC in Java EE 8? Well, I sat down quite a bit with Manfred Riem, one of the spec leads for MVC in Java EE 8, during Devoxx.

One of the outcomes is the below (click to enlarge the image), i.e., a logical view (comparable to NetBeans IDE support for RESTful Web Services) for the methods in the controlers of MVC applications:

Above, you see the project logical view has a new node named "MVC Methods", containing all Java classes that have at least one @RequestMapping annotation, which can be expanded to show each of those methods. When new methods are added to the editor, or removed from it, the logical view is automatically updated. Double-click on a node and the Java class is opened with the applicable method highlighted.

Similar to the RESTful Web Services logical view, the above enables you to very quickly see the entry points into the application which will, eventually once those things are figured our more, enable them to be tested, similar to RESTful Web Service methods.

Geertjan's Blog - November 11, 2014 02:51 PM
Integrated Cheat Sheets for NetBeans IDE 8.0.1

NetBeans user Sarel van der Merwe from Total Index in South Africa wants me to add new features to the NetBeans Cheat Sheet plugin. I found I'd lost the sources so recreated the plugin today, it looks as follows, i.e., it embeds a window to the right of the editor where your keyboard shortcuts and Java code templates are listed as a handy reference:

I've provided an updated plugin hopefully with more or less the same functionality to everyone's liking:

http://plugins.netbeans.org/plugin/49660/netbeans-cheat-sheets

Install it into NetBeans IDE 8.0.1, probably won't install in earlier releases. I've found it to be a pretty handy tool.

For further enhancements, the source code is now publicly available here:

https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.1/misc/CheatSheets

NetBeans Zone - The social network for developers - November 11, 2014 10:41 AM
Igwe Kalu: 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 Igwe Kalu. -- NetBeans team. Preview Text:  "I like that the IDE supports a wide range of languages, tools, and frameworks out of the box. The user interface is intuitive and easy to use. That also makes it...

Adam Bien - November 11, 2014 05:20 AM
Using Jackson in TomEE As JAXB-JSON Provider

Jackson is fast JSON processor with nice default behavior, e.g. single element collections are represented as JSON arrays, and there are no wrapping elements.

Because the default is already reasonable, there is no additional configuration needed. The provider can be specified directly in the /src/main/webapp/WEB-INF/openejb-jar.xml descriptor:


<openejb-jar xmlns="http://www.openejb.org/openejb-jar/1.1" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.openejb.org/openejb-jar/1.1">
    <pojo-deployment  class-name="jaxrs-application">
        <properties>
            cxf.jaxrs.providers = com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider
        </properties>
    </pojo-deployment>
</openejb-jar>

In addition the jackson dependency needs to be declared in the pom.xml:

<dependency>
	<groupId>com.fasterxml.jackson.jaxrs</groupId>
	<artifactId>jackson-jaxrs-json-provider</artifactId>
	<version>2.4.3</version>
</dependency>

A better solution would be to install jackson directly on the server (/apache-tomee-plus-1.7.1/lib), what would keep your WAR skinny.

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


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - November 10, 2014 11:18 PM
J-Fall 2014: Bert's Big Shoes

I attended J-Fall 2014 last week, the annual Dutch JUG conference. It was without a doubt the most crowded conference I have yet attended! 1,200 attendees in a conference center in Nijkerk that is increasingly showing its limitations. But it was a lot of fun, of course.

Bert Ertman, Java champion, and frequent speaker at big international conferences, who has led the Dutch JUG over the past 10 years, announced the end of his tenure as JUG leader. He'll be missed! Bert has really been 'the face of the Dutch Java community'. Big shoes to fill, whoever ends up filling them.

I met several people who I've come to know over several years, as well as several people I met for the first time, some who I've known for years via e-mail and so on. From this place, a big shout out to Remko de Jong, Martijn Dashorst, Hubert Klein Ikkink, and several others.

I really enjoyed the ING keynote by Peter Jacobs (ex Sun!) a lot. Rather than yet another marketing speech by the key sponsor of a conference, which always bores the hell out of any developer from the 2nd minute onwards, Peter Jacobs discussed the internal IT/software technology choices that have been made at ING over the past years. Continuous builds, agile, AngularJS, Cassandra, Docker, etc. All the cool methodologies and technologies of today, embedded deeply within ING, i.e., a bank! Not what I had expected from a bank. Their IT/software stack sounds really cool and their innovation and openness to new ideas too.

The Oracle keynote reminded me of Sun keynotes in days of old. The focus was on community activities that, in the past, Roger Brinkley would present. In the present, Oracle's Jim Weaver, JavaFX 3D evangelist, is the driving force. In particular, Timon and Eva's open source precision agriculture project AgroSense that won a Duke's Choice Award last year was highlighted:

Another big focus in the Oracle keynote was the open source Raspberry Pi framework PiDome by John and Marcel, which won a Duke's Choice Award this year:

Other sessions I attended were about Wicket (going strong while being 'feature complete'), Java EE 8 (by my colleague David Delabassee), JSF migration to SPA (Matthijs Aalbregt & Eelco van Dijk), performance of Java 8 (Jeroen Borgers), and Aciidoctor (Hubert Klein Ikkink, the fastest talking Dutch guy, in the world).

My key takeaway from the packed out JSF/SPA session is that, wow, you're pretty screwed if you want to do serious work with JavaScript. There are simply so many frameworks (I learned about sammy.js, which was great, for once the key JavaScript framework was NOT angular.js, simply for that change of scene I was grateful) that there's nothing that anyone has in common anymore. In the past, when a demo failed in a session at a conference, everyone would be able to jump in and help, i.e., there'd be a lot of people amongst the attendees who'd know enough about Java EE or Spring to jump in and say 'hey, your injection should have been like this or that'.

But what happens when you have a new JavaScript framework popping up every week and the speaker has chosen 5 of them and combined them somehow and then the demo fails? Who is able to help? Who is able to say 'hey, you should have done this on line 27'? I left J-Fall interested in learning about sammy.js while wondering what the next sammy.js would be and whether it is worth learning about sammy.js since more than likely there'll be a non-backward compatible sammy.js 2.0 two weeks from now, without a migration path.

Adam Bien - November 10, 2014 03:15 AM
Configuring The JSON Default Provider (jettison) in TomEE

TomEE comes with Jettison and cxf as standard JAXB and JAX-RS providers. Jettison is "chatty" and might require some tweaking.

To tweak Jettison in a WAR deployment, you will have to provide two configuration files:

The first src/main/webapp/WEB-INF/resources.xml configures the JSON provider:


<?xml version="1.0"?>
<resources>
    <Service id="jsonProvider" class-name="org.apache.cxf.jaxrs.provider.json.JSONProvider">
        dropRootElement=true
        supportUnwrapped = true
        dropCollectionWrapperElement=true
    </Service>
</resources>

In the /src/main/webapp/WEB-INF/openejb-jar.xml descriptor, you only have to refer to the earlier defined configuration:


<openejb-jar xmlns="http://www.openejb.org/openejb-jar/1.1" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.openejb.org/openejb-jar/1.1">
    <pojo-deployment  class-name="jaxrs-application">
        <properties>
            cxf.jaxrs.providers = jsonProvider
        </properties>
    </pojo-deployment>
</openejb-jar>

TomEE greatly simplifies the configuration--checkout the CXF standalone example as reference / comparison.

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


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - November 07, 2014 09:21 AM
JFX Fluidon in NetBeans IDE

Here's the new JFX Fluidon plugin by Gaurav Gupta in action in the Family Tree application described in step-by-step detail in "JavaFX Rich Client Programming on the NetBeans Platform". Click to enlarge the image to get the full effect.

It's pretty cool and here's a movie I made of it today:

Adam Bien - November 07, 2014 05:36 AM
8th Airhacks.tv Q & A Uploaded -- JSF, Scopes, Persistence and Spring vs. Java EE

Most questions so far answered under one hour: the 8th 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 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]>

Geertjan's Blog - November 06, 2014 11:03 PM
Get Started with Scala in NetBeans IDE 8.0.1

How to get started with Scala in NetBeans IDE? Here you go.

Some other info, partly outdated:

Praxis LIVE » NetBeans - November 06, 2014 03:49 PM
Distributed Hubs

Want to run a project across multiple computers on a local network? Want to code on one computer and have it inserted into a running pipeline on another? Want to run pipelines across multiple local processes (VMs) for better performance? … Continue reading

Geertjan's Blog - November 05, 2014 03:23 PM
NetBeans Day in Germany: 2 December, 2014

During NetBeans Day 2014 in San Francisco, mention was made of more NetBeans Days being planned over the coming months. Right now, plans are in the works for NetBeans Day Germany (December 2014), NetBeans Day South Africa (January 2015), and NetBeans Day Netherlands (February 2015).

The first of these you can already register for on the Eppleton site:

As you can see above, 2 December is the date!

There will be as few slides as possible and as much code as possible throughout the event!

Sign up on the form, which is available after clicking here!

If you can't make it this time (it's only a month away), don't worry too much, there'll be more NetBeans Days in Germany during next year. The great thing is we have arranged for Oracle to host the day, which makes a big difference in terms of logistics.

Following NetBeans Day, you can attend a NetBeans Platform course hosted by Toni Epple, the details for which are here. I cannot recommend Toni's course highly enough, he has an incredible wealth of experience, and if you want to learn how to leverage the NetBeans APIs as the basis of your own software, it would be brilliant if you'd first attend the free NetBeans Day and then spend the next three days with Toni, learning about the architecture underpinning software at NATO, Boeing, NASA, and many others.

NetBeans Zone - The social network for developers - November 05, 2014 06:05 AM
Dev of the Week: Markus Eisele

Every week here and in our newsletter, we feature a new developer/blogger from the DZone community to catch up and find out what he or she is working on now and what's coming next. Preview Text:  Every week here and in our newsletter, we feature a new developer/blogger from the DZone community to catch up and find out what he or she is...

NetBeans Zone - The social network for developers - November 05, 2014 06:04 AM
The Best of DZone: Oct. 28 - Nov. 4

THIS WEEK'S TOP LINKS Check out the most popular links shared on DZone from the past week. Be sure to share the best developer links from across the web at DZone.com. Preview Text:  If you missed anything on DZone this week, now's your chance to catch up! This week's best include a glimpse...

NetBeans Zone - The social network for developers - November 04, 2014 02:46 PM
NetBeans IDE 8 Cookbook

The newly released "NetBeans IDE 8 Cookbook" covers all aspects of Java development with NetBeans 8.  https://www.packtpub.com/application-development/netbeans-ide-8-cookbook Preview Text:  David Salter, co-author of the latest and great NetBeans cookbook, runs you through its main features and highlights! Legacy ...

Geertjan's Blog - November 04, 2014 10:18 AM
Execution Wrappers for IoT Development in NetBeans IDE 8.0.1

Assuming you're doing IoT development and want to run an application to a remote platform that needs to interact, for example, with the Raspberry Pi GPIO, you need to have write access to the virtual files of the kernel.

For example, if that program is executed without "root" rights, it might crash with the following error:

Before NetBeans IDE 8.0.1, a workaround that Jens Deters came up with to circumvent the above problem, was to call a shell script that does the job, as follows:

  1. Rename "/opt/jdk1.8.0/bin/java" to "/opt/jdk1.8.0/bin/javaX".

  2. Create a shell script located in "/opt/jdk1.8.0/bin/" named "java" (as a replacement of the original "java" command“) containing this code:

Now, when the application is run via the above script, the output should be as follows:


However, in NetBeans IDE 8.0.1, there's great news. You can now set an execution prefix, such as "sudo", and then the workaround above is obsolete. As you can see below, when the properties of the remote platform, e.g., your Raspberry Pi, are set in NetBeans IDE, you can include an execution wrapper for the first time:

The above new feature comes from a user request, here:

https://netbeans.org/bugzilla/show_bug.cgi?id=240981

This subtly handy feature fits into a range of integrated tooling that makes NetBeans IDE such a natural choice for anyone creating software in Java for purposes of IoT development, as outlined in detail here by multiple Java developers, including James Gosling himself:

"After having spoken about the ‘Internet of Things’ for decades, I’m thrilled by the extent to which, for ordinary developers, this has been exploding beyond cell phones. NetBeans embedded support makes this development painless, fluid, and fast-paced. Being able to debug a running robot, at sea – or wherever your robot goes – from a thousand miles away, is truly life-altering."

I.e., if you're messing around with IoT devices via Putty, WinSCP, SSH, and a bunch of other command line tools... please, do yourself a favor, and just stop doing that. Just download and install NetBeans IDE 8.0.1, for free, and then install the following plugins: None. Yes, no plugins needed for IoT development in NetBeans IDE, everything described here, all IoT features, are waiting for you to use them, out of the box.

The fact that the feature set for IoT with Java 8 in NetBeans IDE (full create/edit/debug/profile lifecycle that fits into the standard Java development workflow in NetBeans) is now in its second generation, i.e., these features were initially released in 8.0, enabling the 8.0.1 release to focus on finetuning of the existing feature set based on user feedback and interaction, makes for a set of tools that is very hard to beat at this stage.

More similar quotes about Java editing, debugging, and profiling of Java on IoT devices here: http://jaxenter.com/how-to-deploy-debug-and-profile-java-on-the-raspberry-pi-2-108008.html

Many thanks to Jens Deters for the great explanation above, i.e., the text above with the practical example and earlier workaround is more or less copy/pasted from a mail received from Jens, together with the helpful screenshots.

Geertjan's Blog - November 03, 2014 09:55 PM
How to Build NetBeans Modules with Gradle

On Twitter I saw an announcement by Gradleware's Radim Kubacki re Gradle and NetBeans module support recently:


I got quite some help from Radim and below are my basic instructions for getting started with early support for building NetBeans modules via Gradle.

Curious to know what a Gradle NetBeans module looks like? Here, in the Projects window, take a very first look at a Gradle NetBeans module, the first screenshot ever taken of this cool thing:


Take the steps as follows to get set up.

  1. Install Gradle and make sure it works on the command line.

  2. git clone https://github.com/radimk/gradle-nbm-plugin.git or use the Git tools in the IDE to do the checkout. The result is shown below:



  3. Close the IDE.

  4. On the command line, go to the 'standalone' folder that you see above, which is within the 'samples' folder.

  5. Run this Gradle command on the command-line:

    gradle -PnetBeansInstallDir="C:/Program Files/NetBeans 8.0.1" netbeans netBeansRun

Instead of "C:/Program Files", use whatever equivalent on Linux or whatever to specify the installation directory of NetBeans IDE.

The 'standalone' module, the sources of which look as shown below (in the Files window, while the Projects window displays the logical view as shown in the first hierarchical-structure screenshot in this blog entry) if you install the "Gradle Support" plugin, is now built (via the 'netbeans' task above), while the IDE automatically starts up together with an extra cluster containing the module (via the 'netBeansRun' task above), so that the module is installed in the IDE while it starts up.

To verify everything has succeeded in this sample scenario, go to the Help menu and you should see a "Say hello" menu item (which does nothing when you click it).

Now read this, which is referenced in the Tweet with which this blog entry started, and study the Gradle files in the 'sample' module shown above. Then try to apply the above procedure to your own NetBeans modules.

http://plugins.gradle.org/plugin/cz.kubacki.nbm

This is, as you can see from the above, all done from the command line. In a next blog entry, we'll show how to do this within the IDE itself. We'll also learn how to build Gradle NetBeans modules from scratch. And how to migrate existing Ant or Maven modules to Gradle. Anyone can figure these things out on their own after setting up their initial environment as described above. Choice is good and being aware of the choices available to you is therefore also good.

Would be pretty cool if Gradle were to be introduced to development teams at Boeing, NASA, NATO, etc, thanks to the new possibilities that are now exposed to NetBeans Platform developers everywhere, who are always focused on creating large meaningful applications in a wide range of software industries.

Adam Bien - October 31, 2014 08:46 AM
Scheduler, DataSources, Microservices, JSF and JS, Beeing Optimismtic or Questions For the 8th airhacks.tv

Lets start with some news first: airhacks Q & A got a dedicated website http://airhacks.tv with an archive of the past shows.

Now to the questions for the November (3rd November, Monday, 6 P.M. CET) edition of the http://airhacks.tv show:

  1. Question about ejb scheduler vs java ee batch processing. What are pros and cons when using batch processing over ejb scheduler ? Marek
  2. Question about multi datasource and EJB. What is the best way to deal with EJBs which need to use a specific database for caller/user? Should I use
    Interceptors? Should I use injection with request scoped? Wesley
  3. Statement: “You forgot to say one advantage of Spring over JEE. Spring you can deploy on any container.” Mauricio
  4. ‘How do you manage deployed microservices (status, healthchecks, restarting) locally and on servers?’ Tomek
  5. ’How do you use Docker (what setup) locally and on servers? Tomek
  6. Does JSF play well with JavaScript frameworks? [Edward]
  7. Why It Is Impossible To Automatically Handle javax.persistence.OptimisticLockException? “…I had even more finding on optimisticLockException. I had encounter this
    exception and my solution was pretty straight forward which was just retry and
    it works fine with my design and the data were good. The catch is, recently I added a new table which has a relationship to the row
    which was throwing the optimisticLockException. I noticed that the entry in the second table was not created because of this exception. However the record data consistency was maintained because of the retry. But I loose an important
    information in my related table. Does anyone have suggestion on what to do with this kind of scenario?…” [Anuj]
  8. can you share some updates on how to do high availability JEE apps in light of
    JEE7 and tackling session stored data Ahmed
  9. We will also cover the extensive gist comments

Do you have any additional questions? Ask now, 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 to http://www.youtube.com/user/bienadam.

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


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - October 31, 2014 07:00 AM
Tools for MVC in Java EE 8 (Part 1)

Look at the screenshot in yesterday's blog entry. It shows a very basic Java EE 8 MVC project structure. Now imagine you need to create tools to support those who will be creating those kinds of project structures. For NetBeans IDE, there are several approaches you can take:

  • Create several file templates, for each of those files. Or a file template at the end of which all those files, the Java source file providing the Bean, as well as the HTML files, are created. Doable and very simple, though it is more idiomatic to create these kinds of initial files (i.e., everyone doing MVC projects will need these) in NetBeans IDE as part of the project creation process within project templates.

  • Create a project template from the project and let the user select that project template in the New Project wizard as the basis of their own application. I.e., here you're creating a sample project, which is very easy to do. The downside is that, via the New Project Template wizard, you end up with a very basic iterator that can't let the user define the artifact ID, nor any of the Maven properties, nor can the user specify the server to which the application will be deployed.

  • Create a Maven-based project wizard, based on the same iterator as used by the existing Maven-based web application project wizard. This gives you maximum control, together with all the Maven-oriented features of the Maven iterator. Quite a bit of digging in the NetBeans sources is needed, as well as depending on implementation code, since a lot of the classes you'll be referencing are not public APIs. 

I took the third approach above and it works. You can add your own files into the iterator and, as you can see above, the only downside is that you're depending on implementation code here and there.

In the above, notice "MVCSettingsWizardPanel", this is an additional panel added on to the end of the wizard, i.e., in addition to the standard Maven web application panels, for the settings that are relevant to MVC projects, e.g., to let the user provide the names of the MVC artifacts that will be created. 

Near the end of the above, you see this statement, which works, i.e., I can add my own files into the process. Ultimately, once I know which exact artifacts are needed, I can change the below with the names of the files that need to be created, e.g., from Freemarker templates those can be created, same as for all other files created via templates in NetBeans IDE:

FileUtil.toFileObject(rootFile).createData("test","html"); 

The module described in this blog entry looks like this, i.e., I now have a framework for creating my own custom new Maven-based web applications:

Best would be if the project template were to be an official Maven Archetype that could be accessed via the "Project from Archetype" wizard. But a downside to that approach would be that it is a generic wizard, i.e., the MVC-specific artifacts can't be defined in that wizard and would simply be generated into the right places in the structure. What I'm trying to achieve, instead of that, is a way to let the user customize the basic artifacts of the project prior to their creation and the above approach makes that possible.