This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

Posts tagged: JVx

Die Vorteile von Oracle Forms und Java vereint

Wer schon immer mal wissen wollte wie man den Spagath zwischen Oracle Forms und Java hin bekommt, dem sei der Artikel 'Schnell entwickeln - die Vorteile von Forms und Java vereint' wärmstens empfohlen. Der Artikel wurde im Magazin JAVAaktuell, Ausgabe 04-2014, veröffentlicht.

Anhand der Oracle Forms Summit Application wird dargestellt wie eine Umsetzung mit Java möglich wäre. Es wird auch gezeigt wie Java in Forms eingebettet werden kann und wie die Java Applikation als HTML5 Lösung aussieht.


Das wichtigste ist jedoch das man Oracle Forms nicht von heute auf morgen ablösen muss, sondern eine sanfte Migration durchführen kann.

Der Artikel ist sowohl für Oracle Forms Entwickler als auch für Java Entwickler die mit Oracle in Berührung kommen interessant.

Wer das Magazin nicht zur Hand hat, kann den Artikel auch von hier laden und sofort lesen.

VisionX Feature - Export a desktop application

At the end of the "new features" week, we'll introduce another great VisionX feature. It's the export of an application as desktop application.

What does desktop application mean?

VisionX usually creates 3-tier database applications. The GUI is separated from the business logic and decoupled from the database. The GUI usually runs on client machines, the business logic on application servers and the database could be on the same machine as the application server or could be a different server machine in your network. If you use our HTML5 launcher, the GUI and business logic will run on the application server. This means that the application seams to be 2-tier (Client/Server), but no worries the applications are always 3-tier.

A desktop application should/could work without an application server because it's overhead for some use-cases. This means that the desktop application contains the GUI and the business logic. It directly uses/connects to the database and you could say that such an application is a 2-tier Client/Server application. A desktop application needs manuall "installation" and manual updates. If you have small departments and/or don't have a lot of infrastructure/servers, a desktop application might fit perfectly.

VisionX?

All applications, created with VisionX, have an ant build file that makes it possible to create war files and do deployments. It's an easy task, for developers, to create a desktop application from the created files. It's enough to define the classpath that contains all libraries, use the right main class and add important start parameters. The steps are the same as for any other Java application.

But our applications have some additional features like an application help. This help can be created with VisionX and it's an online help based on vaadin. The integration of an online help into a desktop application makes the task a little bit tricky.

VisionX does all necessary steps for you and your desktop application will be ready after some seconds. The application is packed into a zip archive that contains an executable jar file (start via double click), a bat file for windows, a sh script for linux/mac and an exe file for windows. The installation is very easy because every modern OS is able to extract zip archives without additional tools.

New JVx feature - Focus index

The next great feature of JVx is the customizable focus order.

The focus order defines the navigation between components via Tabulator or Enter. If you press Tab in an Editor with index 1, the focus will jump to the component (e.g. an Editor) with the next higher index. If you didn't define an index, the default focus order of Java will be used.

We introduced

setTabIndex(Integer)

in IComponent. This makes it possible to easily configure the focus order. We also have support for this new feature in VisionX. It's really helpful:

Set focus order

Set focus order

The designer shows the focus index and it's possible to set the index via customizer.

New application frame feature - No menu

All our applications have a menu and a toolbar. This is great for backend applications but not always good for web frontends. Our web UIs have a different menubar, styled for web, but it's always visible. If you have simple web forms, you won't use a menu. We did some changes and have new options for applications without menu and toolbar :)

Some impressions with standard (backend) Desktop application and as (frontend) web application:

Backend application (Swing)

Backend application

 
Frontend application (Vaadin)

Frontend application

It's very simple to hide the menu. Simply set an application property via application.xml or directly via launcher - that's it. We changed our web menu and allow access to internal panels and components. It will be possible to hide buttons, change layouts, etc.

It's still possible to create your own, custom, application frame or extend our pre-defined frame. The new feature will be available in the next VisionX update.

Vaadin UI application frame and windows

Our custom Vaadin application frame isn't a MDI. It's "web SDI" . We didn't show popup windows aka internal frames with work-screen content. We did embedd the content directly into the web page. But we changed the default implementation a little bit because it makes sense to show popup windows for modal work-screens. Modal frames are important for database applications. Such frames could be used for showing record details, for creating new records, ...

So it makes sense that our application frame supports such specific work-screens. And the good news is that we've support for this.

It could look like following screenshot:

Modal frame

Modal frame


It's a screenshot from one of our test applications. The feature isn't generally available yet, but it will be part of the next VisionX release.

Master Thesis - JVx Mobile und iOS

Die Master Thesis von Stefan Fessler steht nun öffentlich zur Verfügung. Das Thema war

Design und Implementierung einer Multi-Touch optimierten iOS App für das JVx ERP Applikation Framework

Im Zuge seiner Arbeit wurde der iOS Client für JVx entwickelt. Das Projekt steht unter der Apache Lizenz 2.0 zur Verfügung.

Die Arbeit ist zugleich eine gute Dokumentation und erklärt Designentscheidungen sowie deren Umsetzung.

