Č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:
November 28, 2014 11:05 PM
All times are UTC

Sponsored by
sponsored by Oracle

visit NetBeans website
Michael's blog » NetBeans - November 28, 2014 09:29 PM
Web Development with Java and JSF: Bean Validation

Bean Validation As stated before, Books is an application, maintained by just one author, who should know about the expected data. Thus, there is no user interface with immediate response after each input or lots of hints. Of course, those … Continue reading

Adam Bien - November 28, 2014 08:11 AM
JAX-RS 2.0 Client: Retrieving A List Of Instances, Problem and Solution

Retrieving a generic List in a JAX-RS 2.0 client:


List<Workshop> all = this.contextURI.request(MediaType.APPLICATION_XML).get(List.class);

Does not carry sufficient amount of information to deserialize the payload and leads to following (or similar exception):

org.glassfish.jersey.message.internal.MessageBodyProviderNotFoundException: 
MessageBodyReader not found for media type=application/xml, type=interface java.util.List, genericType=interface java.util.List.
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:230)
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:154)
	at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1124)
	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:851)
	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:783)


The javax.ws.rs.core.GenericType helper solves the problem by wrapping the List and providing the necessary information to the built-in deserializer (MessageBodyReader):

import javax.ws.rs.core.GenericType;

List<Workshop> all = target.request(MediaType.APPLICATION_XML).get(new GenericType<List<Workshop>>() {});

There is a symmetric challenge on the server counterpart sending the list to the client.

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


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - November 27, 2014 05:17 PM
Red Hat OpenShift (Part 2)

After part 1, Cojan van Ballegooijen from Red Hat, with a little bit of input from my side, got quite a bit further with the Red Hat OpenShift plugin today. After selecting Red Hat OpenShift in the Cloud Provider dialog, shown below...

...the dialog below appears, i.e., when you click Next above. The UI you see below is 100% the same as the equivalent dialog in JBoss Developer Studio, with thanks to Cojan van Ballegooijen from Red Hat:

Right now, the Username and Password fields work as one would expect, while all the other UI components above aren't backed with business logic yet, i.e., those parts don't function at all yet and are just there as placeholders at the moment.

When Finish is clicked, the OpenShift Java Client (version 2.6.0) is used to make the connection. The result is shown below, i.e., all the domains (in this case, only one domain is assigned to the user) and all the applications within the domains (in this case, there's a single application within the domain) are shown in a hierarchy within the Cloud node in the Services window:

Plus, when you hover with your mouse over the application node, you see the related URL.

So, right now, the Red Hat OpenShift plugin lets you connect to OpenShift and display your domains and applications. That's all, though a promising stage to be at.

Something like this could be where we're heading:

The plugin is found, and under active development, here:

https://github.com/GeertjanWielenga/OpenShift4NetBeans

Adam Bien - November 27, 2014 06:48 AM
Docker, Java EE, Continuous Delivery--A Screencast / Conversation With Arun Gupta

A screencast with Arun Gupta about Java EE, Continuous Delivery, a bit micro services and docker. I demonstrated how this blog (with surrounding infrastructure like x-ray) is build and deployed.

To save time, I automate whatever possible, no I can call this "Continuous Delivery" :-).

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


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - November 26, 2014 07:08 PM
NetBeans IDE Workshop at Hanze University of Applied Sciences

