Friday, March 14, 2014

DietOnJava - JavaFX desktop app

Well, this is my project and this post is an overview of it, I'll explain the basics although it's pretty straightforward as you can tell from the GUI.

I'm making an application for a friend of mine, he's a dietitian and asked me if I could make him an app to create diet programs for his clients. Yes, there are many similar programs (professional ones) out there but he wanted a specific GUI and also this would be a great exercise for me, although I'm a noob Java programmer.

Do NOT expect awesome code and such, I have some experience with Java yes, but this will be my first full-application with JavaFX, GUIs, DBs etc. Also, I haven't implemented any functionality yet, I'm questioning whether I should continue like this or re-write it with another approach, you tell me.

Dev Environment:

I've started building the application on NetBeans 7.4 (now using 8 RC1), Java7 SE and Scene Builder 1.1. Scene Builder was used to create the FXML layout, it's extremely easy this way.

I have an SQLite database that holds the food data, it's a single huge table with all the data, certainly not the most optimal solution but hey, this is my first try on developing something like this.


The Main DB tableview, shows the SQLite database. The buttons below it are self-explanatory, they add, edit and delete entries from the database.

Above the tableview, the client's info are entered and you can select a picture if you like.

The tableviews to the left constitute the diet for each day, you have 5 meals for each day plus a tableview that holds the total sums for each nutrient (total water, total iron, total cholesterol etc).

Foods are added to the meals by dragging and dropping from the main database, to delete foods from the meals maybe double clicking, I'm not sure yet.

This whole screen will be saved probably to XML documents, you'll have a single XML document for each diet schedule. Or JSON, I don't know. I've found libraries that do that so it'll be easy I guess.


That's basically it. There are no "blueprints", no UML, nothing. I look at the GUI and try to see what needs to be done. Since it's object interaction, it's kind of clear what I need to implement.

I haven't worked on the application for a couple of months due to uni exams, I'm really excited to pick it up again but I'm debating whether I'm on the right thought process or not.

ANY kind of feedback would be extremely helpful, I'm here to learn anyway. I have the project on GitHub under a Creative Commons license so feel free to take a look at my (now quite nonexistent code).

Tuesday, March 4, 2014

Και στ' Αγγλικά παρακαλώ...

Δεν ξέρω από πότε ακριβώς αλλά κάποια posts περί προγραμματισμού θα γράφονται στ' αγγλικά από δω και πέρα.

Είτε θα είναι σε φάση tutorial είτε σαν απλό post, θα τα γράφω στ' αγγλικά γιατί σκοπεύω να έχω πάρε δώσε με κάποια άτομα και είναι καλό να υπάρχουν blog posts για προγραμματισμό.

Αρχικά η σκέψη ήταν να φτιάξω ένα δεύτερο blog καθαρά γι' αυτό το σκοπό, δεν υπάρχει λόγος όμως, κι αυτό το blog μια χαρά την κάνει τη δουλειά του.

See ya later!