Archive for the 'News' Category

Aranea-MVC 1.1.3

Wednesday, May 21st, 2008

After a month of development, the new release is ready. Most of the effort was devoted to improvement, and here is a quick overview of major changes:

  • lists have built-in support for PostgreSQL – PostgreListSqlHelper;

  • lists have built-in support to filter rows requiring the value to start or end with the user-provided value;

  • new tags for a list row check box (<ui:listRowCheckBox/>, <ui:listSelectAllCheckBox/>) and a list row radio button (<ui:listRowRadioButton/>);

  • a bug was fixed that caused Aranea MVC to not work with the Safari browser.

(more…)

Aranea-MVC 1.1.2

Wednesday, April 16th, 2008

First of all, starting from this new release I, Martti Tamm, will be taking over the development process at Aranea. Taimo still provides some support for specific cases during this spring, but mostly he is in exile :P . Shortly about me, I’ve been using Aranea for about two years now, and I try to bring some new energy to the project. In addition, to make you feel comfortable, I have a certificate to prove that at least I know how to write code in Java 1.4…

This release of Aranea MVC 1.1.2 contains some bugfixes related to visual behaviour of modal popup, calendar box, and optimized ajax performance. As it contains only fixes without major code changes, it’s worth to upgrade!

As usual, if you are having any problems or ideas, please report them or share them in the forum so we can improve Aranea to be stable and easier to use.

Aranea-MVC 1.1.1

Wednesday, March 19th, 2008

For the wonderers—yes 1.1 final had rather a silent release in February and now is the time for nicely symmetrical minor version update that fixes a little bug and updates documentation that concerns Aranea javascript.

We’d also like to thank all people who have reported issues and keep our forums lively. We couldn’t have done it so far without you :)

First milestone of 1.2 branch which implements state versioning (and thus back-button support) is due within few days.

Letting end-user confirm destructive actions

Thursday, February 21st, 2008

Aranea 1.1 standard component chain enriches Environment with a context called ConfirmationContext. This can be used for executing some code conditionally, depending on user actions. Context interface is simple and consists of following methods:

public interface ConfirmationContext {
  void confirm(Closure onConfirmClosure, String message);
  String getConfirmationMessage();
}

When confirmation is registered (with confirm() method), rendering mechanism will present end-user with the browser standard message box and ask for confirmation of requested action. Depending on users choice, action encapsulated in onConfirmClosure either will get executed or not.

Combined with TransitionHandler, confirmation could be asked whenever the user performs navigation that would make active flow unreachable and flow contains data that has not yet been saved.

getFlowCtx().setTransitionHandler(
  new CancelConfirmingTransitionHandler(
     new ShouldConfirmOnUnsavedData(),
     "Some data not saved yet. Continue anyway?"
  )
);

Here CancelConfirmingTransitionHandler registers the confirmation whenever FlowContext.cancel() is called from active flow and Predicate ShouldConfirmOnUnsavedData evaluates to true. Only after user confirms the navigation event will flow transition actually be performed.

ConfirmationContext and TransitionHandlers together are a reliable and convenient way of preventing end-users shooting themselves in the foot :) .

Aranea-MVC 1.1-RC1

Thursday, February 7th, 2008

And … the 1.1-RC1 is here sooner than expected :) Mainly this is due to pushing back-button support into the 1.2 release cycle. It will still be done very soon (within this February). This release contains fixes for bugs which were reported since last milestone and documentation updates.

Enjoy!

Aranea-MVC 1.1-M6

Thursday, January 31st, 2008

Latest release is now very near to release candidate stage. Only major thing that we still want to add into the 1.1 branch is mechanism for supporting browser back button :)

See the change log & download the release. And let us know of anything that needs to be improved ;)

Number guess game with continuations

Saturday, November 17th, 2007

We found a nice illustration of using continuations among RIFE examples and wrote the Number guess game also using Aranea Continuations (for the introduction read Aranea and Swing get Continuations).

The following game chooses a random integer between 0 and 100 and lets the user to guess it. Each time a hint is given whether the right answer is higher or lower than the entered:

class NumberGuessingGameExample extends JPanel {

	private static final int MIN = 0;
	private static final int MAX = 100;

