PlatformX

PlatformX: the NetBeans Extended Platform Project

What is PlatformX? A lot of people build applications with the NetBeans RCP/Platform. There should be a place where the general-purpose things people write can go live and be of benefit to others. A peer-maintained repository of useful NetBeans modules that, while not necessarily useful in an IDE, are very useful in an RCP application. This is PlatformX.

[[{TableOfContentsTitle=AboutPlatformX} | {TableOfContents title='About PlatformX}]]

What Belongs Here?

There is already the contrib project for IDE modules/plugins; PlatformX is for modules which RCP developers can use in their applications as an API, SPI, or something similar; an extension.

PlatformX has an incubation area for new modules/technologies; see the incubation folder in the repository. Things that are not in the incubation area must be in use (or soon to be) in at least one RCP application; they should have unit tests and have been through a NetBeans (or equivalent) API review and conform to the API design standards that other NetBeans modules conform to.

In some cases PlatformX, the extended platform, will incubate replacement or wrapper APIs for things in NetBeans but the API is either old and poorly designed or overly difficult to work with.

How do things go from here to the Platform-proper?

They don't necessarily. The goal here is to create useful things that many people need and maintain them collaboratively. That shouldn't involve a dependency on the people directly building the NetBeans Platform. This is an independent effort; this is the NB RCP communities effort. Of course it would be nice if PlatformX becomes adopted that broadly, but our primary goal here is to solve our own problems, not force a solution on the rest of the world.

Where is it?

The repository is hosted on hg.netbeans.org. The repository address is http://hg.netbeans.org/platformx. The home page is located at http://platformx.netbeans.org. It links to the Wiki. Editing the Wiki for most things is easier and much quicker, so most things documentation wise really need to go here.

Some screen shots, example applications, and similar information will hopefully be shown off on the main page, but again, most information probably makes sense to keep here on the Wiki. It is easily searched and can be edited quickly by multiple contributors.

How to Get and Build PlatformX

For starters. Get the code:

hg clone https://hg.netbeans.org/platformx

Then it is good to read README.txt from the repository. It has some other information than is listed in this section most likely.

Notice in the main checkout folder there is also a build.xml, so the -f option below could be skipped as the top level build.xml simply imports platformx_build/build.xml and sets the Ant basedir to platformx_build.

Notice platformx_build in the file path. This is the build directory; it contains what is known as a NetBeans free-form project. It is used to build different things, but essentially it is a regular Ant project with some tie ins to the IDE. This is what a free-form project is in NetBeans lingo.

Below it there is a NetBeans suite project named platformx. This suite project is used to build a base NetBeans Platform. This platform is then extracted, and the platformx libraries suites are added to it as clusters (look for the suite.apiname projects under platformx sources). Clusters become extensions to the platform, and their modules show up in the library manager of projects linking the platform in which they reside.

This platform built from platformx and the platform you link to in your build.properties file nbplatform.default.* properties (specifically nbplatform.default.netbeans.dest.dir and nbplatform.default.harness.dir) can be used as a custom platform you can use within your projects, or you can extract the platformx clusters and use them in your own custom platform. You can do this with Ant or what ever you use.

This built platform from the platformx suite project will wind up in platformx_build/dist/platx.zip. Along with building a platform, there is a target to build JavaDocs for platformx. See below. The JavaDocs will wind up in platformx_build/dist/platformx-javadoc.zip. These are usable binary artifacts.

Soon we will have this built on a continuous integration server which allows binary artifacts to be downloaded and used immediately without the need to build yourself.

To build (6.5 is your version of NB; maybe you have 6.1, 7.0, or later):

Windows:

ant -f platformx_build\build.xml -Duser.properties.file="%userprofile%\.netbeans\6.5\build.properties"

Linux/Unix:

ant -f platformx_build\build.xml -Duser.properties.file=$HOME/.netbeans/6.5/build.properties

and the JavaDocs:

Windows

ant -f platformx_build\build.xml -Duser.properties.file="%userprofile%\.netbeans\6.5\build.properties" javadoc

Linux/Unix:

ant -f platformx_build\build.xml -Duser.properties.file=$HOME/.netbeans/6.5/build.properties javadoc

There are other targets which come in handy. Some good ones to remember

  • build - Builds PlatformX and creates the .zip archive under the dist folder.
  • javadoc - Builds the javadocs for PlatformX and creates a .zip archive of them under the dist folder.
  • build-nozip - Builds PlatformX and creates a platformx folder under dist, but does not create a .zip archive (faster)
  • javadoc-nozip - Builds the javadocs for PlatformX and creates a javadocs folder under dist, but does not create a .zip archive of them (faster)
  • test - Runs tests in the PlatformX modules. This assumes that any tests you will run will already be on your platforms classpath. PlatformX uses JUnit, but may at times use other libraries depending on the contributor. Certainly more testing needs to be added for some of the code there now.

There is other work which needs to go into the build scripts for continuous integration. We'll have this done soon. Too, when NB 7.0 is released some of this should really be reworked. For everything the build scripts are doing, grab the code, and then examine platformx_build/build.xml and platformx_build/platformx/build.xml. Notice the linked in properties files including your NB build.properties file from above. All these things can give you hints to incorporating PlatformX into your projects.

What's Next

There are already modules here for use. We need more and we need to grow this shared NB RCP community library. Along with growing the code base, we need to create more documentation and some tutorials using these APIs. These things do not have to necessarily reside in the Wiki, and in fact we discourage information duplication as long as the server the information resides is publicly accessible, and will be available for a long period of time, or at least is expected to be. In cases something must be shutdown please copy your documents to the Wiki and relink them; this helps with continuity.

The hope is this effort keeps growing. As we work on code we add what we are able to this shared area. The more we get the more utilities we have, and that translates into saved time and resources for all involved. This is why it is important to follow some guidelines and procedures and to write tests. We hope for as much stability as we can get.

More information will be added later.

Contributing

We encourage all NB RCP developers to contribute to this project. The more we work together the more we can achieve in a smaller amount of time. That translates into money for your projects and everyone involved. It also translates into less time we are pulling our hair and more time we have for things outside work. Really, working together is better than working alone.

So, how to get started:

  • For starters, get the code, and check it out.
  • Look at the Brain Storming section and see if you can think of some things you have done lately or need.
  • Join dev@platformx.netbeans.org or users@platformx.netbeans.org; dev is where folks working on sources should be communicating.
  • Submit some patches.
  • Contribute some modules/code.
  • Patches and code contributions (modules/clusters/suites etc) are how to gain write/push access to hg.netbeans.org/platformx. If you have been contributing to any of the NetBeans branches you can get access now.
  • Work with the community to help yourself and others. This can be helping with the mailing lists, writing tutorials for the Wiki, or anything else that helps others within the community.
  • Blog and write about what we're doing together. People need to know about us so they can join in.

Brain Storming

These are things that the extended platform should consider providing according to others. See the Brain Storming section for more details.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo