We fully support Vaadin' push support with current JVx *nightly* builds (see JVx with vaadin UI and server-side push). We had some problems with manual push mode because of some strange implementations of atmosphere in vaadin. We found a better solution to be independent of vaadin changes (should work with 7.1.8 and later).
No we automatically push if you use standard threads or threads, created via VaadinFactory. It's also possible to use JVx' callback mechanism for push operations. If you won't use threads in your client application, simply make an async server call. The server implementation automatically starts a new thread and executes the task. The server will notify the client after the task is finished. This is a little bit strange because client and server run on the application server, if you use our vaadin UI. If your JVx client retrieves the result of an async call, it will automatically push the results to the vaadin client. This makes the whole application very smart and live.
It's very easy to work with async calls in JVx. Simply use a callback listener:
getConnection().callAction(new ICallBackListener()
{
@Override
public void callBack(CallBackEvent pEvent)
{
butCallBack.setImage(IMAGE_YESNO);
}
},
"asyncServerAction");
The server method in Session LCO:
public int asyncServerAction
() throws Exception
{
Thread.
sleep(5000
);
return ++count;
}
We didn't change JVx' APIs to support vaadin push. It works behind the scenes and we simply love it.
Use our nightly builds to see how it works.
We build all our OSS projects automatically every day, but only JVx binaries were available for download so far. We wanted to let you know that we added JVx.vaadin and JVx.help to the nightly-build download area. Check https://dev.sibvisions.com/jvx.nightly/ to get access to our nightly build binaries.
Currently we only push JVx snapshot binaries to maven central, but we'll do the same with JVx.vaadin or online help in a few weeks. So keep reading this blog to get the latest news or follow us on Twitter.
Vaadin supports "push" - since 7.1 - but JVx doesn't have an API for that. It's technology dependent and we usually not need it on client-side of an application. It would be useful for the server-side of JVx applications, but that's a different thing. I want to write about server-side push for UI changes.
If you use threads in your application, to update the UI, it's not a problem if you use a desktop technology like Swing UI. The UI is always up-to-date. If you use vaadin UI, it's not the case, because vaadin UI runs on an application server (= server machine) and vaadin client runs in your browser as Javascript code (= client machine). The thread runs on the server machine and doesn't update the client machine automatically. The client retrieves all changes with next client request. This is sometimes too late. With server-side push it's possible to update the client machine immediate, if you use pure vaadin.
With our next vaadin UI release, it's also possible to use server-side push of vaadin to update the client machine. It's very easy to use and also is technology independent, but we didn't introduce new APIs
How it works?
Create a new thread, through your factory and use invokeLater to update the UI. You always should use invokeLater to update the UI (no difference if you use swing or other desktop technologies).
UIComponent.invokeInThread(new Runnable()
{
public void run()
{
try
{
while (!ThreadHandler.isStopped())
{
Thread.sleep(2000);
UIComponent.invokeLater(new Runnable()
{
public void run()
{
iCount++;
label.setText("Push: " + iCount);
}
});
}
}
catch (InterruptedException ie)
{
info(ie);
}
}
});
If push is enabled, above code pushes the UI changes immediate to the client machines. To enable server-side push, simply add following to your servlet configuration in web.xml:
<init-param>
<param-name>pushmode
</param-name>
<param-value>automatic | manual
</param-value>
</init-param>
<async-supported>true</async-supported>
It's also possible to use vaadin push without JVx' mechanism (pure vaadin). To see how this works, read following issue: Server-side refresh.
Winner IT/E-Commerce |
|
Wir sind seit gestern die Gewinner der Spezialategorie IT/E-Commerce des GEWINN Jungunternehmer Wettbewerbes - 2013.
Wir konnten uns gegen eine sehr starke Konkurrenz durchsetzen und freuen uns dementsprechend über die Auszeichnung.
Zum Gewinn haben unser Produkt VisionX und unsere OpenSource Strategie beigetragen. Als eines der wenigen österreichischen Unternehmen entwickeln wir Technolgien für die Software Entwicklung.
Durch die Auszeichnung wurden auch unsere konsequente Vorgehensweise und unsere hohen Qualitätsansprüche belohnt. Nicht zuletzt deswegen sind wir sehr stolz auf diesen Preis. |
|
In feierlichem Ambiente und mit gekonnt witziger Moderation wurde die Preisverleihung durchgeführt.
Prize-giving
Our new JVx' pages are online: http://www.sibvisions.com/jvx
We reduced everything to a bare minimum and it's now much better than before. We added missing information like usage with Maven, Nightly builds, repositories for our demo application. The demo application is now up-to-date. We replaced our showcase application with our new ERP demo application.
We have a new JVx' video that shows all JVx features and projects like Online Help.
Have fun with JVx
Our good old showcase application was the first JVx application, developed in 2008. It showed some features of JVx but wasn't a real-world application. And of course, it was a small application
Some month ago, we decided to create a new real-world application. And what's better for JVx as an ERP system?
So we developed an ERP application It's not too feature-rich but demonstrates the full power of JVx.
It's the first application that contains all projects around JVx. The application runs as Java Applet, Webstart (applet or application mode), HTML5 (based on vaadin 7.1), mobile REST server for mobile clients (native iOS and Android) and our rewritten Online Help. Oh, and the built-in JVx REST interface. The application is a multi-user application with a user/role management.
The ERP system demonstrates a real-world Single Sourcing approach. A fat backend with a smart frontend and it supports mobility strategies.
If you want more information about JVx and UI independent application development, visit our talk at W-JAX (Tuesday, 10:15 to 11:30, room Lillehammer)
Thanks Stefan for your great work!
Try out our new application:
http://demo.sibvisions.org/demoerp/ (Applet)
http://demo.sibvisions.org/demoerp/web/ui (vaadin based)
http://demo.sibvisions.org/demoerp/help/ (vaadin based)
Use following credentials (Username = Password):
Manager: manager
Sales person: sales
The whole source code of the application is online and available on SourceForge.
Feel free to send us your feedback!
Our JVx First Application is now available on SourceForge. In the past, we only had zip archives that contained our first application. Now it should be easier for you to start with JVx if you don't use our maven archetype.
The project site is: http://sourceforge.net/projects/jvxfirstapp/
The repository contains an Eclipse project that is ready-to use. The application itself is a database application. Please start the database before you start the application. The database is available and stored in db folder. Simply execute db/startHSqlDB.bat if you use Windows or start it manually on other OS'.
Our First Application is a very simple JVx application and demonstrates first steps without complex use-cases. It simple demonstrates user authentication via XML security manager and CRUD operations with a database table. But the project also contains a JUnit Test that shows how you could test your business logic.
A more complex application will be available in the next days. It's our Demo ERP. This application will demonstrate Swing UI, Vaadin UI, Online Help and more. It's a "real world" showcase that shows the full power of JVx.