| Seeds keeper |
|
|
| Home | Bank statement viewer | Simple library | Text editor | Editor library | CMS | Programming language interpreter | Game "Aspen Forest" | Seeds keeper | Blog |
|
|
|
Java (11), JavaFX (Tabbed document interface), DBMS Apache Derby My wife gave me the idea for this app. She grows tomatoes, peppers, and other plants as a hobby. She buys packets of seeds and grows a few plants of each variety. Often, she has leftover seeds, and sometimes we buy a variety but can't plant it that season. We're programmers, not farmers, and we have very little space to grow tomatoes. So, she accumulated several thousand packets of seeds, and we need to track them on our computer. A spreadsheet is impossible: the plant photos alone take up over 10 GB. A spreadsheet would do the job, but it would be incredibly slow. So my wife came up with a program to track these thousands of packets. And I need to practice with the database (Apache Derby), try out a development new type of user interface (Tabbed document interface), a new UI development kit (JavaFX), and figure out how to create such a program in a few thousand lines. At the same time, the conciseness of the code must not compromise the user interface and the necessary functionality. Eclipse was used for development. The project is located here: https://github.com/weekend-game/seedskeeper/ (EN) and here: https://gitflic.ru/project/weekend-game/seedskeeper/ (RU). |
| How to run the program |
|
Download the repository to your computer. Everything you need for the program is located in the app folder. Navigate to the app folder and run the program by double-clicking the SeedsKeeper.jar file or, if the program doesn't start, double-click the SeedsKeeper.bat file. If the program doesn't start, download and install Java 11 or later and repeat the steps above. |
| How to open a project in Eclipse |
In Eclipse, select "Import..." from the "File" menu. In the window that opens, select "Existing projects into workspace." Navigate to the folder with the downloaded repository and click "Finish." The project will open in Eclipse. In the Package Explorer (on the left side of the screen), double-click the SeedKeeper.java file. The file will open for editing (in the center of the screen). Run the program by pressing Ctrl+F11 or using your preferred method for running programs in Eclipse. |
I should note that this project will require several third-party libraries. That's why I decided to create a Maven project rather than just an Eclipse project. The project is already created, so you don't need to create anything else, unless you're working on a new project. But I'll describe it just in case. |
| How to Create a Maven Project in Eclipse |
Select File – New – Maven Project from the menu. The "New Maven Project" window will appear. |
Check the "Create a simple project" checkbox. |
Uncheck the "Use default Workspace location" checkbox and specify the project folder in the "Location" field. For example: C:\Dropbox\Weekend game\SeedsKeeper. Click "Next". |
On the next page, specify: Artifact Id: SeedsKeeper Version: 0.1.0 Packaging: jar Name: SeedsKeeper Description: Accounting of seeds |
Click "Finish". |
A SeedsKeeper folder will be created in the C:\Dropbox\Weekend game\ folder, and the project files will be placed there. |
Eclipse creates the project for Java 8. At least, that's how it worked for me. To use Java 11, open the project properties window and, on the "Java Build Path" page, in the "Libraries" tab, remove the "JRE System Library [JavaSE-1.8]" line. On the right, click the Add library... button, select JRE System Library, click the "Execution environment" radio button, and select the desired version of "Java (11.0.10)." Then, add all the necessary dependencies to the pom.xml file.
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11.0.2</version>>
</dependency>
...
</dependencies>
|
| DBMS |
|
Choosing a DBMS When choosing a DBMS, I considered the following:
I chose Apache Derby. A large amount of high-quality documentation on this DBMS can be found on the Derby website. But to create a seed tracking application, I needed the following. Installing Derby requires:
Creating and Working with a Database
Don't forget to include the ; after each command. The application's interaction with the database will be based on JDBC. I don't see any point in using an ORM, such as Hibernate, for such a simple application that will use no more than a dozen tables. |
|
|
| Home | Bank statement viewer | Simple library | Text editor | Editor library | CMS | Programming language interpreter | Game "Aspen Forest" | Seeds keeper | Blog |
|
See my projects at https://github.com/weekend-game (EN) or https://gitflic.ru/user/weekend-game (RU). Please write to me at weekend_game@mail.ru |