Friday Jan 31, 2014

Awesome Blogs (Part 1): http://drunkendev.blogspot.nl

I'm starting a new occasional series where I highlight awesome blogs around the webiverse.

And a great one, what a pleasure to kick the series off with this one, is the brand new http://drunkendev.blogspot.nl by Brett Ryan, from Melbourne, Australia.

  • In Migrating to JDK 8 with NetBeans, his first blog entry, he shows how to set up and use NetBeans 8 to refactor applications to use JDK 8. It is well written, clear, has lots of screenshots, and is just a great read.

  • In The Power of the Arrow he shows 5 examples of code where he starts with a pre-Java 8 construct and then moves it step by step via NetBeans 8 to a new Java 8 lambdafied style, with all the intermediate steps included, and motivations why making the move makes sense.

And he says cool things about NetBeans 8, such as:

"I started doing these by hand and then slapped myself, NetBeans' hints can do all this for me. With NetBeans generally a hint will appear, you smile and accept it, possibly modify, then another hint might appear so you grin and accept that too; before you know it you've taken 5 or more lines down to 1."

I'm really looking forward to seeing what's next in Brett's blog!

Thursday Jan 30, 2014

YouTube: "Smart Migration to JDK 8"

Don't know where to start with JDK 8? Here's a complete kit of info getting you in the right frame of mind for upgrading your code to leverage the Java 8 language changes.

http://www.youtube.com/watch?v=http://www.youtube.com/watch?v=N8HsVgUDCn8

Feedback is welcome!

Wednesday Jan 29, 2014

Slides: "Smart Migration to JDK 8"

A new slide deck for a screencast I am working on, planning to publish it tomorrow, on how to effectively migrate to JDK 8. I.e., you simply must have tools to do so, otherwise it's a nightmare.

All the slides with "Demo" on them are the points where I will switch into NetBeans IDE 8 and do a small demo.

Probably a lot of the above will change quite a bit. 

The slideshare location is here: http://www.slideshare.net/GeertjanWielenga/smart-migration-to-jdk-8

On a related note, take a look at this brilliant new article by Brett Ryan on migrating with NetBeans 8 to JDK 8:

http://drunkendev.blogspot.nl/2014/01/migrating-to-jdk-8-with-netbeans.html

Tuesday Jan 28, 2014

YouTube: NetBeans 8 Loves PrimeFaces (Part 2)

I think the news for users of Java EE 7, PrimeFaces, and Maven, yesterday, was pretty cool. A complete CRUD application in PrimeFaces can be generated from your database.

However, there's more! (With NetBeans, there's always more.) Rather than generating a complete CRUD app, you might simply want to create a PrimeFaces data table for your backend. Forget all the CRUD features. Instead, you only want to create a data table that accesses your database via all the Java EE 7 specifications. How to do this without scratching your head?

Here's how:

http://www.youtube.com/watch?v=CA4t8DUjvyU

Monday Jan 27, 2014

YouTube: NetBeans 8 Loves PrimeFaces (Part 1)

Do you have less than 5 minutes to spend learning something really cool? And the cool thing is that if Maven, Java EE 7, and PrimeFaces are in your toolbox, then definitely NetBeans 8 should be too! The evidence is below, in a YouTube clip of less than 5 minutes.

http://www.youtube.com/watch?v=5aTFiNxzXF4

Saturday Jan 25, 2014

Ad Designer on the NetBeans Platform (Part 2)

I added some new features to the visual designer I mentioned a few days ago. Now there is automatic synchronization from the view to the source (not yet from the source to the view), as well as better checking about where the drop can take place, i.e., the "logo" can only be in the header, etc, as well as a drop image, if the item can be dropped.

Video speaks better than words:

Source code:

https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.4/misc/GraphicHTMLEditor

Even though it's got HTML in the name, it's simply a visual designer for XML files. After that, the idea is that the XML files get converted to HTML.

Friday Jan 24, 2014

