Documentation

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
jvx:reference [2020/06/15 09:50]
cduncan [Anatomy of a remote JVx application]
jvx:reference [2020/06/15 09:56]
cduncan [What is it?]
Line 584: Line 584:
 This example demonstrates how a simple launcher is implemented and why it is necessary to have a launcher in the first place. Compared with the “[[#​jvx|JVx]] are of course a lot more complex than these examples, that is because they implement all the required functionality and also take care of a lot of boiler plate operations. It is taking care of all technology specific code and allows to keep your application free from knowing about the platform it runs on. This example demonstrates how a simple launcher is implemented and why it is necessary to have a launcher in the first place. Compared with the “[[#​jvx|JVx]] are of course a lot more complex than these examples, that is because they implement all the required functionality and also take care of a lot of boiler plate operations. It is taking care of all technology specific code and allows to keep your application free from knowing about the platform it runs on.
  
-====== ​Data Books ======+====== ​Databooks ​======
  
-Let’s talk about data books, which allow access to data without any effort.+Let’s talk about databooks, which allow access to data without any effort.
  
 ===== What is it? ===== ===== What is it? =====
  
-DataBooks ​are an active model, which allow you to directly query and manipulate the data. Contrary to many other systems, [[https://​sourceforge.net/​projects/​jvx/​|JVx]] does not map the data into objects, but allows you to directly access it in a table-like fashion exposing columns, rows, and values.+Databooks ​are an active model that allow you to directly query and manipulate the data. Contrary to many other systems, [[https://​sourceforge.net/​projects/​jvx/​|JVx]] does not map the data into objects, but allows you to directly access it in a table-like fashion exposing columns, rows, and values.
  
 One could say that it is like a three dimensional array with these dimensions: One could say that it is like a three dimensional array with these dimensions:
Line 831: Line 831:
 What you are seeing here is a rough sketch of how the architecture of [[https://​sourceforge.net/​projects/​jvx/​|JVx]] looks like. Let’s walk through the image step by step. We will look at each successive layer and work our way from the database on the server to the data book on the client. What you are seeing here is a rough sketch of how the architecture of [[https://​sourceforge.net/​projects/​jvx/​|JVx]] looks like. Let’s walk through the image step by step. We will look at each successive layer and work our way from the database on the server to the data book on the client.
  
-==== DBAccess, ​accessing ​database ​====+==== DBAccess, ​Accessing ​Database ​====
  
 Accessing a database is easy when using ''​%%DBAccess%%''​. All we must do is to set the [[https://​en.wikipedia.org/​wiki/​Java_Database_Connectivity|JDBC]] URL of the server and connect to it: Accessing a database is easy when using ''​%%DBAccess%%''​. All we must do is to set the [[https://​en.wikipedia.org/​wiki/​Java_Database_Connectivity|JDBC]] URL of the server and connect to it:
Line 842: Line 842:
 dbAccess.open();​ dbAccess.open();​
 </​code>​ </​code>​
-As a note, the instance returned by ''​%%getDBAccess(...)%%''​ is the database specific ''​%%DBAccess%%''​ extension, which does know how to handle its database.+As a note, the instance returned by ''​%%getDBAccess(...)%%''​ is the database-specific ''​%%DBAccess%%''​ extension, which knows how to handle its database.
  
-We can of course use ''​%%DBAccess%%''​ to directly access the database:+We canof courseuse ''​%%DBAccess%%''​ to directly access the database:
  
 <code java> <code java>
Line 853: Line 853:
 List<​Bean>​ data = dbAccess.executeQuery("​select * from SOME_TABLE"​);​ List<​Bean>​ data = dbAccess.executeQuery("​select * from SOME_TABLE"​);​
 </​code>​ </​code>​
-…or manipulate the database, ​or query information about the database ​or execute procedures or do anything else.+…or manipulate the database, query information about the databaseexecute proceduresor anything else!
  
-==== DBStorage, ​preparing ​the database access ​for databooks ​====+==== DBStorage, ​Preparing ​the Database Access ​for Databooks ​====
  
-The downside of using DBAccess is that everything must be database specific. To become database ​agnostic ​we must use ''​%%DBStorage%%''​. ''​%%DBStorage%%''​ does not care which database it is connected to and can operate on any of them:+The downside of using DBAccess is that everything must be database-specific. To become database-neutral, ​we must use ''​%%DBStorage%%''​. ''​%%DBStorage%%''​ does not care which database it is connected to and can operate on any of them:
  
 <code java> <code java>
Line 865: Line 865:
 storage.open();​ storage.open();​
 </​code>​ </​code>​
-We can use this to insert, update, delete and fetch data. Additionally the ''​%%DBStorage%%''​ does retrieve and manage the metadata of the table we’ve set, which means that we can query all column names, what type they are, we can even access the indexes and the default values. Short, the ''​%%DBStorage%%''​ leaves little to be desired when it comes to operating on a database.+We can use this to insert, update, delete and fetch data. Additionallythe ''​%%DBStorage%%''​ does retrieve and manage the metadata of the table we’ve set, which means that we can query all column names, what type they are, we can even access the indexes and the default values. Short, the ''​%%DBStorage%%''​ leaves little to be desired when it comes to operating on a database.
  
-If we query data from the ''​%%DBStorage%%''​ we receive a List of rows. The rows are are either represented as ''​%%Object%%''​ array, ''​%%IBean%%''​ or a POJO and we can easily manipulate the data, like this:+If we query data from the ''​%%DBStorage%%''​we receive a list of rows. The rows are either represented as ''​%%Object%%''​ array, ''​%%IBean%%''​or a POJOand we can easily manipulate the data, like this:
  
 <code java> <code java>
Line 876: Line 876:
 } }
 </​code>​ </​code>​
-As one can see, it looks quite familiar to the DataBook, which isn’t a coincidence. The ''​%%DBStorage%%''​ “powers” the DataBooks ​on the server side, a DataBook ​will get its data from and will send its modified data to the ''​%%DBStorage%%''​.+As one can see, it looks quite familiar to the DataBook, which isn’t a coincidence. The ''​%%DBStorage%%''​ “powers” the databooks ​on the server side, a databook ​will get its data from and will send its modified data to the ''​%%DBStorage%%''​.
  
-I’ve been using the ''​%%DBStorage%%''​ here as an example, but actually the Storage ​is not dependent on a database. ''​%%IStorage%%''​ can be implemented to provide any sort of data provider, like reading from an XML or JSON file, scraping data from a website, fetching data from a different process or reading it directly from a hardware sensor.+I’ve been using the ''​%%DBStorage%%''​ here as an example, but actually the storage ​is not dependent on a database. ''​%%IStorage%%''​ can be implemented to provide any sort of data provider, like reading from an XML or JSON file, scraping data from a website, fetching data from a different processor reading it directly from a hardware sensor.
  
 ==== Life Cycle Objects, the business objects with all the logic ==== ==== Life Cycle Objects, the business objects with all the logic ====
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information