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

Category: Development

JVx 1.0 beta-1 is available

It is available from the project page.

What’s different?

The current version is our first release on the way to 1.0. It contains not a lot of new features and most of them are in the backend. We had a lot of work with some Problems with our DataBook in DataSource Writeback Isolation Level and with Multi Threading. But we are very satisfied with the release!

  • DataSource Isolation level

    Compared to the DataRow Level, a DataBook does not save immediate. The mix of databooks with DataRow and DataSource Level with different master references caused problems. Now it is not a problem to use different levels. It is great to use 1:n, n:m or even 1:1 relations with DataSource level, but call save when needed!

  • LifeCycle Objects

    If your LifeCycle objects extends from GenericBean, the destroy() method is now invoked after the connection is closed. If you don't extend from GenericBean, you can use the ILifeCycleObject and implement destroy(). It is now possible to close connections to remote systems or execute cleanup tasks. Note that DBAccess automatically closes the database connection.

  • Conditions

    The Conditions LikeReverse and LikeReverseIgnoreCase are new and work as follows:

    Like: column-value like user-value
    LikeReverse: user-value like column-value

  • Access control

    It is now possible to use a custom IAccessController for your DBSecurityManager. Simply set the full qualified class name in your config.xml:

    <application>
      <securitymanager>
        <accesscontroller>com.sibvisions...</accesscontroller<
    ...
  • Security Managers

    Security Managers have now a release method. This is important if you want to change the security manager because now it is possible to free all used resources.

  • Cell formatting

    It is now possible to configure images for rendered cells. Image and Text combinations in cells are now supported.

  • Utilities

    We added some useful methods to ResourceUtil, FileUtil, StringUtil and ArrayUtil. Introduced the new class TriggerAPI for server-side triggers.

  • Changes to 0.x
    • XmlNode.getValue() for an attribute with an empty value returns now null instead of an empty string.
    • UIImage.getImage("invalid") returns null instead of an UIImage instance without content. Be aware of NullPointer Exceptions.
    • logout method of ISecurityManager is only called for MasterSession and not for SubSession. Before 1.0 is was called for all Sessions.
    • estimatedRowCount of IStorage was renamed to getEstimatedRowCount
    • ResourceUtil searches local files only from directories which contains jar files and not for directories which contains class files. Now logging.properties per project are supported.

Check the Changelog for a complete list, and use our Forum to talk with us ;-)

Pivot - Hello

The UI framework Pivot offers modern UI controls and renders very clean and fast. It has very powerful features and we made a very simple load-on-demand TableView implementation. We used our JVx model, especially IDataBook, for the integration.

The result is a table that loads the data from a database (scroll down to see what happens). The database table contains about 170,000 lines.


The above example uses the same database as our Showcase application.
The Source Code is Open Source and available via SVN, on our JVx Project page.

JVx vs. JSP/Spring/Hibernate

We found a nice article about a simple CRUD application, created with JSP/Spring/Hibernate - read more....

This example is great for a comparison with JVx, because JVx is perfect for CRUD applications.

We used our existing app JVxFirstApp as reference because it is comparable to the Spring app. Our app has some extra features like authentication and a specific security manager, but that does not change anything.
Both applications provide CRUD operations on a table called CONTACTS. A big difference is the used technology: Web (JSP) vs. Desktop (Swing), but it is no extra coding effort to start our app as Web application - with our WebUI.


Why the comparison?

A big advantage of JVx is to simplify application development specifically of database applications. We want to show the difference in complexity and compare some statistics.
Let's start with the statistics:

    JSP/Spring/
Hibernate
  JVx
Files   17   9
LoC   265   208
Config lines   74   15
JSP lines   230   -
Libraries   37   2


We used the same code formatter for both projects, therefore the Lines of code should be meaningful. The config files do not contain a lot of empty lines and the jsp files are standard html. We counted every line.