Air Traffic Standards Award for Barco Orthogon with NetBeans

In the air traffic management (ATM) domain, System Wide Information Management (SWIM) is a new open standard-based information infrastructure which will connect all ATM stakeholders, aircraft as well as all ground facilities. In the recently held annual SWIM innovation contest, where innovations in software related to this domain are highlighted, Barco Orthogon won the top prize, in one of the two categories, namely "applications", with a NetBeans Platform solution.

So, here we have one of the leaders in the standards-oriented air traffic management domain heavily using Java as its language, the NetBeans Platform as its application framework, and NetBeans IDE as its development environment. 

Below you can see part of the solution that won Barco Orthogon the prize, i.e., these are screenshots of Barco Orthogon's ODS Open Platform based solutions, which in turn are based on the NetBeans Platform. The images demonstrate the effect of two different sets of color resources, one for a "day view" and the other a "night view". Barco Orthogon won for the enhancements it constructed on top of the SWIM standards. For example, the connecting lines in the timeline view between the flight strips and the time scales have different colors because they indicate a status of the arrival sequence planning to the air traffic controller. In the night view, blue means "pre-sequenced" (preliminarily planned), white is "free" to be changed by the controller, while grey is "frozen", that is, in the very last phase of approach, and cannot be changed any more.

Great work, Barco Orthogon team!

Thursday Jan 23, 2014

Ad Designer on the NetBeans Platform (Part 1)

Here's a new NetBeans Platform sample that puts many typical things together and gets you jump started when creating some kind of designer.

The movie above is silent. It shows how to create a new XML file of the type managed by the application. It shows you can drag items into certain regions of the visual designer, i.e., items in the Header category of the Palette can only be dropped in the top of the three widgets, items in the Body category only in the middle, etc. Then right-click anywhere to serialize into the XML file.

Source code:

https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.4/misc/GraphicHTMLEditor

Even though it's got HTML in the name, it's simply a visual designer for XML files. After that, the idea is that the XML files get converted to HTML.

Now see part 2.

Wednesday Jan 22, 2014

Excluding Proposals from Code Completion in NetBeans 8

Finding the place in the Options window where you can list the classes you'd like to exclude from the Code Completion box is not easy.

Therefore, in NetBeans 8, you can exclude the classes you don't need right from within the Code Completion box. Below, notice the lightbulb at the far right in the currently selected item in the Code Completion box, which appears the second time you call up code completion:

Press Alt-Enter or click the lightbulb and now you see this:

Press Enter and the item is excluded from the Code Completion box because it has now been added here for you, i.e., instead of going all the way here, the class was registered here for you when you pressed Enter above:

NetBeans 8. Making your coding life simpler all the time.

Tuesday Jan 21, 2014

NetBeans IDE 8 in One Screenshot

I believe this image to represent the essence of the key features of NetBeans IDE 8.

For more: https://netbeans.org/community/releases/80

Monday Jan 20, 2014

Options Window Color Analysis

So you're happily using JTattoo in your NetBeans Platform application. However, when you use the darker variations, such as "com.jtattoo.plaf.graphite.GraphiteLookAndFeel", you run into a problem. Though all the colors change as you'd expect... there's still the white background at the top of the Options window, as you can see below. 

That may seem like a small and insignificant problem. However, in the real world, Java and the NetBeans Platform are to be found in air traffic management and air traffic control systems, where the possibility of switching between a "day view" and a "night view", with all the related color updates, is not a "nice to have", but a "must".

So, the pesky white bar at the top of the Options window is a real problem in these real scenarios. A glaring white background is the very last thing you want in the Options window when the traffic controller has switched to "night view".

How to fix it? First, run the application from NetBeans IDE in Debug mode, open the Options window, and then click the orange camera button in the toolbar. Now a snapshot is made of the Options window and rendered in NetBeans IDE, where you can click on anything in the snapshot and see its related properties, such as the name of the panel where that white background is defined:

