How chrisflow20/dbsch-rebuild-03 works
Project Type and Purpose
• This is a monolithic Java desktop application (com.wisecoders.dbs) that provides both a CLI and a rich JavaFX UI for exploring, designing, synchronizing, scripting, generating data for, and reverse‐engineering database schemas.
High-Level Architecture Layers
• UI Layer
• CLI Module: com.wisecoders.dbs.dbs.cli – uses a Console, Completers and Command classes (Command Pattern).
• Application / Controller Layer
• Controllers and Tasks: e.g. FxBrowseManager, FxBrowseLoaderTask, FxGeneratorTask, FxLoaderTask, FxSyncTask, FxImportStructureTask, FxGetRenewedLicenseTask…
• Scripting Controllers: wrapper classes for Groovy, Python, JavaScript (JSR-223) under cli/command/groovy, cli/command/python, scripting/actions.
• Domain Model Layer
• Schema Model: com.wisecoders.dbs.schema.* – tables, columns, relations, generators, layouts, projects, scripts.
• Data Model: com.wisecoders.dbs.data.model.* – results, execution plans, groovy bindings, loader metadata.
• Config Model: com.wisecoders.dbs.config.model.*, com.wisecoders.dbs.config.system.*.
• Service / Engine Layer
• DBMS Connectivity & Drivers: com.wisecoders.dbs.dbms.connect.model, dbms.driver.model, dbms.plugins.* (Plugin Pattern for each RDBMS/NoSQL).
• Loader Engine: com.wisecoders.dbs.loader.engine.* for CSV/Excel/JSON/XML.
• Generator Engine: com.wisecoders.dbs.generator.engine.* – data generators for sequences, JSON, RegEx, foreign keys, etc.
• Query Engine: com.wisecoders.dbs.query.model.engine.*.
• Synchronization Engine: com.wisecoders.dbs.dbms.sync.engine.* – diff and operation generators.
• Reverse-Engineering Engine: com.wisecoders.dbs.dbms.reverseEngineer.*.
• Persistence / Store Layer
• Project Store: XML-based storage under com.wisecoders.dbs.project.store + schema.store, convert.store, governance.store, generator.store.
• Browse Store: BrowseMongoStore, BrowseSQLStore.
• Driver & Connector Store: com.wisecoders.dbs.dbms.driver.store, dbms.schema.store, cli console properties files.
• Preferences & Encryption: com.wisecoders.dbs.project.store.Pref, Encrypter, CipherUtil.
External Interactions
• JDBC / MongoDB / NoSQL through dbms.plugins.* and envoy model.
• File system (open/save projects, load scripts, CSV/Excel loader).
• JSR-223 Scripting VMs: Groovy, Jython (Python), Nashorn (JavaScript).
• HTTP for license checks and updates (com.wisecoders.dbs.sys.fx.CheckForUpdatesTask, com.wisecoders.dbs.dbms.reverseEngineer.tasks.FxGetRenewedLicenseTask).
• Git via dialogs/git and JSch.
• Email (newsletter send/read) and SSH tunnels under CLI.
Architectural Patterns and Principles
• MVC / MVP for JavaFX UI (separate FXML-like Pane classes, Controllers, Domain).
• Command Pattern in CLI (Command interface, command registry).
• Plugin Pattern for database drivers.
• Factory and Builder for loader/generator engines.
• Background Tasks for long-running operations in FX (Fx*Task extends Task).