As you can see there is a big difference. Less lines of code do not automatically mean less complexity, but in this concrete example is it so. If your application has few lines of code, it is easier to understand how things work together and it is easier to maintain your application. And if you are a beginner it is better to get fast results without losing the control. That is the case if your project contains many files.

And if you are not a beginner it is important that you have the best flexibility with your framework. Both technologies allow the unrestricted use of other frameworks. But more dependencies means more problems if you plan to update to newer versions. The testing effort should not be underestimated. Fewer dependencies are an advantage!


What is your opinion?

JVx 0.9

We proudly present JVx 0.9!

This release of JVx contains about 190 changes :)

Originally we wanted to move some features to 1.0 because they needed a considerable amount of time, but we kept them for 0.9 because each feature is great and saves a lot of work... And now, some months after JVx 0.8 we have a very powerful JVx with tons of new features, performance improvements and still very simple and small. We don't know a framework with approximately the same features as JVx which is about 900Kb. If someone knows a framework, please let us know!

And before we continue with some new features, many thanks to all the database vendors ;-) We had a lot of work with different Standard interpretations (quoting, case sensitive, OS differences, imcomplete JDBC implementations, ... )


What's new? ...too much to describe everything in one post, but let's start:

  • Database
    • Manual quoting via DBStorage, if you need specific database features and don't change the database
    • Automatic quoting via DBStorage, if you plan to change your database or if you use a storage for different databases
    • Change your database(s) without changing you client code read more...
    • Use existing java.sql.Connection instances to create DBAccess instances
    • PK, FK, UK detection with or without JDBC driver, when needed (DBAccess dependent)
  • Server
    • Introduced DBCredentials and DataSourceHandler to change DB connections without changing source code read more...
    • Default storage implementation for automatic caching (AbstractCachedStorage)
    • Default storage implementation for memory data (AbstractMemStorage)
    • Server side triggers and POJO support for storages read more...
    • Use custom SessionManager and ObjectProvider implementations
    • Global meta-data caching read more...
    • Better Exception handling for debugging
  • User Interface
    • Simple charting
    • Default layouts for Container
    • Save UIImages
    • Changed automatic (master/detail) link editor visibility
    • Introduced TreePathFinder
    • login/logout event handler for applications
    • Modern Message layout
    • Border on/off option for TextFields
    • Translation for Cell Editors (e.g. Date/Time Picker)
  • Utilities
    • Added FileUtil.replace, FileUtil.zip, FileUtil.unzip, FileUtil.copy (directories and files), FileUtil.move, FileUtil.delete (directories and files)
    • Added StringUtil.getCharacterType, StringUtil.getCaseSensitiveType, StringUtil.replace (faster than String.replace)
    • Added <XmlNode>.toString(boolean), <XmlNode>.getXmlValue, <XmlNode>.indexOf (deep search)
    • Added CommonUtil.getFirstCause, CommonUtil.equals (supports null comparison)
    • Added ResourceUtil.getResource and ResourceUtil now supports different ClassLoaders
    • Added simple namespace support for XmlWorker
    • XmlWorker has a new option for writing line-feeds between tags
    • Added <FileSearch>.searchFirstFile and support for file/directory pattern search


The above list contains only some cool changes. You find the complete list in the Changelog.


But that was not all.... We added some new features to our WebUI and released the second beta, which is fully compatible with JVx 0.9.

Our Showcase application is up-to-date and uses JVx 0.9 and WebUI 0.8 beta-2.

And last but not least, we look forward to your feedback!

Showcase, what's new?

Some days ago, we updated our showcase application and especially the WebUI implementation.
But what is new?

Our WebUI has some great new features, in addition to our Plat_Forms release.

Check out the Help menu - the help is now embedded in the application. Another great feature is the download option for grids - press the small export button beside the grids. Or try uploading an image in the contacts screen - works great :)

Smaller changes are grid specific, e.g. the sort operation is now a remote operation, same for inserting new lines.

