Č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)
pandaconstantin's blog (feed)
richunger's blog (feed)
APIDesign - Blogs (feed)
ludo's blog (feed)
hansmuller's blog (feed)
pkeegan's blog (feed)
tball's blog (feed)
timboudreau's blog (feed)
David R. Heffelfinger (feed)
Carsten Zerbst's Weblog (feed)
Winston Prakash's Weblog (feed)
Need to find a title (feed)
Roger Searjeant's blog (feed)
Optonline Webmail (feed)
Michael's blog » NetBeans (feed)
DukeScript (feed)
ProNetBeans (feed)
Tim Boudreau (feed)
Paulo Canedo » NetBeans English (feed)
Bistro! 2.0 (feed)
Anchialas' Java Blog (feed)
markiewb's blog (feed)
Anuradha (feed)
Netbeans6/6.5 my best practices (feed)
Java Evangelist John Yeary (feed)
Neil's Dev Stuff (feed)
Category: NetBeans | Software and Science (feed)
Computer says null; (feed)
NetBeans Adventures, Java and more (feed)
Inspiration and Expression » Netbeans (feed)
John O'Conner » NetBeans (feed)
Koberoi Oracle (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)
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)
Gualtiero Testa » Netbeans (feed)
James Selvakumar's Blog » netbeans (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)
mkleint (feed)
NetBeans Community Docs Blog (feed)
The Netbeans Experience (feed)
NbPython/ jpydbg / pymvs (feed)
Shanbag's Blog (ರಜತ ಲೋಕ) (feed)
Wade Chandler's Programming Blog (feed)
Devlin's Lab (feed)
Big Al's Blog (feed)
Code Snakes (feed)
In perfect (spherical) shape (feed)
Van Couvering Is Not a Verb (feed)
Diego Torres Milano's blog (feed)
Vroom Framework (feed)
Messages from mrhaki (feed)
Jeff's Blog (feed)
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)
Manikantan's Netbeans (feed)
Antonio's blog (feed)
Where's my Blog?!

Powered by:    Planet

Last updated:
April 25, 2015 02:05 PM
All times are UTC

Sponsored by
sponsored by Oracle

visit NetBeans website
Geertjan's Blog - April 25, 2015 10:26 AM
Seamless Minecraft Forge in NetBeans

Happy to report that Minecraft Forge works seamlessly in NetBeans IDE. Take the following steps:

  1. Download and unzip Forge 1.8 from http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.8-11.14.1.1341/forge-1.8-11.14.1.1341-src.zip

  2. In the folder where you unzipped the above, run "gradlew setupDecompWorkspace --refresh-dependencies".

  3. Start NetBeans IDE (I am using NetBeans IDE 8.0.2). Go to Tools | Plugins and install "Gradle Support".

  4. Go to File | Open Project. Browse to the folder where you unzipped the above, which will now be recognized as a Gradle project. Open the project. Wait a moment for the Gradle plugin in NetBeans IDE to figure out the structure of the Gradle project you have opened.

  5. Right-click the Gradle project and go to Tasks | run | runClient. After a moment, Minecraft starts up!

Illustrative screenshot, click to enlarge it:

Congratulations to Attila Kelemen from Hungary, for making such a nice NetBeans plugin for Gradle. 

Now mod away

Geertjan's Blog - April 24, 2015 09:00 AM
Nashorn from the Perspective of the Java EE Developer

What is it that's interesting about Nashorn, which is now built into Java 8, for a Java EE developer?

Adam Bien's response:

First, Nashorn is just JavaScript in Java 8. A very fast one and very well integrated with Java. For a Java EE developer, the first interesting thing is automation. For instance, yesterday I had to find some problems in my log files, so I built a quick parser with Nashorn and Java 8, and it was a very pragmatic solution, it took me 20 minutes, and it was ready to go. Then, you know, deployment, starting servers. You can use Nashorn as a system scripting language, which is very very convenient. This is the most obvious and, I would say, least intrusive usage of Nashorn. Then, of course, you can embed Nashorn into your application. What you gain from that—flexible checks, validation rules, algorithms. It is easier to use Nashorn than to write your own parsers, for instance. And what you can also do, of course, is use Nashorn to start Java. One example would be—I created an integration solution where you can very easily map, via JavaScript, input to output, and be able to read a database and output it to Excel, without recompiling the solution, for instance. Wherever you need flexibility and you don't want to redeploy the application, Nashorn might be the right answer.

