king
I'm new here

JDBC-usage in FirstSpirit module

In order to integrate JDBC (potentially O/R-mapper) logic into a FirstSpirit module properly, are there any best practices given how to do that?

Maybe:

  1. provide JDBC configuration module configuration file
  2. integrate JARs in module resources
  3. where to put the JDBC logic ideally?
  4. ...

- Is there an example given?

- Is it possible retrieve JDBC-ResultsSets and show them in the module configuration? (where should the JDBC-Code be located, on client- or server-side?)

0 Kudos
1 Reply
feddersen
Community Manager

1) use the configuration dialog, use a textfield that reads/write a file. Our sample implementations (last link on the page) contain an example for a custom configuration dialog.

2) that's covered in our module developer documentation

3) on the server. The IT infrascructure usually prevents clients from connecting to the database directly.

The logic in the configuration screen is completely up to you, so you can display JDBC-ResultsSets if you want. DAO is a common pattern to handle access to a database.

0 Kudos