	@Resumable
	void init() {
		setLayout(new BorderLayout());

		JLabel label = new JLabel("Guess a number from " + MIN + " to " + MAX);
		JTextField field = new JTextField();
		field.setHorizontalAlignment(JTextField.CENTER);
		JButton button = new JButton("Guess");

		add(label, BorderLayout.NORTH);
		add(field, BorderLayout.CENTER);
		add(button, BorderLayout.SOUTH);
		updateUI();

		int answer = MIN + (int) (Math.random() * (MAX - MIN + 1));
		int guesses = 0;
		int guess = -1;

		while (guess != answer) {
			SwingBlockingUtil.waitForOneAction(button);

			try {
				guess = Integer.parseInt(field.getText());
			} catch (NumberFormatException e) {
				continue;	// ignore
			}

			if (guess &lt; MIN || guess &gt; MAX) {
				continue;	// ignore
			}

			field.setText("");

			if (answer &lt; guess) label.setText("The answer is lower than " + guess);
			if (answer &gt; guess) label.setText("The answer is higher than " + guess);

			guesses++;
		}

		System.out.println("You found the answer " + answer + " by " + guesses + " guesses");
	}

	public static void main(String[] args) {
		NumberGuessingGameExample panel = new NumberGuessingGameExample();
		JFrame frame = new JFrame();
		frame.add(panel);
		panel.init();
	}

}

Notice that the program consists of one main loop which takes a user input, processes it and gives a response. This is like reading standard input. To do the same in Swing, usually one is forced to register an ActionListener and the program flow jumps to that – different method when an action occurs.

Here waitForOneAction() blocks the program flow until the button receives an action (like java.io.Reader.read()).

Under the hood still an ActionListener is used. When waitForOneAction() is invoked a snapshot is taken from the program exceution and when ActionListener.actionPerformed() is reached this snapshot is used to resume the program.

The whole source code can be accessed at:
http://svn.araneaframework.org/repos/aranea-continuations/

JavaRebel Brings Class Reloading to Java

Monday, October 8th, 2007

Finally we are ready to unveil what Aranea team has been so busy on. As time went by we realized that one of the main problems impeding developer productivity was lack of class reloading facilities in Java Virtual Machine. We have been working on this for almost a year and today we can show the results.

JavaRebel reloads changes to Java classes on-the-fly without redeploy or restart including new methods and fields. It is a generic solution that works for standalone Java applications as well as application servers.

Watch the demonstration screencast (~5 mins), read the feature list or just download JavaRebel from ZeroTurnaround.com and give it a try. Disclaimer: JavaRebel is commercial software with a free trial for 14 days and developer seat cost at 99$.

ZeroTurnaround is a spinoff of Webmedia, Ltd. that focuses on Java developer productivity tools. Currently we are developing JavaRebel, a generic Java class reloader, and JSP Weaver, an instant JSP interpreter.

Aranea-MVC 1.1-M4

Monday, October 1st, 2007

We had somewhat longer gap between releases of M3 and M4 than usual, due to team taking vacation in July and being temporarily involved in three different projects as of late. But now for some highlights of 1.1-M4:

Also, there’s support for context menus in browsers, new control that is hybrid of text and select controls, plus for everyones coding pleasure FormWidget.addElement* and FilterHelper.* methods do not throw checked Exceptions anymore. See full changelog here.

Separate 1.1 demo application is also up. Obviously demos contain more explanations and stuff than mentioned here, so take a look! For everyone who has not yet noticed—already since early 1.0 days there are Widget source and Template source links in our demos (they are not easily spotted sometimes, look at the bottom left corner next to side menu :) ).

NB! It was not mentioned in changelog that comes with distro, but StandardFlowContainerWidget (standard implementation of FlowContext) was modified in a way that is incompatible with some older uses. Namely, when call stack is empty and parent FlowContext exists, StandardFlowContainerWidget.finish() and cancel() methods return control to parent FlowContext (meaning that once active StandardFlowContainerWidget is gone for good). In cases (mainly in menus) where this is unwanted, one must take care and call StandardFlowContainerWidget.setFinishable(false).

Aranea-MVC 1.0.11

Friday, August 31st, 2007

1.0.11 fixes issue with FormWidget.restoreBaseState(). There is some more though, details here.