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
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.
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
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).
JVx 0.8 ist out now!
We put much time and work into the new release. It contains almost 100 improvements!
But before we go into the details, it should be mentioned that JVx is now hosted on SourceForge. This step was particularly important to us, in order to be able to develop together with our Community.
Our Forum contains detailed instructions for working together.
We appreciate any help.
Download JVx 0.8 here
What's new?
- API changes
- We removed set/getTableColumnNames, set/getTreeColumnNames, set/getEditorColumnNames and introduced ColumnView. Now it is possible to set a column view per UI control e.g.: ITable, ITree, IEditor, null (ALL)
Old:
rdbInvoice.getRowDefinition().
setTableColumnNames(new String [] { "POS", "PRICE"});
New:
rdbInvoice.getRowDefinition().
setColumnView(null, new ColumnView("POS", "PRICE"));
- DBAccess has now a static method, setAutomaticLinkColumnNameTranslation, to translate the automatic link column names into a user-defined name.Default:
tmpAutoLinkColumnNames.put("*_id", "*");
tmpAutoLinkColumnNames.put("*_ID", "*");
- Changed, automatic, visible column detection from case insensitive to case sensitive, for compatibility reasons!Old:
setDefaultIgnoredColumnNames("*_ID");
New:
setDefaultIgnoredColumnNames("*_ID", "*_id");
Default:
"*ID", "*id", "*_ID", "*_id", "*_INTERN", "*_intern"
- Renamed countRows to getEstimatedRowCount in IStorage
- MetaData handlingReduced client/server requests,
Reduced creation loops on server side,
Caching for sub storages,
Fixed Nullable column detection,
Client Cache roles,
Label detection,
Split Client and Server MetaData usage
- SerializerUniversalSerializer is now the standard serializer,
Support for async serialization with new TypeCache,
Bean packages unified,
New init method for ISerializer,
The serializer name is now included in the connection properties
- JNDI supportServer is now available via JNDI or Singleton
- DB supportHSQLDB driver is now registered,
HSQLDB locking mechanism fixed,
Derby locking support,
close open statements,
Check constraint detection with 'OR', 'AND', 'IN',
Automatic Link Column Name detection works now DB independent,
Fetch optimization (reduced method calls),
BigDecimal DataType contains always a BigDecimal - DB independent
- SecurityDifferend Password algorithms (SecureHash),
Automatic Security detection of lifecycle objects,
XmlSecurityManager now supports more than 1 User
- Smaller changes and BugfixesAll details are documented in our Support System or the ChangeLog
The source code of JVx is now hosted on SourceForge!
As a little bonus, we gave following packages in the repository:
- JVx Core
- JVx Android AddOns
- JVx Swing UI
- JVx QTJambi UI
- JVx Web UI
- JVx Flex client and server (proof of concept)
And finally, we decided to release the complete source code of our JVx .NET AddOns. The source code was not yet available and is still in development.
We look forward for many helping hands!
JVx defines a technology independent User Interface, with Interfaces. Each technology has to implement this interfaces for its components and controls, to be compatible with JVx. We have implemented all this interfaces for Swing.
In addition we have created some swing components with special features for business applications. This components are simple extensions to existing swing components and are supported from any Look and Feel. They can be used in any swing application with or without the whole JVx framework.
We will show here some of this components:
- DesktopPane with tab or frame mode
Switch between tab and frame view, Closable tabs (works with java 1.5 and is LaF independent), Drag and Drop Tabs, Tab navigation with keyboard, Modal frames, Background image.
 Frame mode
|
|
 Tab mode
|
|
 Desktop Background |