From a recent interview by Coman Hamilton (from JAX) with Adam Bien, here on YouTube

Adam Bien - April 24, 2015 06:01 AM
Java FX Will Outlive Most Of The JavaScript / CSS Frameworks

Java FX or HTML 5? at jax.de I was interviewed about this topic:

See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - April 23, 2015 07:50 PM
Porting Knockout.js Examples to DukeScript

I hold this truth to be self-evident—a technology without samples is doomed to failure.

Better still is to have examples that relate to something that your target audience is already familiar with.

In the case of the Knockout.js community, these are the samples that everyone knows:

http://knockoutjs.com/examples

And... here are the DukeScript equivalents, in progress, most are already there, while others are still being worked on:

https://github.com/GeertjanWielenga/DukeScriptSamples.git

Feel free to clone them, change them, enhance them, and use them as the basis of your own applications. Notice, in particular, that all the coding you'll do is in Java and not in JavaScript! 

NetBeans Zone - The social network for developers - April 23, 2015 09:26 AM
Minecraft Powered by Mozilla & NetBeans – Code Literacy Teaching Kit by EPIK

Preview Text:  There are many free IDE’s out there but not all are as robust as each other and NetBeans together with its active open source community, whom like the Linux community, is both willing to support the youth learner’s journey and engage, is the IDE we finally settled on. Legacy Sponsored:  ...

Geertjan's Blog - April 22, 2015 01:56 PM
New Spring Boot Integration for NetBeans IDE

Aggelos Karalias, one of the attendees at NetBeans Day Greece, has made a brilliant plugin for NetBeans IDE that provides code completion for Spring Boot configuration properties, click to enlarge the screenshot below:

Congrats, Aggelos! (And great to have met you in Greece!) As you can see above, it works perfectly.

I checked out the sources here, built, and installed them:

https://github.com/keevosh/nb-springboot-configuration-support

And then I used this project by Michael Simons, to make the screenshot above:

https://github.com/michael-simons/biking2

Also, this article is useful about Spring Boot and NetBeans, as well as other technologies, such as AngularJS:

http://info.michael-simons.eu/2014/02/20/developing-a-web-application-with-spring-boot-angularjs-and-java-8

Adam Bien - April 22, 2015 12:44 PM
Upcoming Java EE / Java / Testing / HTML 5 / Persistence Workshops Talks and Events


Real World Java EE Workshops [Airport Munich]>

NetBeans Zone - The social network for developers - April 22, 2015 11:33 AM
Nebrass Lamouchi: 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 Nebrass Lamouchi. -- NetBeans team. Preview Text:  Read about Maven, Java EE, HTML5, JavaScript, Java 8, and the Java debugger... all for free in NetBeans IDE! Legacy Sponsored:  ...

APIDesign - Blogs - April 22, 2015 07:00 AM
JavaScript is the x86 of the Web

Brendan Eich, the inventor of JavaScript: I said 'JS is the x86 of the web' ... the point is JS is about as low as we can go..., here is a video to document the current JavaScript situation together with showing excellent demos as a proof:

--JaroslavTulach 07:00, 22 April 2015 (UTC)

Geertjan's Blog - April 21, 2015 02:18 PM
Mapping Knockout.js Concepts to Java

Here's a table that should help you when expressing your JavaScript-based Knockout.js applications in Java via DukeScript.

