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

JVx 1.2 almost finished

The current version of JVx is 1.1 and it was released in January. It's still one of the best releases, but it's time for an update :)

We had about 90 tickets and a lot of smaller changes on the roadmap for 1.2. ALL functional tickets were implemented. There are still 5 open tickets but they are nice to have and doesn't change APIs or core code. Our internal tests with VisionX and other applications work without problems. The official release day will be Friday, 4th October.

You can look forward to the next great JVx. It's the base of our upcoming Vaadin UI and our new "native" mobile applications.

The full list of changes is available here.

Some highlights:

  • Simple environment (web, mobile, headless, ...) detection because launcher knows the environment
  • Work-screens now have notifyActivate. This will be used if an already opened screen will be activated(shown) again
  • Improved Javascript bridge
  • UI controls are now per factory. This allows different UI technologies (mobile, vaadin, headless) in one war file
  • Tab activated/deactivated events
  • Server-side SessionContext allows access to Master and Sub Session
  • Support for virtual application folders
  • Databooks are now very smart (improved datasource isolation level, save and restore with different data pages, ...)

Create CSV files of JVx storages

Our AbstractStorage implementations have a writeCSV feature already implemented and you can call this method via action call mechanism. But sometimes you need different CSV exports or ZIP archives with different CSV files. You simply need control over the export.

There's a small project with the name AES Storage Export that could help you solving CSV export problems. It has one simple class that takes one or more storages and exports data as UTF-8 CSV files. All CSV files will be added to a zip archive (optionally AES encrypted)

Simple use the class in an server action and create your custom CSV exports.

Test case:

StorageExport export = new StorageExport();

ICondition condFilter = new GreaterEquals("ID", BigDecimal.valueOf(10)).and(new LessEquals("ID", BigDecimal.valueOf(20)));

StorageEntry entryColumns = new StorageEntry("columns.csv", createStorage(), condFilter);
entryColumns.setColumnNames("ID", "VALUE");

StorageEntry entryColumnsStorage = new StorageEntry("columns_storage.csv", createStorage(), condFilter);
entryColumnsStorage.setColumnNames(createColumnStorage(), "NAME");

export.add(new StorageEntry("first.csv", createStorage()));
export.add(new StorageEntry("filtered.csv", createStorage(), condFilter));
export.add(entryColumns);
export.add(entryColumnsStorage);
export.setPassword("testcase");
export.setSeparator(",");

File fiTemp = new File(System.getProperty("java.io.tmpdir"), "aesarchive.zip");

RemoteFileHandle rfh = new RemoteFileHandle();
export.export(rfh.getOutputStream());

FileUtil.save(fiTemp, rfh.getInputStream());

System.out.println(fiTemp);

JVx Application Stack

We'll demonstrate the power of JVx in 3 minutes. One Application Framework, for all platforms.

You have never seen this before:


JVx Application Stack



Some details:

  • Simple deployment, because everything is contained in 1 war file
  • Developed with VisionX
  • Application runs as Java Desktop or Browser Application, as Web Application (HTML, CSS), on iOS or Android
  • Tested with iPhone, iPad, Android phone and tablet - as Web Application and native application

Do you know any other framework with comparable features. I think JVx is the only full stack application framework world-wide with single sourcing support for all platforms and devices - and it's open source.

JVx application with Vaadin launcher on iPad mini

For those, who don't know why the world needs single sourcing and only one framework for backend/frontend/mobile, we have a new use-case!

It's a new application that has different user groups. The first group sits in the backoffice and configures/crunches data. This user group needs a powerful backend application that supports fast (mass) data manipulation. The second user group are end users. This group needs a fancy web based application because an application must be cool and browser based (nowadays).

If you'll develop such an application with different UI frameworks and different technologies (Java, HTML, Javascript), different ORM tools, and for different browsers, clients, OS', you'll need time and a lot know how and maybe many developers.

Wouldn't it be great to use one framework that is powerful enough? The framework shouldn't be restrictive because we (software developers) want to be flexible and include our preferred libraries. No worries, JVx is flexible, small and is not restrictive.

If you develop your application with JVx, you have no problem with different platforms and devices. A JVx application runs as desktop application, in your browser as html application, on your mobile devices as html application and on your mobile devices as native application.

But enough advertising, lets look at the application. First, the backend application:

Video Backend

Video Backend