We welcome your feedback!

Plat_Forms 2011 special releases

Because of the Plat_Forms competition, we released special versions of JVx, WebUI and OnlineHelp. All releases are available from our project page.

We implemented some amazing new features for JVx and WebUI.

Check out the changelogs for details.

Some tags:

  • Simple charting
  • Default layouts
  • Global metadata caching (server-side)
  • Modal frames in WebUI
  • Table handling in WebUI

JVx 0.9 beta-2 is available

It is available from the project page.

What’s New?

The complete list of changes can be found here.

  • Default Database (CoC)It is now possible to configure multiple db datasources via config.xml
    <?xml version="1.0" encoding="UTF-8"?>

    <application>
    <securitymanager>
    <class>com.sibvisions.rad.server.security.DBSecurityManager</class>
    </securitymanager>

    <datasource>
    <db name="default">
    <url>jdbc:oracle:thin:@localhost:1521:mydb</url>
    <username>user</username>
    <password>password</password>
    </db>
    </datasource>
    </application>

    If the DBSecurityManager does not define a specific datasource, the datasource with the name "default" is used.

  • Quoting in DBAccessDBAccess supports case sensitive database access. To enable the feature, call
    setQuoting(true);

    on your DBAccess instance.

  • Custom SessionManager and ObjectProviderIt was possible to use a custom ObjectProvider but it was not possible to extend the DefaultObjectProvider. Now this limit is gone. Additional it is now possible to use a custom SessionManager and extend the DefaultSessionManager.

    Configure the objects in your server config.xml like this:

    <server>
    <sessionmanager>com.sibvisions.AnotherSessionManager</sessionmanager>
    <objectprovider>com.sibvisions.AnotherObjectProvider</objectprovider>
    <server>
  • Server Side TriggersOur DataBooks now supports specific events like before insert or after delete. The server side storage did not have this events, so you had to overwrite the data manipulation methods to call your business logic or to change the default behaviour. That was not very cool.

    We have implemented a very powerful feature, with which you have full control of your data sent to the data tier. Do you know database triggers?
    Now you have the same power in your storages.

    A short example:

    public void getUsers()
    {
    DBStorage dbsUsers = new DBStorage();
    dbsUsers.setDBAccess(getDBAccess());
    dbsUsers.setFromClause("V_USER_USERS");
    dbsUsers.setWritebackTable("USERS");
    dbsUsers.open();

    dbsUsers.eventBeforeInsert().addListener(this, "doEncryptPwd");
    dbsUsers.eventBeforeUpdate().addListener(this, "doEncryptPwd");
    }

    public void doEncryptPwd(StorageEvent pEvent)
    {
    IBean bn = pEvent.getNew();

    bn.put("PASSWORD", AbstractSecurityManager.getEncryptedPassword(
    SessionContext.getCurrentSessionConfig(),
    (String)bn.get("PASSWORD")));

    pEvent.setNew(bn);
    }

    Use the event handling as usual.

  • Flat POJO support for StoragesInstead of using the dynamic property access via IBean, it is possible to work with POJOs:
    public void doEncryptPwd(StorageEvent pEvent)
    {
    User user = pEvent.getNew(User.class);

    user.setPassword(AbstractSecurityManager.getEncryptedPassword(
    SessionContext.getCurrentSessionConfig(),
    user.getPassword()));

    pEvent.setNew(user);
    }

    You can work with every useful POJO because the storage mapps only available properties to the POJO.

  • Useful bugfixes

We look forward to your reviews ;)

JVx 0.9 beta-1 is available

Check out our new JVx version. It is available from the project page.

What's in the current beta?

The complete list of changes can be found here.

Some features, however, at this point:

  • Introduced DBCredentials and DataSourceHandlerIt is now possible to configure multiple db datasources via config.xml
    <?xml version="1.0" encoding="UTF-8"?>

    <application>
    <securitymanager>
    <class>com.sibvisions.rad.server.security.DBSecurityManager</class>
    <database datasource="mydb" />
    </securitymanager>

    <datasource>
    <db name="mydb">
    <url>jdbc:oracle:thin:@localhost:1521:mydb</url>
    <username>user</username>
    <password>password</password>
    </db>
    <db name="masterdb">
    <url>jdbc:derby://localhost:1527/masterdb</url>
    <username>master</username>
    <password>master</password>
    </db>
    </datasource>
    </application>

    and use the configured security manager connection in the Session:

    IConfiguration config = SessionContext.getCurrentSessionConfig();

    dba = DBAccess.getDBAccess(DBSecurityManager.getCredentials(config));
    dba.open();

    or any connection, by name:

    IConfiguration config = SessionContext.getCurrentSessionConfig();

    DBCredentials cred = DataSourceHandler.createDBCredentials(config, "masterdb");

    dba = DBAccess.getDBAccess(cred);
    dba.open();

    It is still possible to use the old configuration format:

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

    <application>
    <securitymanager>
    <class>com.sibvisions.rad.server.security.DBSecurityManager</class>
    <database>
    <driver>org.hsqldb.jdbcDriver</driver>
    <url>jdbc:hsqldb:hsql://localhost/demodb</url>
    <username>sa</username>
    <password></password>
    </database>
    </securitymanager>

    You can create DBCredentials or read the config programatically, as it was with JVx 0.8.

  • Introduced AbstractCachedStorageThe AbstractCachedStorage is the new base class for all IStorage or ICachedStorage implementations. It implements the metadata caching and offers simple export functionality. With this class it is easy to develop new storages.
  • Introduced AbstractMemStorageThe AbstractMemStorage extends the AbstractCachedStorage and offers a MemDataBook on the server-side. With this class it is very simple to create storages with data kept in memory. You don't need a special backend, e.g. you can use a List to fill the storage. Our TwitterStorage uses this storage.
  • DBAccess supports pre-configured java.sql.ConnectionCreate a DBAccess instance with a pre-configured connection, e.g.
    Connection con = getJNDIConnection();

    DBAccess.getDBAccess(con)

  • XmlNode performance tuningOur XmlNode allows XML access with following syntax:
    XmlWorker xmw = new XmlWorker();
    xmnRead = xmw.read(new FileInputStream("example.xml"));

    xmnRead.setNode("/archive/element(1)/user", "xml");
    xmnRead.setNode("/archive/new/element", "car");

    The class offers powerful and simple XML handling - check it out!

  • Bugfixes and Test cases

We look forward to your reviews ;)

JVx documentation update

We described all DataBook events and row states with some articles in our Forum. The events and states are very important if you need special data/row handling on client side e.g. ask the user before delete record(s).

The articles includes flow charts and practical examples. If anyone has questions, just post to the forum.

Direct links to the events and states.

JVx reads Twitter

We have a lot of useful features in JVx. It is very easy to develop multi tier applications, two tier applications or simple desktop applications - started as RIA, Web or Standalone application.
Every tier is technology independent and does not require third party frameworks. We can use every useful framework to create business logic.

But we don't have a lot of connectors out-of-the box (at the moment). There are a lot of technologies out there, e.g. NOSQL, Cloud services, Facebook, Twitter, YouTube, REST, ...

Not all technologies are useful for business apllications, but it is a lot of fun to work with new technologies :)

We spent some hours to develop a simple Twitter client (rather a connector) to read/delete/insert Tweets. The result can be seen here:

Twitter client with JVx

Twitter client with JVx

What we did?

  • Created a new Storage, called TwitterStorage
  • extended AbstractMemStorage
  • Implemented loadData, insert, delete and getRowDefinition
  • used twitter4j

After 290 lines of code we were finished. The standard RemoteDataBook works perfect with the new Storage (full support for filtering, sorting, master-detail relations).