Knockout.js DukeScript Example
Observable property @Property
@Property(name = "itemToAdd", type = String.class)
Observable array property @Property with 'array' attribute
@Property(name = "items", type = String.class, array = true)
Computed property @ComputedProperty
@ComputedProperty
static String fullName(String firstName, String lastName) {
    return firstName + " " + lastName;
}
Function @Function
@Function
static void addItem(Data model) {
    String itemToAdd = model.getItemToAdd();
    List items = model.getItems();
    if (itemToAdd!=null&&itemToAdd.length()>0){
        items.add(itemToAdd);
        model.setItemToAdd("");
    }
}

Want to see the above in action? Watch this new screencast created today:

DukeScript - April 20, 2015 04:53 PM
Appify your Application (1)

In our last post we showed you, how you can outsource the design of your application. And while it’s great to be able to do that, it’s still important to know a couple of techniques to make your app behave like an app and not like a Website. This is more about the “Feel” part of Look and Feel. UIs rendered by a WebView sometimes simply behave slightly different than native controls. That’s especially true on mobile devices. There are a couple of tricks you should know in order to fix this. I’ll explain them in a couple of posts. The first trick is about how to stop text selection.

Fix text selection

When you create an app with a WebView by default all text will be selectable. Being able to copy text may be beneficial sometimes, in an app it just feels odd. In an app by default they’re not. So lets disable this feature. You can do so via CSS:

*
{
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
}

input
{
-khtml-user-select: auto !important;
-moz-user-select: auto !important;
-ms-user-select: auto !important;
-webkit-user-select: auto !important;
user-select: auto !important;
}

Most modern Browsers support user-select with a vendor prefix (-webkit, -moz…).

Geertjan's Blog - April 20, 2015 10:06 AM
Hello, Knockout.js Users Everywhere!

Are you interested in increasing the scope of adoption of Knockout.js? If so, you should be interested in the screencast below, which shows you how the Java community can use Knockout.js, without needing to code in JavaScript. After all, the Java community can benefit a lot from the two-way databindings provided by Knockout.js but is prevented from doing so by needing to switch to a different language for coding in Knockout.js. At the same time, there may also be a segment of the Knockout.js community that in retrospect prefers Java over JavaScript and might by means of the below remain within the Knockout.js community thanks to the possibility of using Java.

Either way, enabling your technology to be exposed to the Java community is surely a big win! 

In short, watch this new screencast, created today!

Adam Bien - April 20, 2015 03:57 AM
Java EE 7 on Java 8 Devcrowd.pl Conference Session Video

Playing with Java EE 7 (async JAX-RS, Concurrency Utilities, CDI, EJBs and porcupine) and Java 8 (method handles) at the 2015.devcrowd.pl conference at 19.04.2015:

The sample app and slides are available for download.

See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - April 19, 2015 05:00 PM
YouTube: NetBeans Days Greece (in 3 Minutes)

The first of many more NetBeans Days in Greece came to an end yesterday... and here's a 3 minute impression of the event, with many thanks to Mark Stephens from IDR Solutions (with a trip report here) for recording the interviews:

Thanks to John Kostaras from JCrete for organizing and also speaking, as well as Emmanuel Hugonnet from Red Hat, Mark Stephens from IDR Solutions, Vasilis Souvatzis with his first ever presentation at a conference, and Jaroslav Tulach, founder and initial architect of NetBeans. 

Also a BIG shout out to the Anderson Software Group for sponsoring the event. Thanks Paul and Gail, we promoted your organization and books and everyone applauded on hearing of your support for this event!

Geertjan's Blog - April 18, 2015 07:00 AM
Contact List in DukeScript

Here's a small Contact List app, created in DukeScript, with a bit of help from Jaroslav Tulach. It is shown below running in the browser on my desktop, as well as in the JavaFX WebView:

Here's the sources, unzip them, you'll have Maven projects to work with. 

I don't have Android setup and no Mac OSX available, so I didn't include the related Maven projects for those devices. 

Soon I will blog about the code used in this example and make a screencast about it. 

Geertjan's Blog - April 17, 2015 08:52 PM
Java in the Trenches

Java has been driven into the trenches, some years ago already. (Slightly under hundred years after the photo on the left was taken, in 1914.)

More or less the general consensus appears to be that the frontend battle has been won by JavaScript.

So, what's the role for Java in this brave new world? More or less the general consensus appears to be that Java has great value on the backend. The Java EE Platform is awesome in that it consists of specifications agreed upon across the industry, whereas the JavaScript ecosystem is crazy mad cowboy land.

However, what happens when those frontend developers, who have, without any resistance, moved to JavaScript, discover the value of Node.js over the value of the Java EE Platform? What happens when they see the value of doing the frontend and the backend in the same language, i.e., JavaScript? What happens when they rate that value higher than the value of the industry-based specification-approach promised by the Java EE Platform? When the value of an agreed upon industry-wide platform, i.e., the Java EE Platform, weighs less than the value of having a common programming model right across the application, from its front to its back... then what happens? Java will have no place in the browser and will be pushed back further still, into the purely scientific world, focused narrowly on simulation software, relevant to back-office banking and defense force software, that is, desktop solutions and console solutions, only, where the NetBeans Platform is the purest Java solution, in terms of application framework. It will then be competing with Cobol and AS/400 RPG and their various other crusty friends. 

It's hard, but let's be honest. 

What is to be done? Instead of giving up on the frontend and retreating to the backend, from which a further retreat will inevitably follow, into obscurity, the frontend should be defended, simply because the Java ecosystem is so much better than the JavaScript ecosystem, as Java developers know, by Java developers. How? By means of DukeScript.

Geertjan's Blog - April 16, 2015 07:00 AM
Best NetBeans IDE Tweet, Ever!

https://twitter.com/jeqo89/status/588315745458593792

The point here is the NetBeans is not only an IDE, with the 'heaviness' that the term tends to imply. It is also a text editor, a direct competitor to tools like Sublime, once you discover the Favorites window that enables you to work with individual files, instead of projects:

https://www.moreofless.co.uk/netbeans-text-editor-not-java/

DukeScript - April 15, 2015 11:53 AM
The Design Experiment

So DukeScript claims to have a clean separation of design and development? That’s nice, but many frameworks claim that, and often the statement doesn’t hold in practice. That’s why we decided to do an experiment. Is it possible with DukeScript to completely outsource the UI design to a designer with no knowledge of DukeScript, or a specific set of tools? Here’s what we found:

The state of UI Development

Designing user interfaces is a tough job and we usually spend a lot of time in our live as developers in dealing with design issues. The worst case is if we have to deal with all these issues in manually written code. That’s why for most UI technologies we have tools that allow us to design and test the User Interfaces via drag and drop.

Web Designers vs. Web Developers (Infographic)

Infographic by: Shane Snow. Shane Snow is an entrepreneur, writer, and recent Columbia MS/Digital Media graduate. Visit his personal site and follow him on Twitter @shanesnow.

For Swing we have the Matisse GUI Builder in NetBeans and the Window Builder in Eclipse which help a lot getting the layout of forms right. For JavaFX there’s the SceneBuilder that helps us at least with FXML. But while it’s good to have them all of these tools are rather limited when it comes to slightly more complex designs.

With SceneBuilder for example you can drag and drop a Polygon on your design, but you have no means of changing it. It’s a triangle by default and you need to manually edit the FXML if you want to change that, e.g. make it a star shape. And while coding UIs manually is bad, “coding” (F)XML manually is horrible.

That’s why we decided to use HTML for DukeScript views. Layout and Styling with HTML is very well understood and there are tons of resources out there that help you get it right. Admittedly it’s not perfect, but there’s more information than for any other technology. You also have the best and most advanced tools available, and not just a single one, that seems abandoned and incomplete.

But still it’s us, the developers, who will get the mockups from the designer, and who will have to try to convert them, as pixel-perfect as possible to create the final design. That’s why we decided to do an experiment and see how far we can get in separating design and development. We decided to buy a readymade design and see if we can really use it with DukeScript.

The Setup

We wanted to create an app that is simple enough to show the full source code, so we decided to use our Todo-list example. This is the functional prototype:

In order to make this experiment really fair, we decided not to use a readymade design. If we would have hired a designer to do the design for us we would have been able to give him or her directions how to do it, what to use and what to avoid. So we started looking for a design. There are some websites out there that work similar to stock photo sites, but with website- or app- designs instead of the photos. Graphicriver is one of them. There we found a design that had all the buttons, etc. and looked nice:

The design is in Photoshop format (PSD) just like the designs we typically get from the design department. So now we needed to convert that to HTML and CSS.

Finding the right Designer

Initially I tried to find a designer, but the offers I got were either too expensive (around 1000$), or I didn’t feel confident that the person really had the required skillset. Fortunately someone sent me a hint that there are tons of online services for that. I just needed to type “PSD to HTML” in Google and there they were, by the million…

We checked a couple of review sites to find one that isn’t too expensive while still producing good code, and ended up with Rapidxhtml.

There you simply upload your design and after that, you can decide what you want from them in very much detail. We went for a basic responsive layout. Some things like the styling of checkboxes and scrollbars are extras, because they’re not standardized across HTML-renderers, so we decided to skip them as we only wanted a simple example. In the end the calculated price for our package was $170. That sounded OK, so I pressed the submit button and waited…

Six hours later I received an email from Rapidxhtml telling me my design was ready for download. That was faster than expected (the offers I had received up until then were estimating between 2 days and several weeks). I did so and the result looked pretty good at first sight, but didn’t resize. I wrote back and another hour later I received an updated version that resized. Here’s what the design looks like:

Working with the design

There were some more minor differences between the design and the result, and I wrote back. There was no reply, so I’d suggest that for a real project it’s probably better to go for a premium service ( like psd2html ), or work with a designer you know. But the remaining problems weren’t severe, so I decided to have a closer look at the HTML and CSS. It looked nice, well structured and I could understand what was going on. Here’s the relevant section of the HTML:

<div id="box">
  <div class="box-cont">
    <header class="box-header">
      <div class="box-title">My tasks for today</div>
      <div class="box-links"><a href=""><img src="images/btn-cal.png" alt="" /></a><a href=""><img src="images/btn-settings.png" alt="" /></a></div>
    </header>
    <section class="todo">
      <section class="todo-bg">
        <ul class="todo-list">
          <li class="done"><input type="checkbox" name="" class="toggle" checked="checked" /> Design a to-do list <span class="btns"><a href=""><img src="images/icon-edit.png" alt="" /></a><a href=""><img src="images/icon-delete.png" alt="" /></a></span></li>
          <li><input type="checkbox" name="" class="toggle" /> Design a super task<br />with 2 lines <span class="btns"><a href=""><img src="images/icon-edit.png" alt="" /></a><a href=""><img src="images/icon-delete.png" alt="" /></a></span></li>
          <li><input type="checkbox" name="" class="toggle" /> fix the dog toy <span class="btns"><a href=""><img src="images/icon-edit.png" alt="" /></a><a href=""><img src="images/icon-delete.png" alt="" /></a></span></li>
          <li><input type="checkbox" name="" class="toggle" /> buy coffee <span class="btns"><a href=""><img src="images/icon-edit.png" alt="" /></a><a href=""><img src="images/icon-delete.png" alt="" /></a></span></li>
          <li><input type="checkbox" name="" class="toggle" /> feed the dog <span class="btns"><a href=""><img src="images/icon-edit.png" alt="" /></a><a href=""><img src="images/icon-delete.png" alt="" /></a></span></li>
          <li><input type="checkbox" name="" class="toggle" /> take a walk with the dog :) <span class="btns"><a href=""><img src="images/icon-edit.png" alt="" /></a><a href=""><img src="images/icon-delete.png" alt="" /></a></span></li>
        </ul>
      </section>
    </section>
  </div>
</div>

Next I started applying the design to my Todo-list sample. The changes I had to make were very straightforward. I removed the demo content of the list and added some data-bind directives instead:

