Trace:
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
jvx:reference [2020/06/15 09:03] cduncan [MetaData] |
jvx:reference [2020/06/15 09:50] cduncan [Anatomy of a remote JVx application] |
||
---|---|---|---|
Line 667: | Line 667: | ||
===== Usage Example ===== | ===== Usage Example ===== | ||
- | Here is a simple example of a ''%%MemDataBook%%'', an ''%%IDataBook%%'' implementation which only operates in memory: | + | Here is a simple example of a ''%%MemDataBook%%'', an ''%%IDataBook%%'' implementation that only operates in memory: |
<code java> | <code java> | ||
Line 716: | Line 716: | ||
* Binary Data | * Binary Data | ||
- | Text and binary data are both objects (arrays of primitives are objects after all) and numbers are either primitives or objects. Most of the time, if we deal with numbers inside a database, we want them to be of arbitrary precision, which means we must represent them as ''%%BigDecimal%%''. Supporting ''%%double%%'' or ''%%float%%'' in these cases would be dangerous because one might write a ''%%float%%'' into the database [[https://en.wikipedia.org/wiki/Floating-point_arithmetic|which might or might not end up with the correct value]] in the database. To completely eliminate such problems, we only support objects, which means that one is “limited” to the usage of number extensions like ''%%BigLong%%'' and ''%%BigDecimal%%'', which do not suffer from such problems. | + | Text and binary data are both objects (arrays of primitives are objects after all) and numbers are either primitives or objects. Most of the time, if we deal with numbers inside a database, we want them to be of arbitrary precision, which means we must represent them as ''%%BigDecimal%%''. Supporting ''%%double%%'' or ''%%float%%'' in these cases would be dangerous because one might write a ''%%float%%'' into the database [[https://en.wikipedia.org/wiki/Floating-point_arithmetic|, which might or might not end up with the correct value]] in the database. To completely eliminate such problems, we only support objects, which means that one is “limited” to the usage of number extensions like ''%%BigLong%%'' and ''%%BigDecimal%%'', which do not suffer from such problems. |
==== Where Are the Data Pages? ==== | ==== Where Are the Data Pages? ==== | ||
Line 786: | Line 786: | ||
====== Application Basics ====== | ====== Application Basics ====== | ||
- | Let’s talk about the basics, how a [[https://sourceforge.net/projects/jvx/|JVx]] application starts, works and how the connection strings together the client and server side. | + | Let’s talk about the basics: how a [[https://sourceforge.net/projects/jvx/|JVx]] application starts, how it works, and how the connection strings together the client and server side. |
===== Multitier Architecture ===== | ===== Multitier Architecture ===== | ||
Line 817: | Line 817: | ||
frame.eventWindowClosed().addListener(() -> System.exit(0)); | frame.eventWindowClosed().addListener(() -> System.exit(0)); | ||
</code> | </code> | ||
- | We can start to create and manipulate the GUI. In this case we are building a simple window with a label inside. Last but not least, we make sure that the JVM will exit when the window is closed. | + | We can start to create and manipulate the GUI. In this case, we are building a simple window with a label inside. Lastly, we make sure that the JVM will exit when the window is closed. |
A very good example and showcase for that is the [[https://github.com/sibvisions/jvx.kitchensink|JVx Kitchensink]]. | A very good example and showcase for that is the [[https://github.com/sibvisions/jvx.kitchensink|JVx Kitchensink]]. | ||
- | That’s it. That is the most simple way to start a [[https://sourceforge.net/projects/jvx/|JVx]] application. We can use all controls, and we can use ''%%MemDataBook%%''s without any problem or limitation. Best of all, we can simply switch to another technology by using another factory. | + | That’s it! That is the most simple way to start a [[https://sourceforge.net/projects/jvx/|JVx]] application. We can use all controls, and we can use ''%%MemDataBook%%''s without any problem or limitation. Best of all, we can simply switch to another technology by using another factory. |
- | ===== Anatomy of a remote JVx application ===== | + | ===== Anatomy of a Remote JVx Application ===== |
- | Of course [[https://sourceforge.net/projects/jvx/|JVx]] wouldn’t be that useful if it would just provide static GUI components. Now, to explain what else is required for a remote [[https://sourceforge.net/projects/jvx/|JVx]] application I have to go far afield, so let’s head down the rabbit hole. | + | Of course, [[https://sourceforge.net/projects/jvx/|JVx]] wouldn’t be that useful if it would just provide static GUI components. Now, to explain what else is required for a remote [[https://sourceforge.net/projects/jvx/|JVx]] application, I have to go far afield, so let’s head down the rabbit hole. |
{{:jvx:reference:jvx-client-server.png?nolink| Layers}} | {{:jvx:reference:jvx-client-server.png?nolink| Layers}} | ||
- | 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 databook 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 a database ==== | ==== DBAccess, accessing a database ==== |