I had a great time at the Hanze University of Applied Sciences in Groningen today. In the bioinformatics department, NetBeans IDE is used to teach Java to third year students (who learn Python during their first year and R during their second year) and Michiel Noback (who I've known for about 3 years, since I delivered a NetBeans Platform course there at some stage), their Java teacher, invited me to do an "advanced NetBeans workshop".

The whole group, including some of the teachers, came to about 30. Many key things about NetBeans were covered, including its history and the many community activities going on in the open source work in and around NetBeans. And then we got down to some work in the IDE. Firstly, we looked at the HTML support, including the NetBeans Chrome Connector plugin. (Basically, we did most things from this YouTube movie.) After that, quite a bit of Java coding (including the handy Cheat Sheet plugin), with many tips and tricks, e.g., heaps of productivity tips, about keyboard shortcuts, code templates, code generators, settings in the Options window, etc. The students were split into groups and had to choose their favorite code templates and then we discussed them and where they could be useful. The Dark Look And Feel Themes plugin (in the Plugin Manager) was very popular, as well as netbeansthemes.com and svenspruijt.nl/themebuilder. Within no time at all, many of the students had set up a customized Sublime-like appearance in the IDE. And, right at the end, in the last hour, we looked at the NetBeans Debugger and there were some small tasks that the students worked on in groups. Conditional breakpoints and dependent breakpoints were examined, while I demonstrated the Beep plugin that adds custom sounds to breakpoints.

A pretty good and intense (from 12.30 to 17.00 with a couple of break in between) session.



Michiel Noback had a fantastic feature request that I started and finished on the train home and am blogging about now in the train: the possibility of setting runtime properties in Ant-based projects without needing to go all the way to the Project Properties dialog:


The element in the status bar listens for the current project, gets its runtime arguments, lets you change them (press Enter to confirm, at which point they're written into nbproject/private/private.properties, which is where the 'application.args' property is stored), which means the runtime arguments are changed, without you having needed to go all the way to the Run tab of the Project Properties dialog. Handy when you're a teacher opening many different projects (i.e., from your students) and needing to change the application arguments to read in various files. Get the plugin here!

Slides used during the first part of the presentation to give some structure to the workshop are here.

NetBeans Zone - The social network for developers - November 26, 2014 01:21 AM
NetBeans in the Classroom: What We Can Learn from A Frustrated Teenager

The frustrated teenager that inspired this article is an extremely bright, though inexperienced, programmer. (We are not speaking here about teenage angst or a young man with girl problems.) He was working on his first web application using Java and the Vaadin framework. Steady progress was being made until it wasn’t. Various issues with cloud deployment and the framework caused him to write: ...

NetBeans Zone - The social network for developers - November 25, 2014 10:38 PM
Karsten Sitterberg: 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 Karsten Sitterberg. -- NetBeans team. Preview Text:  Versatility, performance, open source, and more! Karsten Sitterberg explains why NetBeans IDE is a great development tool. Legacy ...

NetBeans Zone - The social network for developers - November 25, 2014 03:15 PM
NetBeans in the Classroom: JavaFX and JDBC -- A Winning Combination

Ken Fogel is the Program Coordinator and Chairperson of the Computer Science Technology program at Dawson College in Montreal, Canada. He is also a Program Consultant to and part-time instructor in the Computer Institute of Concordia University's School of Extended Learning. Preview Text:  Regular NetBeans education columnist Ken Fogel, the Program...

The NetBeans Community Podcast - November 25, 2014 11:14 AM
NetBeans Podcast 72

Podcast Guests: Mark Stephens, Sylwia Kędzia, Nilay Yener, Emily Hall, Bruno Souza, Luke Mayell, and Adam Bien.

Download mp3: 29 minutes – 20 mb
Subscribe on iTunes

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

"We did so many interviews for the NetBeans podcast during JavaOne, that we had to break it into two parts," announces Mark Stephens (@JavaPDF) in the NetBeans podcast opening chat. Just like with the last podcast, podcast 71, Mark's team at IDR Solutions and NetBeans community members from EPIK (Encouraging Programming in Kids) have driven the content, from selection of topics and interview subjects, to the interviews they did with a bunch of interesting people in the NetBeans community at JavaOne.

And, just like last time, we call on everyone to get their mobile phones out and record some interviews with fellow NetBeans enthusiasts! 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!

03:25 / Sylwia Kędzia - Conversation with Nilay Yener, Co-organizer of GDG Istanbul

Sylwia Kędzia from IDR Solutions chats with Nilay Yener. Nilay is co-organizer of GDG Istanbul and GDG Women Istanbul conferences. She has been one of the key organizers of big events in Turkey, such as DevFest and DevFest Women Istanbul. She's been working for Eteration for 5 years. Sylwia interviews Nilay about conferences she organizes, about how she started her programming career, and why she uses NetBeans IDE in her daily development tasks.

Free registration at DevFest Istanbul: http://devfesttr.com/

14:25 / Emily Hall - Conversation with Bruno Souza, Open Source Advocate

Emily Hall from EPIK chats with Bruno Souza (@brjavaman). Bruno is a Brazilian Java programmer and open source software advocate. He was President of SouJava, a Brazilian Java User Group he helped establish which became one of the world's largest. More on Bruno in Wikipedia! What does Bruno think about NetBeans, what's the role that NetBeans plays in the open source community? Why is NetBeans important? These and other questions are discussed during this interview.

24:35 / Luke Mayell - Conversation with Adam Bien, Java EE Champion

Luke Mayell (@_moonlapse) from EPIK gets to know Adam Bien (@AdamBien), asking him how he started to use NetBeans, what he likes about it, and what could be even better! Consultant and author Adam Bien is an Expert Group member for the Java EE 6 and 7, EJB 3.X, JAX-RS, and JPA 2.X JSRs. He has worked with Java technology since JDK 1.0 and with Servlets/EJB 1.0 and is now an architect and developer for Java SE and Java EE projects.

*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 25, 2014 08:00 AM
Extending the NetBeans IDE Debugger (Part 2)

One way to extend the NetBeans IDE Debugger is to listen to the global context Lookup, as done in part 1 and in the recent Breakpoint Beep story. Another way is to use the extension points that you see when you extend the layer file in a NetBeans module:

For the functionality shown yesterday, i.e., barking breakpoints in the NetBeans IDE Debugger, I started by adding the following to the layer file:

<folder name="Debugger">
    <folder name="BreakpointsView">
        <folder name="Toolbar">
            <file name="org-netbeans-jpda-beep-BreakpointBeepButton-createNewBreakpointActionButton.instance">
                <attr name="serviceClass" stringvalue="java.awt.Component"/>
                <attr name="instanceOf" stringvalue="java.awt.Component"/>
                <attr
                    methodvalue="org.netbeans.jpda.beep.BreakpointBeepButton.createNewBreakpointActionButton" 
                    name="instanceCreate"/>
                <attr intvalue="300" name="position"/>
            </file>
        </folder>
    </folder>
</folder>

Then I added the following, i.e., notice that the FQN of the class below (and the 'public static' are VERY important) is matched in the XML above, and then pops up a JPanel, named BeepChoicePanel. There, the DebuggerManager is used, but that's a topic for another blog entry.


Now you know how to add new JButtons to the left sidebar of the Breakpoints window in NetBeans IDE. Probably the layer file entries could be converted to a @ServiceProvider annotation, but that's also a topic for another blog entry.

Adam Bien - November 25, 2014 04:08 AM
GlassFish and NoAdminPortEx

The error "NoAdminPortEx" indicates, that GlassFish is not able to find the admin port for the specified domain.

The error occurs in case the domain folder ($GLASSFISH_HOME/glassfish/domains/[DOMAIN_NAME]) contains inconsistent data, often caused by an interrupted asadmin create-domain [DOMAIN_NAME] command.

Manual domain deletion (rm -rf) and recreation with asadmin create-domain [DOMAIN_NAME] solves the problem.

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


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - November 24, 2014 03:25 PM
Barking Breakpoints in the NetBeans IDE Debugger

Especially when you have complex breakpoint definitions, such as conditional breakpoints and dependent breakpoints, your debug sessions can become difficult to understand. Why not inject some sounds into the process?

I have created a "Beep Selector" for the Breakpoints window. Notice that there's a new button in the left of the window, right below "Create new breakpoint" and "Select breakpoint groups". The icon displayed on it is what you'd expect a sound icon to look like. That button is provided by the plugin I've created. When clicked, the Beep Selector dialog opens. Predefined, you see "Dog" and "Sheep". However, anyone can drop any WAV file into the user directory, within the "Debugger/BreakpointsView/Sounds" folder, which you will need to create yourself. Any file found in that folder is automatically picked up when the dialog above reopens, no checks are done at this point, i.e., make sure it makes sense to put a file there.

Here are some great sound files:

http://www.findsounds.com/ISAPI/search.dll

Then any breakpoint can be mapped to any sound, either one of the predefined ones, or your own sound. And then, when the breakpoint is hit, you'll hear your sound! As stated at the start of this blog entry, this is especially handy when you have branching breakpoints, i.e., dependent or conditional breakpoints. You'll immediately be informed when one branch is taken, e.g., the 'true' condition can enable a series of breakpoints that relate to one outcome, while 'false' goes off in another direction. Assign one sound to the breakpoints in one branch and a different sound to the other branch and then your debugging will be much simpler.

And it actually works, for me. Testers welcome, please realize it is basically in Alpha state right now, though.

Get it here: http://plugins.netbeans.org/plugin/56682

Right now, to remove a sound, simply delete the breakpoint.

Geertjan's Blog - November 21, 2014 08:02 PM
Breakpoint Beep

Here you see it in action, i.e., in the Breakpoints window, a LineBreakpoint is selected, which causes the text shown above to be displayed in the status bar and, later, a beep to be heard when the breakpoint is hit:

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:

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

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:

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

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.