ArtConnect Pro is a JavaFX-based management system for local art communities. It allows managing artists, artworks, exhibitions, galleries, workshops, and community members.
This project is a skeleton designed for students to practice:
- Layered Architecture: Presentation, Service, DAO, and Model layers.
- Database Persistence: Implementing JDBC DAOs to connect to a MySQL database.
- JavaFX UI: Working with FXML, TableViews, and Controllers.
com.project.artconnect.MainApp: Entry point.com.project.artconnect.model: Domain entities (POJOs/Stubs).com.project.artconnect.dao: Data Access Object interfaces.com.project.artconnect.persistence: JDBC implementations (TODO: Students implement these).com.project.artconnect.service: Business logic layer.com.project.artconnect.ui: JavaFX Controllers and FXML views.com.project.artconnect.util: Utility classes likeConnectionManagerandServiceProvider.
Requirement: Java 17+ and Maven installed.
mvn clean javafx:runThe application runs "out-of-the-box" using In-Memory Services (InMemoryArtistService, etc.) located in com.project.artconnect.service.impl. This allows immediate demonstration of the UI with dummy data.
Unlike typical database-centric skeletons, ArtConnect Pro follows strict OOP best practices:
- No Explicit IDs: Model classes (
Artist,Artwork, etc.) do not haveidfields. In Java, an object's identity is its memory address/reference, not a numeric ID. - Direct Object References: Relationships are modeled using direct references. For example, an
Artworkobject holds a reference to anArtistobject, not anartistId. - Bidirectional Links: Many relationships are bidirectional (e.g., an
Artisthas aList<Artwork>, and eachArtworkpoints back to itsArtist). - No Junction Tables: Many-to-Many relationships (like Exhibitions and Artworks) are modeled using simple collections (
List<Artwork>) rather than separate junction classes.
- ID Discovery: Students must "discover" or create IDs at the database level. Your JDBC DAOs will need to map database IDs (Primary Keys) to Java object references during the
findAllorsaveoperations. - Relational Mapping: You must implement the logic to reconstruct the object graph from relational tables. When fetching an
Artwork, you must also fetch/link the correspondingArtist. - Database Setup: Create the MySQL database and tables as per the technical requirements (including IDs and Foreign Keys that are NOT visible in the Java models).
- JDBC Implementation: Implement the
JdbcDAO classes incom.project.artconnect.persistence. - Service Swap: Update
ServiceProviderto use your newJdbcDAOs.
graph TD
UI[JavaFX Presentation Layer] --> Service[Service Layer]
Service --> DAO[DAO Interfaces]
DAO --> JDBC[JDBC Persistence Implementation]
DAO --> InMemory[InMemory Mock Implementation]
JDBC --> DB[(MySQL Database)]
- Launch the app and verify all 7 tabs show dummy data.
- Search for an artist by name or filter by discipline in the Artists Tab.
- View the "Discover" tab to see featured content dynamically generated.
- Once you implement JDBC, swap the
ServiceProviderto use yourJdbcArtistDaoand verify data is fetched from MySQL.