|
- ComboBoxes with user-defined popup components
A base implementation of a ComboBox called ComboBase. With this combo you can build your own ComboBox for e.g. input first and last name in separate fields. We implemented a date chooser and a table selector (header is:
 Date Combo
|
|
 Table Combo
|
|
- Table with load-on-demand model and ready-to-use cell editors/renderers
A table which uses an IDataBook implementation as model (e.g. MemDataBook) and shows cell editors and renderers dependent of the cell data types, e.g. a table with image renderer and multiple choice editor/renderer
 Table with renderer and editor
|
|
| Following editors/renderer are available: Text, Number (only numbers are allowed), Date, Multiple Choice, Image |
|
- Button
A standard button and a toggle button with support for mouse-over borders.
- Icon
A special icon which supports image stretching and alignment.
Our implementation includes not only Swing components. It also contains some useful layouts:
- FormLayout
Anchor based layouting. Supports margins, stretching, gaps, ... It is designed for simple and complex forms.
- BorderLayout
Supports margins.
- SequenceLayout
Supports component stretching, component orientation, intelligent wrapping.
If you are interested in JVx, leave a comment or join our community.
You are welcome!
Seit wenigen Augenblicken steht die erste Beta Release von unserer QT Jambi UI Implementierung zum Download bereit. Dieses Release enthält sowohl Erweiterungen zu den Standard Widgets als auch die Implementierung von javax.rad.ui.
Zu den Erweiterungen zählen unter anderem:
- Border Layout
Das gewohnte Border Layout mit der Ausrichtung NORD, SÜD, WEST, OST, ZENTRIERT
- Form Layout
Das Anker orientierte Layout ist eine Portierung aus dem Swing UI und ermöglicht die Erstellung von komplexen Layouts ohne Schachtelung.
- Sequence Layout
Im Gegensatz zu einem Flow Layout ermöglicht dieses Layout die Komponenten zu stretchen, die vertikale bzw. horizontale Anordnung der Komponenten sowie die Ausrichtung der Komponenten zu beeinflussen.
- Zell Editoren
Die üblichen Editoren für Datum, Passwort, Zahlen und Text.
- Anpassbare Combos
Im Normalfall ist es schwierig eine Combo Box mit einem speziellen Layout und/oder benutzerdefinierten Komponenten zu verändern. Die Bibliothek enthält bereits eine Basis Combo Box, mit der eine Combo Box beliebig gestaltet werden kann.
- Desktop und (modale) Internal Frames
Die Desktop Implementierung ermöglicht Frames die wahlweise modal angezeigt werden. Weiters wurde das Event handling von Java im Bezug auf Internal Frames umgesetzt.
Die Widgets sind unabhängig von JVx und können auch in Applikationen, die nicht auf JVx aufsetzen, integriert werden. Bei der Umsetzung wurde auf höchste Kompatibilität geachtet.
Die Showcase Anwendung steht zum Testen bereit.
Die Implementierung ist über unsere Download Seite verfügbar!
Die Web UI Implementierung von JVx wurde bereits in früheren Postings vorgestellt. Kurz zusammengefasst handelt es sich dabei um die Möglichkeit, eine bereits entwickelte Applikation als HTML/Ajax Anwendung zu starten, ohne auch nur eine Zeile Source Code zu verändern. Die vormals als RIA gestartete Anwendung wird einfach (zusätzlich) als Web Anwendung zur Verfügung gestellt z.B. für mobile Geräte.
Seit heute steht unsere Showcase Anwendung als Rich Internet Application und Web Application zur Verfügung. In beiden Fällen wird die selbe Applikation verwendet!
Überzeugen Sie sich von unserer Innovation und starten Sie die RIA und die Web Anwendung getrennt voneinander.
Selbstverständlich funktioniert unsere Web Anwendung auch auf mobilen Geräten wie dem iPad/iPhone oder einem Android Device wie dem HTC Desire. Die Anwendung wurde jedoch nicht für die Auflösung dieser Geräte optimiert. Das Ergebnis sollte aber auf alle Fälle beeindrucken:
 iPad Showcase |
|
 HTC Desire Showcase |
In den letzten Wochen haben wir neben dem Web UI auch am QT Jambi UI gearbeitet, um zu demonstrieren daß eine JVx Applikation mit unterschiedlichsten Technologien verwendet werden kann - ohne den Source Code der Applikation zu verändern. Was wir Ihnen bisher nur anhand von Screenshots gezeigt haben stellen wir nun als Anwendung bereit.
Den Showcase als QT Jambi Anwendung starten (im Moment wird nur Windows als Betriebssystem unterstützt).
Die Anwendung ist kaum von der Swing Anwendung zu unterscheiden - sehen Sie selbst:

Der Source Code wird unter der Apache License, Version 2.0, veröffentlicht.
Nachdem die JVx .NET AddOns bereits wunderbar mit Silverlight harmonieren, haben wir einen ersten Versuch mit dem Windows Phone SDK gewagt. In erster Linie wollten wir prüfen ob die AddOns auch mit Windows Phone funktionieren. In der Spezifikation waren keine Stolpersteine zu fnden, daher sollte eine Integration problemlos möglich sein.
In der Praxis sieht die Sache natürlich etwas anders aus. Das SDK enthält (noch) nicht alle Klassen die in den AddOns verwendet wurden. Daher musste für unseren Test auf etwas Komfort verzichtet werden. Nach der Anpassung der AddOns war die Integration jedoch ohne Probleme möglich.
Wir setzten uns ein sehr bescheidenes Ziel für die Entwicklung der ersten App:
Darstellung einer Liste mit den Ländern aus unserer Showcase Anwendung.
Unsere App war überraschend schnell umgesetzt. Hierbei ist jedoch anzumerken, daß das Windows Phone SDK im Moment nicht mit der Konkurrenz mithalten kann. Dazu müssen noch wesentliche Details verbessert werden.
Unsere App, gestartet mit dem Windows Phone Emulator:
 Windows Phone App
|
Der Source Code für den Zugriff auf die Daten ist in üblicher Manier zu schreiben:
private JVxDataAdapter dataSource
;
private MasterConnection Connection
;
public MainPage()
{
InitializeComponent();
SupportedOrientations = SupportedPageOrientation.Portrait
| SupportedPageOrientation.Landscape;
// init connection
HttpConnection conn = new HttpConnection(new UniversalSerializer(),
"http://demo.sibvisions.org/showcase/services/Server");
MasterConnection master = new MasterConnection(conn);
master.ApplicationName = "showcase";
master.LifeCycleName = "com.sibvisions.apps.showcase.frames.Contacts";
master.UserName = "admin";
master.Password = "admin";
// init data adapter
dataSource = new JVxDataAdapter(master);
dataSource.OpenComplete += new OpenCompleteEventHandler(OpenComplete);
// open connection
dataSource.Open();
}
void OpenComplete(OpenCloseCompleteEventArgs pEvent)
{
// fetch data
CommunicationCallback callback = new CommunicationCallback(
new AsyncCallback(EndFetch));
dataSource.Connection.call("countries", "fetch", callback,
new object[] {null, new SortDefinition(new String[] {"COUNTRY"}), 0, -1});
}
void EndFetch(IAsyncResult pResult)
{
CommunicationCallback requestCallback = (CommunicationCallback)pResult.AsyncState;
ArrayList result = (ArrayList)requestCallback.CallResult[0];
// fill list
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
foreach (object[] item in result)
{
if (item != null)
{
ListBox.Items.Add(item[1]);
}
}
});
}
Das XAML ist im Vergleich zum Datenzugriff weit komplexer:
<phoneNavigation:PhoneApplicationPage
x:Class="WindowsPhoneApp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phoneNavigation="clr-namespace:Microsoft.Phone.Controls;
assembly=Microsoft.Phone.Controls.Navigation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}">
<Grid x:Name="LayoutRoot" Background="{StaticResource PhoneBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="162"/>
<RowDefinition Height="44"/>
<RowDefinition Height="514*"/>
<RowDefinition Height="80"/>
</Grid.RowDefinitions>
<Border BorderBrush="Silver" BorderThickness="5" Name="border0"
CornerRadius="20" Background="#18A2E7" Margin="12,0,12,20">
<Grid x:Name="TitleGrid" Height="147" >
<TextBlock Text="Windows Phone App" Foreground="Black"
x:Name="textBlockPageTitle"
Style="{StaticResource PhoneTextPageTitle1Style}"
Margin="7,6,12,100" />
<TextBlock Text="JVx showcase" Foreground="Black"
x:Name="textBlockAppTitle"
Style="{StaticResource PhoneTextPageTitle2Style}"
Margin="-3,26,-3,16" TextAlignment="Center" />
</Grid>
</Border>
<TextBlock Text="Countries" x:Name="textBlockListTitle" FontSize="30"
HorizontalAlignment="Right" Width="456" Margin="0,148,12,6"
VerticalAlignment="Stretch" Padding="0,5,0,0" Grid.RowSpan="2" />
<Border BorderBrush="Silver" BorderThickness="5" Name="border1"
Grid.Row="1" CornerRadius="20" Margin="12,35,12,0" Grid.RowSpan="2">
<ListBox Name="ListBox" HorizontalAlignment="Left"
VerticalAlignment="Top" Width="480" Margin="5,5,5,5" />
</Border>
<Image Grid.Row="3" Height="74" Margin="0,6,0,0" Name="image1"
Stretch="Uniform" VerticalAlignment="Top"
Source="/WindowsPhoneApp;component/Images/sib_visions.png"/>
</Grid>
</phoneNavigation:PhoneApplicationPage>