Archive for the 'Naked Objects' Category

Submitting patches

Patches for bug fixes, improvements and extension are welcomed and sought by the Naked Objects development team. The process is simple: get the latest code; make your changes; create a patch file; and email it to us. As most development is done within the Eclipse IDE that is the best place to create the patches, although patches created in other ways (as long as they following the standard structure) are fine too. We will look at using both Eclipse and Subversion here.

Getting the latest code

It is important that you make changes against the latest version of the development code so that it easier merge. Code that is easier to merge gets incorporated more quickly.

The latest version of the source can be checked out of the Subversion repository using the following command:

 Read more »

Blog by .MOz – NOF in NetBeans

I’ve just come across a post that shows how to use Naked Objects with NetBeans – see How to create a simple Naked Objects Application in NetBeans.  This is great as I and the other developers happen to use Eclipse we don’t tend to talk much about the other tools that are around; we just don’t have any experience with them. So if you are using NetBeans then I encourage you to check out this post and find out how to do it. As one of the comment says, it is possible to use Maven to set up NetBeans for you so hopefully there will a new posting about that soon.

If you are using Naked Objects with other development tools, or using it in ways that are not talked about then please write about it, or contact me at rmatthews at nakedobjects dot org  and I’ll create a posting for you.  If you do write something, or mention Naked Objects elsewhere, then please let me know so I can add a link to it. Thanks.

Using the Eclipse templates

The latest release of Naked Objects (version 4) provides a set of templates for quickly adding snippets to your domain classes, from properties and collections to title and dependencies.

To set up Eclipse so these are available you need to import the template files that are included in the distribution. In both the Ant and Maven based distributions they can be found the following directory:

resources
|-- ide
|   `-- eclipse
|       |-- launch
|       `-- templates
|           |-- jmock2-templates.xml
|           |-- junit4-templates.xml
|           `-- nakedobjects-templates.xml

Open up Eclipse’s preferences dialog (Windows/Preferences) and navigate to JavaEditorTemplate. Click the Import button, browse to the templates directory, select the nakedobjects-templates.xml file and press OK. A series of templates will be added prefixed with no such as noa, nolnop etc. Press OK to commit the changes and you are ready to use them.

For example, to insert a property type nop in the editor window within the class declations and press ctrl-space to bring up the available templates.

List of all available templates

Read more »

Getting started with the Maven archetype

Creating new Java projects from scratch can be a bit tortuous as you have to
provide the right component, some initial code and some way of building
it. Using Maven these problems can all be resolved so that starting a new
project is exceptionally easy process. Specifically it will create a new
set of directories and files, add in the build definitions and ensure all
the dependent resources are available. This is the work of the Maven
Archetype plugin.

Naked Objects uses the feature of Maven to create new Naked Object
application in a couple of commands. What I am going to describe now is
the same as for other Maven archetype, the only additional task is to
specify where the archetype is to be found. We maintain that catalog on
our website so to build a application from scratch type in the following
(assuming that you have Maven 2.1 or 2.2 installed, see
http://maven.apache.org/download.html).

$ mvn archetype:generate -DarchetypeCatalog=http://nakedobjects.org

You will then be prompted with a list of archetypes (at time of
writing there is only one).

Read more »

Next Page »