Then dig into the source code and find that panel. You now find that "Tree.background" is the relevant UIManager color for the white background in the Options window:

private static Color getTabPanelBackground() {
    if( isMetal || isNimbus ) {
        Color res = UIManager.getColor( "Tree.background" ); //NOI18N
        if( null == res )
            res = Color.white;
        return new Color( res.getRGB() );
    }
    return Color.white;
}

Switch into your @OnStart annotated Runnable and use "Tree.background" as shown below:

@OnStart
public class Startable implements Runnable {
    @Override
    public void run() {
        try {
            UIManager.setLookAndFeel("com.jtattoo.plaf.graphite.GraphiteLookAndFeel");
            UIManager.put("Tree.background", Color.LIGHT_GRAY);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(Startable.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(Startable.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(Startable.class.getName()).log(Level.SEVERE, null, ex);
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(Startable.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}

And here's the Options window again, gone is the white background at the top:

Don't like the light gray color I set above? Fine, change it to another color. The point is that you now have control over that color and you also know how to figure out similar problems next time.

Sunday Jan 19, 2014

JTattoo and NetBeans Platform

A first attempt at JTattoo usage in a NetBeans Platform application.

To achieve the above, create a new module that wraps JTattoo, and in a different module set a dependency on the JTattoo module and then include the following:

@OnStart
public class Startable implements Runnable {
    @Override
    public void run() {
        try {
            UIManager.setLookAndFeel("com.jtattoo.plaf.smart.SmartLookAndFeel");
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(Startable.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(Startable.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(Startable.class.getName()).log(Level.SEVERE, null, ex);
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(Startable.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

}

Any NetBeans Platform developers using JTattoo out there, would be great to hear your opinions on it, and any tips and tricks.

Saturday Jan 18, 2014

Width of JavaScript Code Completion Box in NetBeans IDE

One thing I don't like about doing JavaScript in NetBeans IDE is the very wide code completion box, see below. Doesn't even fit in this blog, it's so wide, nor in the browser when you enlarge it below, without scrolling.

In NetBeans IDE 8, there's a new option to configure the width of the code completion box for JavaScript. You can see it below, "Code Completion Item Signature Char Width", which is set to 40 by default, but I prefer 10:

And now the code completion box is much friendlier:

And check out the cool Phaser code completion:

Note: This code completion configuration option is not in NetBeans IDE 8 Beta. It was added after that was released. You'll need a nightly build or wait for the final NetBeans IDE 8 release.

Friday Jan 17, 2014

Simple Security Mechanism for the NetBeans Platform

If you want a simple security mechanism for the NetBeans Platform, go here:

https://blogs.oracle.com/geertjan/resource/SecurityMechanism.zip 

Run the attached from NetBeans IDE 7.4. If you're not logged in as 'admin', there's no Admin menu. Otherwise, there is.

The @OnStart, i.e., this is the new way of doing ModuleInstall classes, no need to register in the Manifest:

@OnStart
public class Startable implements Runnable {

    @Override
    public void run() {
        NotifyDescriptor.InputLine nd = new NotifyDescriptor.InputLine("Name", "Login");
        //Got tired of typing it by hand:
        nd.setInputText("admin");
        Object response = DialogDisplayer.getDefault().notify(nd);
        if (response == NotifyDescriptor.OK_OPTION) {
            String username = nd.getInputText();
            NotifyDescriptor.Message msg;
            if (username.equals("admin")) {
                Authentication.setIsAuthenticated(true);
            } else {
                Authentication.setIsAuthenticated(false);
                FileObject admin = FileUtil.getConfigFile("Menu/Admin");
                if (admin != null) {
                    try {
                        admin.delete();
                        FileUtil.refreshAll();
                    } catch (IOException ex) {
                        Exceptions.printStackTrace(ex);
                    }
                }
            }
        } else {
            LifecycleManager.getDefault().exit();
        }
    }

}

The Authentication switch:

public class Authentication {

    static boolean isAuthenticated;

    public static boolean isIsAuthenticated() {
        return isAuthenticated;
    }

    public static void setIsAuthenticated(boolean isAuthenticated) {
        Authentication.isAuthenticated = isAuthenticated;
    }
    
}

The layer.xml:

<folder name="Actions">
    <folder name="Windows">
        <file name="org-demo-OpenSecurityAction.instance">
            <attr name="displayName" stringvalue="not used"/>
            <attr name="instanceCreate" newvalue="org.security.login.secure.SecretAdminAction"/>
        </file>
    </folder>
</folder>
<folder name="Menu">
    <folder name="Admin">
        <attr name="position" intvalue="1000"/>
        <file name="org-demo-OpenSecurityAction.shadow">
            <attr name="originalFile" stringvalue="Actions/Windows/org-demo-OpenSecurityAction.instance"/>
            <attr intvalue="0" name="position"/>
        </file>
    </folder>
</folder>

The secret Admin Action:

public final class SecretAdminAction extends AbstractAction implements Presenter.Menu {

    @Override
    public void actionPerformed(ActionEvent e) {
        //not used, set actions on menu items instead
    }

    @Override
    public JMenuItem getMenuPresenter() {
        JMenu menu = new JMenu("User Administration");
        if (!Authentication.isIsAuthenticated()) {
            menu.setVisible(false);
        } else {
            menu.add(new JMenuItem("Show Users"));
            menu.add(new JMenuItem("Change Users"));
        }
        return menu;
    }

}

Thursday Jan 16, 2014

Integrated AngularJS Development

What do we mean by "Integrated AngularJS Development"? Integrated AngularJS Development means having all the tools that you need at your fingertips in a single environment.

And that's what NetBeans IDE 8 gives you (even more than NetBeans IDE 7.4 and previous releases did).

  • Need to do some AngularJS coding? OK, we'll fire up an HTML editor. And a JavaScript editor. And a CSS editor. No, let's not do that. Just start up the super light and shiny new NetBeans IDE 8 for HTML5 and PHP development and you'll have all three editors available in one single development environment.

    Click here to get there fast.

    And here's the result, i.e., a super slimmed down NetBeans IDE with only frontend tools. And a heap of samples!

  • Need the AngularJS Seed template? I guess we'll go to the AngularJS Git repo and then... No, let's not do that. Stop doing that forever. It's not needed because right here in NetBeans IDE is the AngularJS Seed template.

  • Need to add some other JavaScript libraries? Hmmm... we'll need to go to Google and search for those libraries. Then find the relevant repo. Then make sure to get the latest version of the library. Then download it. Then add it to my project. Nope. No need for all that boring and error prone grunt work. Just select the JavaScript libraries you need, during creation of the project, and add more afterwards, via dialogs that link off to CDNJS.com. And you can update the list anytime, which will pull in the latest versions of the JavaScript libraries.

    ">

  • Need to reference your files in your HTML files? OK, so now we have our JavaScript libraries, our CSS files, our image files... Hmmm... now the boring work begins of typing all the references to those files inside my HTML file. Wrong! Just drag and drop the files into the HTML file and magically all those references will be created for you.

    http://www.youtube.com/watch?v=-5dbwgzi0nA

  • Need to figure out where the views are for the controllers? We need to look for a "Search" feature and then type in the name of... No! No need for that either. Hold down the Ctrl key and then move your mouse over the reference to the HTML file or to a controller, in the "app.js" file. Then the reference becomes a hyperlink which you can click to jump to the referenced view or controller.

  • Need to figure out what those AngularJS directives mean? Look, sooner or later one needs to do some research. So, let's go to the AngularJS site and look for the directives there and then... Forget about it! The AngularJS documentation is built right into the editor, you'll see it during code completion.

  • Need to figure out the properties you defined in the controller? Yes, you're in the view, happily coding away and need to refer to the controller properties in your ng-repeat definition or somewhere else in your HTML. So, let's look for that controller file... hmmm... where is it. No! No need for that either. Call up code completion and it will suggest to you the properties applicable to the current context in the view.


    Above, also notice that "beer" is underlined in grey, telling me that I have not yet used that variable. The code completion below is especially sweet, since it doesn't only give you access to the controller, but to the JSON that you defined within the methods within the controller:

    angular.module('myApp.controllers', []).
      controller('MyCtrl1', function($scope) {
          $scope.allbeers = [{name:'heineken'},{name:'grolsch'}];
      });

    So the "name" that you see in the code completion below comes from the "name" in the function above, in the relevant scope.

  • Need to deploy the app during development? Sigh. Now I need to deploy the app and then kind of figure out where those images and other resources that I see in the browser are defined back in the development environment. Oh well. Bit of a pain, really. Not really, not at all! There's a plugin for the Chrome browser that enables NetBeans IDE and the Chrome browser to interact with each other. Clicking in the browser shows you where rendered resources are defined back in the IDE! And vice versa!

  • Need to deploy to a browser on a mobile device? Yeh, this part is not much fun. Figure out command line calls to iOS and Android... then deploy them there, and the Android emulators are kind of slow, and it's all a bit of a hassle. Maybe skip trying out the app on all mobile devices, just too much work, let's focus on only the most popular ones. No need! Simple tools in the IDE let you deploy directly to your browser, whether on the desktop or on the mobile device, including iOS, if you're on Mac OSX, of course.

  • Need to work in Chrome Developer Tools and keep changes synchronized with files in NetBeans IDE? Yeah, that's, like, totally impossible. Wrong!

    https://www.youtube.com/watch?v=O85AV406SXI

  • Need to debug and style on the mobile device? Yeah, well, forget about it. That's just not possible. Wrong again:

    https://www.youtube.com/watch?v=PRj9JScvcJE

  • Need to deploy natively to mobile devices? Wow. Need to learn ObjectiveC. That's got to suck. And maybe having a native app on Android isn't so important either. Let's just convince our users that the browser on the mobile device is just as cool as native apps. Nope! No need to be a spin doctor anymore. Just use Cordova (a.k.a. PhoneGap), accessible and configurable from NetBeans IDE. Via one or two clicks, Cordova will create a native app for you for either iOS or Android and you can even deploy your Cordova generated app straight to the mobile device from NetBeans IDE.

  • Need to set up Karma? Oh, yes, Karma would be great as a test runner. Lots of buzz around Karma. Need to go on-line and figure out how to set up Karma. Probably quite a bit of work involved in that, so let's put that on the backburner for later. In the meantime, I'll just do without testing, will do that later when I have Karma set up. No need for this approach, either. As soon as you've created your AngularJS Seed template, you also have Karma support in NetBeans IDE, since the IDE figured out from the AngularJS Seed template that Karma support needs to be set up for you.

  • Need to set up Grunt? SASS? LESS? Oh, yes, there's these other cool technologies to include, somehow. Hmmm. Probably hard work. Let's also not do that immediately. Wrong again! Here it is, you can select them from the New File dialog and incorporate them immediately.

    And here's SASS, the movie:

    http://www.youtube.com/watch?v=0QvgzBp2_rw

  • Need to use Emmet and CoffeeScript? Well, that's all nice but I need Emmet and CoffeeScript. Not seeing those in the New File dialog, so I guess I'll... Wait! Just go to the Plugin Portal and you'll find what you're looking for.

  • Need to check the sources into Git? Doing well now, time for a break, let's check everything into Git. OK, let's call up the command line and... Wait! No need for the command line, NetBeans IDE has great Git support built into it.

Wow, so... wait... all I need is NetBeans IDE..? Well, if you say so!

Wednesday Jan 15, 2014

YouTube: Streams, Lambdas, and Method References in Java 8

In this brief and silent YouTube clip, we end with this method, which uses a method reference in a stream:

public synchronized int getNumberOfItems() {
    return items.stream().mapToInt(ShoppingCartItem::getQuantity).sum();
}

Another way we express the same method is as follows, which uses a lambda in a stream:

public synchronized int getNumberOfItems() {
    return items.stream().mapToInt((x) -> x.getQuantity).sum();
}

And we start with this one:

public synchronized int getNumberOfItems() {

    numberOfItems = 0;

    for (ShoppingCartItem scItem : items) {

        numberOfItems += scItem.getQuantity();

    }

    return numberOfItems;

}

How to get from the above to the compacter JDK 8 equivalents, via various alternatives, watch the silent movie below.

http://www.youtube.com/watch?v=DGnqAp_yxQo

You'll notice that I keep moving with my mouse into the left sidebar. I do this to show what I'm doing because if I had pressed Alt-Enter each time, to popup the hint suggestions, you wouldn't have seen what I'm doing. In real life, you would press Alt-Enter each time you see the mouse move into the left sidebar above.

And, by the way, what you also see above is that refactoring works across lambdas, streams, method references, and the traditional Java code.

More on lambdas:

http://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html

More on streams:

http://docs.oracle.com/javase/tutorial/collections/streams/index.html

More on method references:

http://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html

Thanks to Ralph Ruijs from the NetBeans Java Editor team for providing this entire sequence, plus a few others, today. A full step by step YouTube movie, with audio explanations of all the code, will follow soon.

Tuesday Jan 14, 2014

Three Tips for Moving from Eclipse to NetBeans IDE

Today was Martijn 'Wicket' Dashorst's impressive first day with NetBeans IDE 8 (a development build, by the way, which makes it even more impressive). In his article, describing a typically complex enterprise project, he writes:

"An IDE I have never worked with for more than a couple of hours beat an IDE I have lived in 10 hours a day, 5 days a week for the past 10 years with setting up this beast of a project."

So, here are three tips for Martijn (to the extent that he's not aware of these) and everyone else following Martijn's path.

  1. Use Maven. Migrating from one IDE to another goes most smoothly if you use Maven since all IDEs understand Maven in one way or another. In the case of NetBeans IDE, you'll not get IDE-specific proprietary files thrown into your source structure because NetBeans IDE treats the POM as your project file. The other awesome thing about Maven in NetBeans IDE is that it simply works out of the box and that every release of NetBeans IDE comes out with new enhancements and performance improvements for Maven.

  2. Keyboard Shortcuts. No need to learn new keyboard shortcuts. Go to Tools | Options and then use the Keymap tab to switch to the Eclipse profile. (IntelliJ IDEA profile and Emacs profile are there too.) If anything is missing in the Eclipse profile, let us know, we'd love to support Eclipse refugees even better than we already do.

  3. Formatting. Eclipse has heaps of formatting rules, which you can continue using in NetBeans IDE. Export your Eclipse formatting file and then import it into NetBeans IDE, via the Eclipse Formatter plugin in Tools | Plugins, as well as here in the Plugin Portal

Are there other Eclipse refugees out there who have other tips to share for making your new home in NetBeans IDE? Leave comments here or blog about them yourself!

Monday Jan 13, 2014

Phaser and NetBeans IDE (Part 3)

In part 1 and part 2 I introduced Phaser a bit. Let's now set up our project so that Phaser objects such as "Sprite" can be seen in code completion, as shown below:

What you need to do is clone the Phaser sources into your project's "www/js/libs" folder. Then wait a bit for background scanning to complete, which is when the parsing is set up.

And then you can use code completion, as shown in the screenshot above (click to enlarge it). Another approach is to create a symlink to your project from the cloned Phaser sources. Yet another approach is to use a PHP project, instead of an HTML5 project, since the PHP project has an include path setting in the Project Properties dialog, where external sources can be included for editor purposes, where the "phaser/src" folder can be registered. 

The approach of using the Phaser sources actually conforms to the standard way of developing applications with Phaser, as stated here: "You should include phaser.min.js in your html when you deploy the final, finished version of your game. Until that point you should use phaser.js (the non-minified version) as you'll get accurate debugging / line numbers from it should something die internally." (See here.)

Sunday Jan 12, 2014

Life Sciences Platform on the NetBeans Platform

GenBeans is a tool for DNA sequence analysis created in San Diego, California, for molecular biologists. Research scientists working with DNA molecules face the dilemma of manipulating DNA sequences, often represented as simple text strings, and integrating vast amounts of sequence-dependent features at the same time. For genome-wide analysis, both are rather unchangeable static entities that can be easily represented together.

On the other hand, sequence editing is complicated by an ever-changing set of features, some wanted, some desirable, some not. Design errors may translate in months of work. A fascinating aspect, from that point of view, of NetBeans IDE is its language support with its automatic annotation as you type and rich set of meta-information because DNA sequence is comparable to a language where features and motifs are the words, it is interesting to approach DNA sequence editing & analysis in the same way NetBeans IDE handles programming languages. 

In the first screenshot, you see GenBeans during the analysis of a primer (short sequence used to amplify or sequence DNA), while the second screenshot shows some restriction enzyme analyzes.

Later, a second intermediate application named BioBeans became necessary to bring together all biology-related modules and offer a branching point for people interested in deriving works under an open-source license. Below you see a composition showing multiple BioJava demos at the same time, including sequencing trace, BLAST result (sequence homology search in sequence database) and sequence alignment in the output.

Therefore, GenBeans is a close-source suite build on top of BioBeans. Beneath BioBeans is StarBeans, which serves as a foundation for the BioBeans and GenBeans projects. StarBeans offers a standard look and feel, a project-free file management system, file editing using the NetBeans editor, and an embedded web browsing based on DJ Native Swing. StarBeans is written in Java and is fully open source.

StarBeans accumulates around 200 valid downloads per months, both sources and binaries, while BioBeans and GenBeans are newer and have smaller set of users, probably less than 100.

Future developments will be focusing on automatic annotation and annotation through varied web-based services to query public databases, and on polishing of the BioBeans layer (mainly basic DataObject for the multitude of sequence data formats). Also JavaFX is likely to make its appearance, surely to replace the current implementation of the embedded browser. The incoming release will be based on NetBeans Platform 7.4 and will concentrate on stability and usability.

The plan is to make an official release of BioBeans on the BioJava mailing list. Potential users are basically the entire community of Java programmers in life sciences. There are several open source platforms out there. Ugene is a sophisticated sequence editor (http://genome.unipro.ru) written in C++, while Bioclipse (http://www.bioclipse.net/) is an ambitious project based on Eclipse, more oriented toward drug development and chemistry. So, the ambition for BioBeans is very relative at this time but if a few small projects were to integrate with the BioBeans platform, that would be already a success.

Saturday Jan 11, 2014

YouTube: XML Encoding on the NetBeans Platform

The XMLEncoder class is a complementary alternative to the ObjectOutputStream and can used to generate a textual representation of a JavaBean in the same way that the ObjectOutputStream can be used to create binary representation of Serializable objects.

I know the above because I read (and copied it from) the related javadoc, for java.beans.XMLEncoder. The NetBeans Platform has a cool solution built on top of XMLEncoder/Decoder, via the @ConvertAsJavaBean annotation.

I blogged about this, some time ago, with example code, here.

Today I made a small sample that puts together several standard NetBeans Platform pieces, with the result viewable in this (silent, i.e., intentionally no voice, so please don't leave comments about no audio, etc) new YouTube clip:

The source code of the above is here:

https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.4/misc/Diary

About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« January 2014 »
SunMonTueWedThuFriSat
   
26
 
       
Today