And the frontend, as video (video speed it's a little bit slow because it was recorded via Wi-Fi):


JVx frontend application

(The video shows our new maximize option, because mobile devices have limited space)

Above applications are not two separate applications. It's only one application with different users and roles. It looks different as desktop application than as web application. The only framework you need to know is JVx. It's not needed to be a html/javascript developer.

The framework is still simple and don't code multiple applications for different devices/platforms. Save time and be happy!

Project news

Some years ago, we started a project with the name OnlineHelp. It was used to create simple online help pages for applications. The project was implemented with GXT 2.1 and was really useful. It's still useful but the technology is old, and GXT is not our best friend. Of course newer versions are really fancy, but the license is not the best for commercial applications.

Some month ago, we decided to switch completely from GXT to vaadin - all our projects. The first project was our webUI and we make good progress. We're near to a first release, but we have no definite date for it (Q4/13 should be possible). The second project is the online help. We make good progress and have a first preview:

Online Help with vaadin

Online Help with vaadin

The style is similar to our new web application style but not a big change compared to our old online help, because our users like it:

Online Help with GXT

Online Help with GXT

The new style is fresh but not too much... We added some new features like full-text search and topic navigation (previous, next). It's a first preview and not more!

The project has now it's own project page and is not anymore a sub project of JVx. The license is still Apache 2.0.

Maven deployment via Ant

We are no Maven lovers, because it helps to forget how things work. But we think the dependency management is useful. It's great for developers who need specific library versions without managing them manually.

The user aspect is one thing, but nobody tells you that it's not trivial to release libraries. One problem is the pre-deployment process. Before you are able to deploy your jar files, you have to do a lot of things like GPG key generation, publishing GPG key, find the right repository, prepare your build, special pom cration and so on.

If you already have release builds with version numbers, javadoc and source archives, you'll save a lot of time. If you don't have complete and clean release builds - see you later.

Let's start with a good documentation about requirements:
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide

Of course, it assumes that you'll use Sonatype as your repository, but all others are not too different.

This posting is not a complete documentation. It simply shows the problems we had.

Our simple pom files:
pom.xml (jvxall)
pom.xml (jvxclient)

The first is with dependencies and the second without, because our client doesn't have dependencies.

The real problems started with the integration in our ant script, because the documentation of Maven plugins were awful. It's easier to read the source code than to find out how plugins work. One example: Read following plugin documentation and tell me the valid values for "types" and "classifier". There are no examples on the page! Google around and copy/paste a little bit - awful!

Here's a working ant call

<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
            uri="antlib:org.apache.maven.artifact.ant"
            classpath="${build}/maven/maven-ant-tasks-2.1.3.jar" />

<condition property="gpgexecutable"
     value="C:\Program Files\GNU\GnuPG\pub\gpg.exe" else="gpg">
    <and>
        <os family="Windows" />
   </and>
</condition>

<artifact:mvn>
    <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.4:sign-and-deploy-file" />
    <arg value="-Durl=${mvn.url}" />
    <arg value="-DrepositoryId=${mvn.id}" />
    <arg value="-DpomFile=${maven.tmp}/jvxall/pom.xml" />
    <arg value="-Dfile=${mvn.jvx.jar}" />
    <arg value="-Dfiles=${mvn.jvx.sources.jar},${mvn.jvx.javadoc.jar}" />
    <arg value="-Dclassifiers=sources,javadoc" />
    <arg value="-Dtypes=jar,jar" />
    <arg value="-Pgpg" />
    <arg value="-Dgpg.executable=${gpgexecutable}" />
</artifact:mvn>

Above call submits e.g. jvx-1.1.jar, jvx-1.1-javadoc.jar and jvx-1.1-sources.jar to the repository.

Why one call instead of 3 separate calls, as described in the documentation?

Short: It's better :)
Long: It's better to submit all dependent files in one "maven session". Above call creates a new maven project and if you call this command per file, there's no logical connection between them. If you plan to deploy snapshot releases - forget it - it doesn't work with different calls because every upload gets a new buildnumber. But all files need the same buildnumber! Such deployments can't be used. If you read the Sonatype document, you saw that "deploy" task didn't deploy javadoc and sources! The "stage" task did. I'm not sure, but I think they had the same problem with separate uploads! Trust me, above call works with snapshots and final releases.

Our naming conventions

<property name="mvn.jvx.jar" value="${release}/maven/${release.name}-${versionnumber}${maven.version.postfix}.jar" />
<property name="mvn.jvx.sources.jar" value="${release}/maven/${release.name}-${versionnumber}${maven.version.postfix}-sources.jar" />
<property name="mvn.jvx.javadoc.jar" value="${release}/maven/${release.name}-${versionnumber}${maven.version.postfix}-javadoc.jar" />

(${maven.version.postfix} is -SNAPSHOT for snapshot releases and empty for final releases)

Repository Id, URL

${mvn.id} = sonatype-nexus-staging
${mvn.url} = https://oss.sonatype.org/service/local/staging/deploy/maven2

Other problems?

Proxy settings for Maven, Use an external GPG key, Autentication.

If you copy the following settings.xml to <users.home>/.m2 and modify it to fit your needs, it should solve all problems:

<?xml version="1.0" encoding="UTF-8"?>

<settings>
  <servers>
    <server>
      <id>sonatype-nexus-snapshots</id>
      <username>username</username>
      <password>password</password>
    </server>
    <server>
      <id>sonatype-nexus-staging</id>
      <username>username</username>
      <password>password</password>
    </server>
  </servers>
  <profiles>
    <profile>
      <id>gpg</id>
      <properties>
        <gpg.passphrase>gpgkey</gpg.passphrase>
      </properties>
    </profile>
  </profiles>
  <proxies>
    <proxy>
      <id>firewall</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>10.0.0.1</host>
      <port>3128</port>
      <username></username>
      <password></password>
      <nonProxyHosts>localhost,127.0.0.1</nonProxyHosts>
    </proxy>
    <proxy>
      <id>firewall-2</id>
      <active>true</active>
      <protocol>https</protocol>
      <host>10.0.0.1</host>
      <port>3128</port>
      <username></username>
      <password></password>
      <nonProxyHosts>localhost,127.0.0.1</nonProxyHosts>
    </proxy>
  </proxies>
</settings>

We configured the proxy via ant build.xml

<target name="proxy.check">
  <condition property="proxy.enabled">
    <and>
      <socket server="10.0.0.1" port="3128"/>
    </and>
  </condition>
</target>

<target name="proxy" depends="proxy.check" if="proxy.enabled">
  <property name="proxy.host" value="10.0.0.1"/>
  <property name="proxy.port" value="3128"/>
  <property name="proxy.user" value=""/>
  <property name="proxy.pass" value=""/>
   
  <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
            proxyuser="${proxy.user}" proxypassword="${proxy.password}"/>
</target>

Simply add "proxy" task as dependency of another task.

Maybe it's easier to release libraries with other build systems or maybe it works out-of-the-box with Maven itself, but the whole process is really bad.

Good luck!

JVx - Maven snapshots

We now provide our JVx nightly via Maven Snapshots. Our nightly build job automatically uploads new JVx snapshots. If you want to use the last JVx snapshot in your project, simply add:

<repositories>
  <repository>
    <id>sonatype-nexus-snapshots</id>
    <name>Sonatype Snapshots</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
  </repository>
</repositories>

to your pom.xml and set JVx' version to: 1.2_beta-SNAPSHOT.

If you use our new JVx archetype 1.1.9, simple change the version in the master project:

<properties>
  <jvx.version>1.2_beta-SNAPSHOT</jvx.version>
</properties>

All SNAPSHOT versions contain debugging information. The release versions don't.

What's JVx in 2013?

JVx was started in 2008 as simple library for application development. The focus was on technology independce. It shouldn't matter which technology will be used in the future. In 2008, Swing was first choice for Java applications. In 2014, it will be JavaFX. JVx was designed to solve technology problems. It's not only a library, it's a full-stack-framework - an all in one solution for application development. But it's still a simple libray. There are no dependencies between the different application layers. Only use the persistence or an UI control or some utility classes. JVx is the right choice.
The big advantage of JVx is that it's API is simple and doesn't hide underlying technologies. Be technology independent or not - it's your decision!
The architecture is clean and easy to understand. The codebase is small and the source code meets the highest quality requirements. JVx is not only open source software, it's professional open source software.

What happened in the last few years with JVx?

We had some plans for JVx. The first was a core library for super-fast application development. This library is known as JVx. The other plans were about mobile applications, and different UI implementations like QT, GXT and a headless UI technique for automated tests. Of course, during recent years we played around with many libraries and frameworks like Pivot, GWT, vert.x, POI, ewsAPI, JasperReports, Birt, RAP, Jspresso, xdev, etc.

The result of our hard work is a framework that allows application development for desktop applications, web applications and mobile applications. BUT, the big difference to ALL other "hybrid" frameworks is that we write the application once and the same application runs without changes on ALL platforms.
JVx is a single-sourcing framework as well! Oh, and JVx is the only Java framework that allows a seamless integration in Oracle Forms.

We don't know a framework on this planet which is like JVx. It's small, it's simple, it's powerful, it's Open Source, it's professional, it's amazing.

Sounds unbelievable?

Maybe, but convince us that the opposite is true.

We know that JVx is not the solution for all problems because it was designed for database application development and not for other things. It's not a good idea to create a web-shop or a role-playing game with JVx. There are better tools for that. But if you develop backend applications that needs (or not) a modern web frontend and access with mobile devices, than JVx is your friend!

During the last few years, we had as much fun as possible. We put all our know how and time in JVx and we know that our vision will be reality! We show you two images that explains a little bit better what JVx covers

JVx' 2013

JVx' and independent projects

Above image shows projects built on-top of JVx. Following image shows what JVx - as library - supports. The list is not too detailed, but you should get an idea.

JVx' features

JVx' features

Our next steps?

The framework itself is great, but we need more documentation. We can't write as much howtos, intros as you need but we do our best. With JVx, we solve many problems but you don't know which ones without documentation. This is the biggest howto for 2013.

Another challenge is our JavaFX UI. We are working on it!

The next important milestone is the 1.0 Release of our vaadin UI. It's already code complete but we are still reviewing... be patient if you won't build on your own.

More class diagrams

We have more class diagrams for you. They should help to understand how JVx "thinks".

The first one shows the persistence (server-side):

JVx Persistence

JVx Persistence

You work with our generic model (client-side) to access data:

JVx Generic model

JVx Generic model

and use conditions to filter data:

JVx conditions

JVx conditions

And the last one shows the application architecture with JVx' default implementation:

Application

Application

JVx UI class diagram

We got a lot of requests regarding a JVx UI class diagram. We didn't have one, because we thought that our javadoc is a good starting point. But you need it, and here it is.

JVx UI

JVx UI