GithubHelp home page GithubHelp logo

Comments (14)

MichaelErichsen avatar MichaelErichsen commented on June 15, 2024

The mock-up contains a functioning separation between data access,
business logic, communication logic, and user interface, which is
already implementing both running client/server and single-machine,
implementing the thoughts of Nils, and which have been tested by him. It
will of course need refinement along the way.

I will build a template for Laney and rewrite the documentation, so you
can write your part to be plugged into the skeleton. If I am lucky it
can be done in about a week's time.

from hre--history-research-environment.

RobinLamacraft avatar RobinLamacraft commented on June 15, 2024

from hre--history-research-environment.

MichaelErichsen avatar MichaelErichsen commented on June 15, 2024

Just a general comment on data formats, which in and around HRE could be XML, JSON, H2, CSV, unstructured, or Java/Eclipse preference files.

We have earlier discussed preferring JSON to XML as the trend has clearly gone this way.

For properties/preferences in the HRE application the internal representation is a properties/preferences file, which is maintained by the Eclipse platform. From the user side it is maintained in Preferences pages. So the operations and API is already provided by the platform:

http://www.myerichsen.net/HRE/Shot1.png
http://www.myerichsen.net/HRE/Shot2.png
http://www.myerichsen.net/HRE/Shot3.png

Definitions to be imported into HRE could be any format appropriate to other systems producing them.

That could be a installation configuration file, perhaps?

This what the HRE skeleton produces right now:

CSMODE=DIRECT
DBNAME=C:\Users\michael\Test1
H2TRACELEVEL=INFO
HELPSYSTEMPORT=8000
LOGLEVEL=INFO
SERVERADDRESS=127.0.0.1:8000
SERVERPORT=8001
TLS=true
UPDATESITE=http://www.myerichsen.net/HRE/update
USERID=sa
eclipse.preferences.version=1
project.0.lastupdated=2000-01-01 01:01:01
project.0.localserver=LOCAL
project.0.name=HRE
project.0.path=c:/client/temp/HRE
project.0.summary=This is the default project
project.1.lastupdated=2018-06-12 12:49:09
project.1.localserver=LOCAL
project.1.name=Test 1 Name
project.1.path=Test1.h2.db
project.1.summary=This project is the first test project, which might be useful - or perhaps not
projectcount=2

The preferences are persisted by Eclipse in

<HRE_home>\workspace.metadata.plugins\org.eclipse.core.runtime.settings\org.historyresearchenvironment.client.prefs

and are not expected to be read or written by the user.

Michael

from hre--history-research-environment.

RobinLamacraft avatar RobinLamacraft commented on June 15, 2024

from hre--history-research-environment.

MichaelErichsen avatar MichaelErichsen commented on June 15, 2024

Hi Robin

I am not aware of such a size limitation in JSON. Is there anything which I have failed to see? The JSON support in the mock up is coded using org.json Java classes, and I don't find any limitations there.

Br. Michael

from hre--history-research-environment.

RobinLamacraft avatar RobinLamacraft commented on June 15, 2024

from hre--history-research-environment.

MichaelErichsen avatar MichaelErichsen commented on June 15, 2024

Hi Robin

For this purpose I would choose .csv (comma separated values). First, it is directly importable in spreadsheets and other databases, and secondly, H2 includes native functionality to import and export csv. I have already implemented that in the table csv import and export functionality in the DBADMIN and now in the skeleton.

Code samples from https://github.com/History-Research-Environment/HRE--History-Research-Environment/blob/develop/HRE--History-Research-Environment/org.historyresearchenvironment/bundles/org.historyresearchenvironment.client/src/org/historyresearchenvironment/databaseadmin/parts/H2TableNavigator.java:

final Csv csvFile = new Csv();
csvFile.setFieldSeparatorWrite(",");
csvFile.write(fileName, rs, "UTF-8");

and

final H2TableProvider provider = new H2TableProvider(tableName);
rowCount = provider.importCsv(fileName);

Br Michael

from hre--history-research-environment.

RobinLamacraft avatar RobinLamacraft commented on June 15, 2024

from hre--history-research-environment.

MichaelErichsen avatar MichaelErichsen commented on June 15, 2024

Hi Robin

I only suggested csv for database and table import and export, using H2 features.
For properties I would suggest java properties files.
As you can see above I am using two levels for project definitions. Such a naming scheme would also fit three levels.

Br , Michael

from hre--history-research-environment.

MichaelErichsen avatar MichaelErichsen commented on June 15, 2024

Have started pulling the parts for a sample together.
Added a menu item to start the embedded HRE server.
Added a sample H2 VIEW definition in the NewDatabaseProvider class.

from hre--history-research-environment.

MichaelErichsen avatar MichaelErichsen commented on June 15, 2024

Class SampleView in package org.historyresearchenvironment.dataaccess generated from H2 VIEW using JPA.

from hre--history-research-environment.

MichaelErichsen avatar MichaelErichsen commented on June 15, 2024

Finished and uploaded to Github.

from hre--history-research-environment.

MichaelErichsen avatar MichaelErichsen commented on June 15, 2024

Will be uploaded as build 0.1.0.201807152107

from hre--history-research-environment.

MichaelErichsen avatar MichaelErichsen commented on June 15, 2024

Closed with build 0.1.0.201807160730.

from hre--history-research-environment.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.