JVx' VaadinUI and Liferay "self-contained" packages

If you are Liferay User and Vaadin Portlet developer, you know that Liferay has Vaadin bundled. If you develop a Vaadin portlet, you should use the bundled Vaadin version, otherwise it'll be a problem after a deployment.

We solved the problem in JVx' VaadinUI by extending Vaadin. Our implementation allows different Vaadin versions independent of Liferay. Some days ago, Matti Tahvonen posted an article about Using "self-contained" approach to package Vaadin portlets. This is an interesting article because it's exactly what we tried to do :) and we thought that Vaadin developers have a better solution for the problem!

And of course, their solution is better than ours :) But we are like copy cats and we changed our solution because it reduced code and made it easier for us to maintain our codebase. Our idea was not far away from the recommended solution, but we did too much.

To find out what Vaadin did in their archetype, we followed their posted instructions. We found two steps that could be ignored. The first step was the creation of a custom maven profile because it was possible to add all properties to the pom.xml of the project. The second step was the configuration of the profile in Eclipse. Not needed if properties were added to pom.xml.

And after creating the project, we had the recommended solution and it was absoutely trivial. Simply extend VaadinPortlet, extend VaadinPortletService and override getStaticFileLocation. The created source code:

public class CustomVaadinPortlet extends VaadinPortlet {

private static final long serialVersionUID = -13615405654173335L;

private class CustomVaadinPortletService extends VaadinPortletService {

    /**
     *
     */

    private static final long serialVersionUID = -6282242585931296999L;

    public CustomVaadinPortletService(final VaadinPortlet portlet,
            final DeploymentConfiguration config) throws ServiceException {
        super(portlet, config);
    }
   
    /**
     * This method is used to determine the uri for Vaadin resources like theme
     * or widgetset. It's overriden to point to this web application context,
     * instead of ROOT context
     */

    @Override
    public String getStaticFileLocation(final VaadinRequest request) {
        return request.getContextPath();
    }

}

@Override
protected VaadinPortletService createPortletService(
        final DeploymentConfiguration deploymentConfiguration)
        throws ServiceException {
    final CustomVaadinPortletService customVaadinPortletService = new CustomVaadinPortletService(
            this, deploymentConfiguration);
    customVaadinPortletService.init();
    return customVaadinPortletService;
}

}

To be honest... our solution contained a little bit more code but it worked. We've used our new knowledge to improve our solution, because it should be possible to use "self-contained" and "shared" approach without additional source code. We introduced a context parameter to switch between modes. Vaadin could do the same, but currently it's not implemented.

Our new solution is as simple as the original Vaadin source code and the most important thing is that it works with our ant build.

Twitter Storage in action

We re-activated our Twitter storage for Packung! 2014. The old implementation was based on twitter4j 2.1.7 and since Twitter API changes, our implementation stopped to work. After a library update to twitter4j 4.0.1 and some smaller changes, everything is fine again.

The storage in action:

Twitter Storage implementation

Twitter Storage implementation

The storage extends the standard AbstractMemStorage of JVx.

JVx 2.0.2

We've released JVx 2.0.2 last friday and you should know that it's available :)

It's a smaller update with bugfixes and some improvements. One new feature is the support for an additional row in the databook. We use this row for searching records.

Other interesting features, from the changelog, are

  • added listener to IConnection for notifications about property changes
  • DBAccess isModified introduced
  • register value changed of single column
  • register key event listener for certain key
  • DataBookBuilder introduced
  • ICloseable introduced
  • Set ORDER BY as property of DBStorage
  • new selection modes: CURRENT_ROW_DESELECTED, CURRENT_ROW_SETFILTER
    CURRENT_ROW_DESELECTED_SETFILTER
  • CommonUtil.close introduced

Have fun ;-)

JVx swing UI / VisionX Button with popup menu

We didn't have support for Buttons with popup menus in JVx because standard Swing doesn't support this feature out-of-the box. But such a component would be very useful for some UIs.

We didn't change our UI definition but we started with support in Swing. Our JVxButton now has support for showing a popup menu. It could be like this one:

DropDown

DropDown

We've added some buttons to VisionX, because it reduces the amount of buttons :)

VisionX with new buttons

VisionX with new buttons

It's easy to use the new feature in your Swing application and also in your JVx application (for Swing UIs):

UIPopupMenu pmDocumentation = new UIPopupMenu();
pmDocumentation.setTranslation(getLauncher().getTranslation());
       
pmDocumentation.add(miHelp);
pmDocumentation.add(miSpecification);
       
((JVxButton)butDocumentation.getResource()).setPopupMenu((JPopupMenu)pmDocumentation.getResource());
       
//because we add the resource
pmDocumentation.addNotify();

There are some things to know:

  • Set the translation because the resource is added and the UIPopupMenu doesn't have a parent.
  • Call addNotify to enable translation (same problem because of missing parent)
  • You should check if the resource of the button is an instance of JVxButton to be UI technology independent

If you work with above code, you'll have all JVx features like simple event handling or translation.