Trace:
Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
jvx:firstapp_step-by-step [2020/06/10 11:04] cduncan Edited for English grammar (capitalization, punctuation, correct verb conjugation) |
jvx:firstapp_step-by-step [2024/11/18 10:15] (current) admin |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~Title: First JVx Application (Step-by-Step)~~ | + | ~~Title: First JVx Application (Step by Step)~~ |
| - | The aim of this tutorial is to create an application with the Enterprise Application Framework – [[https://jvx.sibvisions.com|JVx]]. Moreover, a quick overview of the framework's possibilities will be given. | + | The aim of this tutorial is to create an application with the Enterprise Application Framework. Moreover, a quick overview of the framework's possibilities will be given. |
| The application's task is to display the data from a database table and make them editable. The application requests authentication with username and password. | The application's task is to display the data from a database table and make them editable. The application requests authentication with username and password. | ||
| Line 9: | Line 9: | ||
| * [[http://sourceforge.net/projects/jvx/files/latest/download|JVx Binary package]] | * [[http://sourceforge.net/projects/jvx/files/latest/download|JVx Binary package]] | ||
| * Eclipse IDE (>= 3.4) with JDT (recommended: Eclipse IDE for Java EE developers) | * Eclipse IDE (>= 3.4) with JDT (recommended: Eclipse IDE for Java EE developers) | ||
| - | * JDK 6.0 (1.6) or higher | + | * JDK 8.0 (1.8) or higher |
| * HSQLDB library (http://www.hsqldb.org) | * HSQLDB library (http://www.hsqldb.org) | ||
| * Database and SQL skills | * Database and SQL skills | ||
| Line 20: | Line 20: | ||
| * Client | * Client | ||
| * Server | * Server | ||
| - | * [[#create_a_work_screen|Creation of a Workscreen]] | + | * [[#create_a_workscreen|Creation of a Workscreen]] |
| * [[#create_database|Use of a HyperSQL Database]] | * [[#create_database|Use of a HyperSQL Database]] | ||
| Line 114: | Line 114: | ||
| </server> | </server> | ||
| </file> | </file> | ||
| - | The server does not need any special parameters for our application. \\ \\ For the client, we now need a class of type ''javax.rad.application.IApplication''. A standard implementation of JVx is implemented via ''com.sibvisions.rad.application.Application''. We then derive our client from it and thereby create a class in the directory ''src.client'' with the following source code: | + | The server does not need any special parameters for our application. \\ \\ For the client, we now need a class of type ''jvx.rad.application.IApplication''. A standard implementation of JVx is implemented via ''com.sibvisions.rad.application.Application''. We then derive our client from it and thereby create a class in the directory ''src.client'' with the following source code: |
| <file java FirstApplication.java> | <file java FirstApplication.java> | ||
| package apps.firstapp; | package apps.firstapp; | ||
| - | import javax.rad.application.genui.UILauncher; | + | import jvx.rad.application.genui.UILauncher; |
| - | import javax.rad.remote.IConnection; | + | import jvx.rad.remote.IConnection; |
| import com.sibvisions.rad.application.Application; | import com.sibvisions.rad.application.Application; | ||
| Line 127: | Line 127: | ||
| /** | /** | ||
| * First application with JVx, Enterprise Application Framework. | * First application with JVx, Enterprise Application Framework. | ||
| - | * <p/> | + | * |
| * @author René Jahn | * @author René Jahn | ||
| */ | */ | ||
| Line 139: | Line 139: | ||
| * Creates a new instance of <code>FirstApplication</code> with a technology | * Creates a new instance of <code>FirstApplication</code> with a technology | ||
| * dependent launcher. | * dependent launcher. | ||
| - | * <p/> | + | * |
| * @param pLauncher the technology dependent launcher | * @param pLauncher the technology dependent launcher | ||
| + | * @throws Exception if initialization fails | ||
| */ | */ | ||
| - | public FirstApplication(UILauncher pLauncher) | + | public FirstApplication(UILauncher pLauncher) throws Exception |
| { | { | ||
| super(pLauncher); | super(pLauncher); | ||
| Line 218: | Line 219: | ||
| package apps.firstapp; | package apps.firstapp; | ||
| - | import javax.rad.application.genui.UILauncher; | + | import jvx.rad.application.genui.UILauncher; |
| - | import javax.rad.genui.UIImage; | + | import jvx.rad.genui.UIImage; |
| - | import javax.rad.genui.component.UIButton; | + | import jvx.rad.genui.component.UIButton; |
| - | import javax.rad.genui.container.UIToolBar; | + | import jvx.rad.genui.container.UIToolBar; |
| - | import javax.rad.genui.menu.UIMenu; | + | import jvx.rad.genui.menu.UIMenu; |
| - | import javax.rad.genui.menu.UIMenuItem; | + | import jvx.rad.genui.menu.UIMenuItem; |
| - | import javax.rad.remote.IConnection; | + | import jvx.rad.remote.IConnection; |
| import com.sibvisions.rad.application.Application; | import com.sibvisions.rad.application.Application; | ||
| Line 231: | Line 232: | ||
| /** | /** | ||
| * First application with JVx, Enterprise Application Framework. | * First application with JVx, Enterprise Application Framework. | ||
| - | * <p/> | + | * |
| * @author René Jahn | * @author René Jahn | ||
| */ | */ | ||
| Line 243: | Line 244: | ||
| * Creates a new instance of <code>FirstApplication</code> with a technology | * Creates a new instance of <code>FirstApplication</code> with a technology | ||
| * dependent launcher. | * dependent launcher. | ||
| - | * <p/> | + | * |
| * @param pLauncher the technology dependent launcher | * @param pLauncher the technology dependent launcher | ||
| */ | */ | ||
| Line 339: | Line 340: | ||
| package apps.firstapp.frames; | package apps.firstapp.frames; | ||
| - | import javax.rad.genui.container.UIGroupPanel; | + | import jvx.rad.genui.container.UIGroupPanel; |
| - | import javax.rad.genui.container.UIInternalFrame; | + | import jvx.rad.genui.container.UIInternalFrame; |
| - | import javax.rad.genui.control.UITable; | + | import jvx.rad.genui.control.UITable; |
| - | import javax.rad.genui.layout.UIBorderLayout; | + | import jvx.rad.genui.layout.UIBorderLayout; |
| - | import javax.rad.remote.AbstractConnection; | + | import jvx.rad.remote.AbstractConnection; |
| - | import javax.rad.remote.MasterConnection; | + | import jvx.rad.remote.MasterConnection; |
| import com.sibvisions.rad.application.Application; | import com.sibvisions.rad.application.Application; | ||
| Line 352: | Line 353: | ||
| /** | /** | ||
| * A simple database table editor. | * A simple database table editor. | ||
| - | * <p/> | + | * |
| * @author René Jahn | * @author René Jahn | ||
| */ | */ | ||
| Line 379: | Line 380: | ||
| /** | /** | ||
| * Creates a new instance of DBEditFrame for a specific application. | * Creates a new instance of DBEditFrame for a specific application. | ||
| - | * <p/> | + | * |
| * @param pApp the application | * @param pApp the application | ||
| * @throws Throwable if the remote access fails | * @throws Throwable if the remote access fails | ||
| Line 395: | Line 396: | ||
| /** | /** | ||
| * Initializes the model. | * Initializes the model. | ||
| - | * <p/> | + | * |
| * @throws Throwable if the initialization throws an error | * @throws Throwable if the initialization throws an error | ||
| */ | */ | ||
| Line 417: | Line 418: | ||
| /** | /** | ||
| * Initializes the UI. | * Initializes the UI. | ||
| - | * <p/> | + | * |
| * @throws Exception if the initialization throws an error | * @throws Exception if the initialization throws an error | ||
| */ | */ | ||
| Line 489: | Line 490: | ||
| /** | /** | ||
| * Opens the edit screen. | * Opens the edit screen. | ||
| - | * <p/> | + | * |
| * @throws Throwable if the edit frame can not be opened | * @throws Throwable if the edit frame can not be opened | ||
| */ | */ | ||
| Line 519: | Line 520: | ||
| /** | /** | ||
| * The LCO for the application. | * The LCO for the application. | ||
| - | * <p/> | + | * |
| * @author René Jahn | * @author René Jahn | ||
| */ | */ | ||
| Line 541: | Line 542: | ||
| /** | /** | ||
| * The LCO for the session. | * The LCO for the session. | ||
| - | * <p/> | + | * |
| * @author René Jahn | * @author René Jahn | ||
| */ | */ | ||
| Line 589: | Line 590: | ||
| package apps.firstapp.frames; | package apps.firstapp.frames; | ||
| - | import javax.rad.persist.IStorage; | + | import jvx.rad.persist.IStorage; |
| import com.sibvisions.rad.persist.jdbc.DBStorage; | import com.sibvisions.rad.persist.jdbc.DBStorage; | ||
| Line 597: | Line 598: | ||
| /** | /** | ||
| * The LCO for the DBEdit WorkScreen. | * The LCO for the DBEdit WorkScreen. | ||
| - | * <p/> | + | * |
| * @author René Jahn | * @author René Jahn | ||
| */ | */ | ||
| Line 645: | Line 646: | ||
| The following steps should take place to create and start a HyperSQL DB. | The following steps should take place to create and start a HyperSQL DB. | ||
| - | * Copy the HyperSQL JDBC-Driver (hsqldb.jar) to the directory \\ ''../JVxFirstApp/libs/server/' | + | * Copy the HyperSQL JDBC-Driver (''hsqldb.jar'') to the directory ''../JVxFirstApp/libs/server/'' |
| * Add the JDBC-Driver to the CLASSPATH of the JVxFirstApp Project | * Add the JDBC-Driver to the CLASSPATH of the JVxFirstApp Project | ||
| * Create a database with the alias firstappdb and the following table: \\ <file sql>create table CONTACTS | * Create a database with the alias firstappdb and the following table: \\ <file sql>create table CONTACTS | ||
| Line 667: | Line 668: | ||
| {{:jvx:app_finished.png?nolink|}} | {{:jvx:app_finished.png?nolink|}} | ||
| - | The source code and the Eclipse project can be found in the [[https://www.sibvisions.com/en/jvxmdownload|Download]] section. | + | The source code and the Eclipse project can be found in the [[jvx:example_applications|Download]] section. |
