Archive for the 'News' Category

Aranea-MVC 1.1.6

Friday, July 25th, 2008

Hello everybody!

We have a small announcement that Aranea 1.1.6 is out to fix some critical errors (without adding any new features). Everybody is encouraged to make this small upgrade towards better application quality.

Of course, in case of finding a bug, feel free to let us know by writing to our issue tracker, or use our forum to get some support. All the information is more than welcome!

Cheers!

Aranea-MVC 1.1.5

Friday, June 27th, 2008

All known important bugs are fixed in Aranea 1.1.5 and we encourage you to upgrade. In addition, our ivy repository and dependence management has been improved for you to use. Try it out!

Enjoy the summer! ;)

Aranea-MVC 1.1.4

Monday, June 16th, 2008

Aranea 1.1.4 is now available! It includes some small-scale new features and some fixes to improve the quality.

Note that it is planned as the last feature release for 1.1 branch. If there are some bugs reported then a bugfix-only release of Aranea 1.1 shall follow, otherwise not. New features will be planned to 1.2.

Notable new possibilities include IN-style filtering (a field value must be one of user-selected values) in lists, and inserting event links to messages.Next, we are working on the next 1.2 release that should provide a solution for the browser back-button. We also plan to provide some milestones so you can try, whether you might have problems with it.

(more…)

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:

JAVA:
  1. public interface ConfirmationContext {
  2.   void confirm(Closure onConfirmClosure, String message);
  3.   String getConfirmationMessage();
  4. }

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.

JAVA:
  1. getFlowCtx().setTransitionHandler(
  2.   new CancelConfirmingTransitionHandler(
  3.      new ShouldConfirmOnUnsavedData(),
  4.      "Some data not saved yet. Continue anyway?"
  5.   )
  6. );

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:


CODE:
  1. class NumberGuessingGameExample extends JPanel {
  2.  
  3.     private static final int MIN = 0;
  4.     private static final int MAX = 100;
  5.  
  6.     @Resumable
  7.     void init() {
  8.         setLayout(new BorderLayout());
  9.  
  10.         JLabel label = new JLabel("Guess a number from " + MIN + " to " + MAX);
  11.         JTextField field = new JTextField();
  12.         field.setHorizontalAlignment(JTextField.CENTER);
  13.         JButton button = new JButton("Guess");
  14.  
  15.         add(label, BorderLayout.NORTH);
  16.         add(field, BorderLayout.CENTER);
  17.         add(button, BorderLayout.SOUTH);
  18.         updateUI();
  19.  
  20.         int answer = MIN + (int) (Math.random() * (MAX - MIN + 1));
  21.         int guesses = 0;
  22.         int guess = -1;
  23.  
  24.         while (guess != answer) {
  25.             SwingBlockingUtil.waitForOneAction(button);
  26.  
  27.             try {
  28.                 guess = Integer.parseInt(field.getText());
  29.             } catch (NumberFormatException e) {
  30.                 continue;   // ignore
  31.             }
  32.  
  33.             if (guess &lt;MIN || guess&gt; MAX) {
  34.                 continue;   // ignore
  35.             }
  36.  
  37.             field.setText("");
  38.  
  39.             if (answer &lt;guess) label.setText("The answer is lower than " + guess);
  40.             if (answer&gt; guess) label.setText("The answer is higher than " + guess);
  41.  
  42.             guesses++;
  43.         }
  44.  
  45.         System.out.println("You found the answer " + answer + " by " + guesses + " guesses");
  46.     }
  47.  
  48.     public static void main(String[] args) {
  49.         NumberGuessingGameExample panel = new NumberGuessingGameExample();
  50.         JFrame frame = new JFrame();
  51.         frame.add(panel);
  52.         panel.init();
  53.     }
  54.  
  55. }

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/