Saturday, April 3, 2010

A faster start for your Naked Objects app

After discovering how to generate a Naked Object application in NetBeans with Maven I played with my freshly created project a little, as the way I suggested to start the application seemed to me quite slow.

After some investigation I managed to start the application in almost the same way I used to start the application built with Ant. Actually it's quite easy, once you get used to it. All you have to do is set the Run properties as follows:


The tricky part is that you have to set them for the Command Line project and not for the main one...

At this point, if you want to have an even faster start (by which I mean an easier one) you can set the Command Line project as main and then just press the F6 key.

7 comments:

Dan said...

If I recall correctly, exploration is the default (deployment) type, and dnd is the default viewer. So you can probably leave these out.

To run the app as a webapp, try --viewer html. And to run with a real user id, use --type prototype.

Cheers
Dan

Unknown said...

When one of the major contributors of the Naked Objects framework says "If I recall correctly" you can easily bet he's more than right... Anyway, this is the place where you can customize the startup parameters pointed out by Dan, as well as all the other ones.

Unknown said...

Looks like I made a blue, the default deployment type is prototype :-/ well, not so grave a sin, is it?

Dan said...

Hey Moz,
sorry I got that wrong about the defaults. I was being lazy and didn't bother to check the defaults.

Dan

geertjan said...

It would be great to be able to republish these Naked Objects / NetBeans articles at netbeans.dzone.com. Please contact me at geertjan dot wielenga at sun dot com about this!

Unknown said...

@Dan as long as you release NO 4.1 with native support for enums you can give us all defaults completely wrong :-)

jaspm2004 said...

hi to everyone, im new to NO and i find this post very helpfull to use NO with NetBeans, because i prefer rather than Eclipse.

I'm waiting the post talking about "...the support for persistence..."

Cheers,
JASPM