<div id="box">
            <div class="box-cont">
                <header class="box-header">
                    <div class="box-title">My tasks for today</div>
                    <div class="box-links"><a href=""><img src="images/btn-cal.png" alt="" /></a><a href=""><img src="images/btn-settings.png" alt="" /></a></div>
                </header>
                <section class="todo">
                    <section class="todo-bg">
                        <ul class="todo-list" >
                            <!-- ko foreach: tasks -->    
                            <li>
                                <!-- ko ifnot: $root.editing()===$data -->
                                <input type="checkbox" name="" class="toggle" data-bind="attr:{checked: complete}"/>
                                <span data-bind="text: title">

                                </span>
                                <span class="btns">
                                    <img src="images/icon-edit.png" alt="" data-bind="click: $root.editTask"  />
                                    <img src="images/icon-delete.png" alt="" data-bind="click: $root.deleteTask" />                        
                                </span>


                                <!-- /ko -->

                                <!-- ko if: $root.editing()===$data -->
                                <form data-bind="submit: $root.stopEditing">
                                    <input type="text" data-bind="textInput: title"/>
                                </form>
                                <!-- /ko -->
                            </li>
                            <!-- /ko -->
                            <li>
                                <form data-bind="submit: addTask">
                                    <input type="text" data-bind="textInput: input"/>
                                </form>
                            </li>
                        </ul>
                    </section>
                </section>
            </div>
        </div>

Running the example showed the expected result:

I fixed some minor problems in the html and css, and made the project more responsive by hiding some paddings and elements on smaller devices, but nothing fancy. There are some tricks that help an app behave like an app, and not a website, and I applied some of them, e.g. to prevent the “scroll/bounce effect” on iOS, I used this:

<script type="text/javascript" >
            document.ontouchmove = function (event) {
                event.preventDefault();
            };</script>

Normally I would have asked the designer to fix it, but with the online service that obviously didn’t work. So building a longer term relationship with your designer is beneficial. But even with this suboptimal setup, I was able to get a result quite quickly. After about an hour of changes the application was ready.

The result

Was the experiment a success? I spent 174$ for it (4$ for the PSD and $170 for the conversion). It took 7 hours to get from the design to the HTML including a fix. The result could be used more or less unmodified in the app. So, yes, I think it was a very successful experiment!

Try it for yourself, there are plenty of nice app designs out there that you can convert to an app using DukeScript, no design skills required!

You can download and test the result yourself:

https://github.com/dukescript/design-experiment

Geertjan's Blog - April 15, 2015 09:13 AM
YouTube: WADL-Driven REST Client Generation

Did you know you can (1) let Jersey generate a WADL file and (2) let NetBeans generate REST client stubs from the WADL file? No? Well, watch this screencast to see it all in action:

NetBeans Zone - The social network for developers - April 14, 2015 05:15 PM
NetBeans at Java Day Tokyo 2015

Recently, Java Day Tokyo 2015 was held, which included a successful NetBeans event. Around 100 attendees came to the NetBeans event, with about 50% being familiar with NetBeans IDE and 20% using it for their day-to-day development.  Preview Text:  Read a report by Masaki Katakai in Tokyo on the recently held NetBeans Day in Tokyo! ...

Geertjan's Blog - April 14, 2015 04:46 PM
YouTube: Defect Driven Design!

Every now and then, this very specific YouTube clip needs to be republished to the world, simply because it is so awesome!

NetBeans Zone - The social network for developers - April 14, 2015 12:18 PM
Agenda: NetBeans Days Greece

NetBeans Days in Greece, to be held on Friday and Saturday, 17 and 18 April, will be a great event in the history of the NetBeans community. The agenda has been finalized (although it can/will change based on what participants want to do/hear during the event) and is as follows: Friday, April 17 Preview Text:  The agenda for NetBeans Day Greece,...

NetBeans Zone - The social network for developers - April 14, 2015 07:10 AM
j-lawyer.org: Our 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 Jens Kutschke and the development team at j-lawyer.org in Germany. -- NetBeans team. Preview Text:  NetBeans feels more like "all of one piece" supporting a typical development process, instead of having...

Geertjan's Blog - April 13, 2015 12:32 PM
Free: Inject Extra Power into the Browser!

Are you getting everything you can out of your browser? Sure, the browser can do so much more with new and richer content than a few years ago. However, did you know you can connect it to your development environment?

Install the free NetBeans Connector plugin into the Chrome browser and you're good to go:

Once you've installed the above, what can you do with it?

Quite a lot! Here are some small examples:

So, go here, and inject new power into the browser, for free, today!

DukeScript - April 12, 2015 04:53 PM
No More Redeploys!

One of DukeScript’s motto is “JavaScript as it was meant to be!” - i.e. our vision is to use the benefits of Java to create something more productive than JavaScript. JavaScript developers are used to an edit/reload/try workflow. The iterative nature of that style of development is very additive and productive. It is so comfortable that people may believe it is perfect. Well, it is not: DukeScript can do even better!

Yes, with DukeScript you can avoid the need to reload and moreover thanks to the structural nature of the used language (Java) also avoid the loss of memory state during “reload”.

No Redeploys via Command Line

Let’s start by creating sample skeletal project from our Maven Archetypes and execute it:

$ mvn archetype:generate \
  -DarchetypeGroupId=com.dukescript.archetype \
  -DarchetypeArtifactId=knockout4j-archetype 
  -DarchetypeVersion=0.8 \ # or more recent version when available
  -DgroupId=com.dukescript.test \
  -DartifactId=no-redeploys \
  -Dversion=1.0-SNAPSHOT
$ cd no-redeploys
$ mvn install
$ cd client
$ mvn exec:exec

Your application is running and you can play with it. For example change the Hello World message and see how it is changing throughout the page (more about the structure of the application in getting started tutorial). However we are not here to analyse the structure of the application, but to see the benefit of the re-deploys. Leave the application running and locate the DataModel.java file in your application. In the words method find the line that splits the Message String and change it to convert all characters to lowercase:

$ find src/ | grep DataModel.java 
src/main/java/com/dukescript/test/DataModel.java

# the following command prints the line we want to change
$ grep split src/main/java/com/dukescript/test/DataModel.java
        String[] words = message == null ? new String[0] : message.split(" ", 6);

# use your favorite editor here
$ sed -i s/message[^=]*split/message.toLowerCase\(\).split/ src/main/java/com/dukescript/test/DataModel.java

# verify the line is really changed
$ grep split src/main/java/com/dukescript/test/DataModel.java
        String[] words = message == null ? new String[0] : message.toLowerCase().split(" ", 6);

# perform the re-deploy
$ mvn process-classes

Now return back to your application and type a character into Hello World message field. This invokes the modified code and you can see that all words are now in lower case. If you want, you can now switch to upper case:

$ sed -i s/message[^=]*split/message.toUpperCase\(\).split/ src/main/java/com/dukescript/test/DataModel.java
$ mvn process-classes

See the productivity boost!? No more re-deploys! Just change your code and immediately see the changes.

Please note that the system is better than page reload in JavaScript - the text in the message field is kept even the code is reloaded. This is possible because Java is a structured language - we know what a class is, what are its methods and their code. This is clearly separated from object instances, so when there is a code change, we can just change the code in classes, but we can leave the object instances in memory untouched.

No Redeploys from an IDE

Some may object that JavaScript is still more productive, as it avoids the process-classes step. True, if you are working from a command line, however if you switch to some reasonable development environment, like NetBeans, you can avoid this step alltogether.

Open the client project in NetBeans 8.x. Press F6 to execute it. Play with the application as usual. Press Ctrl-O and to open the DataModel class. Change the line as in the above example. Press Ctrl-S to save the file and change something in the Hello World input field in your running application - the change is immediately visible.

No more re-deploys with DukeScript!

Geertjan's Blog - April 10, 2015 07:00 AM
NetBeans Platform Certified Training at Fontys University of Applied Sciences

Yet another NetBeans Platform Certified Training was held recently. At Fontys University of Applied Sciences in Venlo, a group of students is working on a logistics simulation software called LIMO, which stands for "Logistics Impact Model":

http://limo.fontysvenlo.org

