ObjoJRDC lets Objo desktop apps use a database through Erel's' jRDC server, the remote database connector many B4X developers already run. It's written in pure Objo, uses the same wire format as the B4X clients, and needs no plugins.
Why?
Connecting every client directly to MySQL means database passwords on every PC, SQL hard-coded in the apps, and an open database port. jRDC puts a small Java server in between:
- only the server holds the credentials
- clients can run only named commands defined in config.properties
- clients talk HTTP to a single port
Objo apps couldn't talk to jRDC until now. ObjoJRDC came out of porting a production B4J app to Objo. The existing jRDC server and its SQL commands stay unchanged, and B4X and Objo clients work side by side.
Features
- Protocol jRDC2 v2 and v3
- Blocking and Async/Await API; the window stays responsive while queries run
- Simple high-level calls: GetRecordAsync, InsertUpdateRecordAsync, InsertUpdateBlobAsync
- Never throws: errors come back as readable messages (network, SQL error text from the server, cancelled)
- Automatic retries on network errors, plus cancellation
- BLOB upload and download (e.g. pictures via ToPNG / Picture.FromBytes)
- Wire-compatible port of B4XSerializator, also usable on its own
- Native zlib via Objo's Compression module
- One call to fill a ListBox from a result
Var client As New DBClient("192.168.1.10", 17178, 2)
Var params() As Object = ["%"]
Var a As DBAnswer = Await client.GetRecordAsync("my_query_name", params)
If a.Success Then DBUI.FillListBox(ListBox1, a.Data) Else MessageBox(a.Error)
What's included: an Objo Studio solution with a demo window, 12 offline unit tests (they run with objo test, no server needed), and a full README. The README covers server setup with an example config.properties, data types, troubleshooting and security notes.
Requirements: Objo Studio 26.10.5 or newer and a jRDC2 server (B4J/Java).
Feedback and bug reports are welcome.
jRDC and B4X are by Erel Uziel / Anywhere Software.
ObjoJRDC is an independent client.