The purpose of the project, created together with and for TNO, is to graphically visualize logistics chains, simulate costs, and generate advice on how to reduce or eliminate expenses.

The source code is on GitHub:

https://github.com/LogisticsImpactModel

Here's the group:

In two days, all the major NetBeans Platform topics were covered, many hands-on workshops were done, and by the end, after a lot of interaction and discussion, the group was able to plan several new features for the project. For example, a NetBeans-based Project System will be added and undo/redo functionality will be integrated into the Visual Library Scene. A prototype of the new features, as well as the existing Scene with its simulation capabilities is shown below: 

Are you also creating client-side applications and would you like to be able to immediately focus on the domain/business logic, rather than all the infrastructure and plumbing that desktop applications require? For domain-driven desktop programming, the NetBeans Platform is a perfect solution. Either get the awesome book "NetBeans Platform for Beginners" or the equally awesome JavaFX-oriented book "JavaFX Rich Client Programming on the NetBeans Platform". Or get both. And take a NetBeans Platform Certified Training, to quickly put all the pieces together, 100% free if you're a group of developers at an educational institution.

NetBeans Zone - The social network for developers - April 10, 2015 06:52 AM
Mirko Rener: 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 Mirko Rener. -- NetBeans team. Preview Text:  What do you like most about NetBeans IDE? In this article, Mirko Rener talks about multi-language support, the NetBeans community, and much more! ...

markiewb's blog - April 09, 2015 07:31 PM
Github issues and Color Preview plugins

Today I like to blog about some new plugins from another very productive plugin author. All of them were created by junichi11, who created more than 15 plugins, which all are freely available at the NetBeans plugin portal. Many of them are PHP-related, so if you are a PHP developer you are certainly using one of his plugins already.

a) Github issues plugin

https://github.com/junichi11/netbeans-github-issues-plugin

This plugin integrates issues from your github repositories into the tasks view of NetBeans. From within NB you can view, edit and create issues. And much more…

2015-04-09_21h02_07

BTW if you are using Backlog for tracking your issues, then you can also use https://github.com/junichi11/netbeans-backlog-plugin

b) Color preview plugin

https://github.com/junichi11/netbeans-color-codes-preview

This plugin shows color for hexadecimal encoded colors (f.e. #FF0045) in the left sidebar of the editor. This feature is not new to IDEs, but it is now finally available for NetBeans. Enable this feature via “View->Show Colors” and the colors in CSS files will be visualized. It is configurable and thus not limited to CSS.

2015-04-09_21h08_26

The plugins are signed and this way they can be installed directly from your IDE (Tools->Plugins->Available Plugins). You can also download them from their github pages or from http://plugins.netbeans.org and install them manually

Do not hesitate to post feedback or file issues at the respective github pages of the plugins. junichi11 is a friendly one and very responsive! Thank you for the good work junichi11!


Geertjan's Blog - April 09, 2015 08:59 AM
Sample REST Application

For some time in NetBeans IDE, there's been this example available in the New Project dialog:

The template above creates a new NetBeans Platform application that consumes services from the "Message Board" application that is available in the "Web Services" category in the New Project dialog.

I looked at the code of the "Sample REST Application" and, since it had been written some years ago, a lot of XML files are included, instead of annotations on TopComponents. And there are other problems in the example, too. Rather than updating it within the NetBeans sources, I think it's better to have the code available separately, so it can be worked on and extended further by anyone out there. So, here it is:

github.com/GeertjanWielenga/SampleRESTApplication

Here's the structure of the sample REST application, together with the Java EE application that provides the services:

Notice that the NetBeans Platform application uses Maven as its build system.

When both applications are deployed, you see the following, click to enlarge the image:

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

Adam Bien - April 09, 2015 04:54 AM
13th Airhacks.tv Questions and Answers

13th airhacks.tv, or answers for the questions:

Accidentally, I forgot to answer the questions 9 and 10. I will cover them soon, probably in a 13/2 show.

Any questions left? Ask here.

See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting


Real World Java EE Workshops [Airport Munich]>