It looks like today's task is to get the meal plan section going. My hope is that with my pre-designed GUI skeleton and the practice I've gotten working with the myriad of Recipe classes that this section will go quickly and smoothly. I guess it's time to find out!
Okay, first point. I've already mentioned that I wish I had written interfaces and coded to the interfaces so I would always remember the methods I need. I'm hitting that again with the meal plans as I now have to look at my recipe classes to try to remember what methods I need. Another point that I may have mentioned before is that it's handy to have code to determine a new object's database ID. My original plan was to do so but I had changed it (by accident - I forgot!) to just write to the database and then search for the new object to get its ID. Yeah, it's way easier to determine what that ID should be ahead of time. I'm definitely using this approach for all the meal planner classes.
Oy, another bit of a snag! I wrote most of the important methods for the Meal class and am working on the ones for the Daily Plans and then Meal Plans, but guess what I need for testing and don't have... that's right, recipes. And as you'll note in a previous post, I have some bugs to track down in the recipe builder. That and I wrote the SQL scripts to do a cleanup of the database and it takes a ton of SQL coding to build a single recipe. Perhaps I overreacted. I can just make a bunch of BS ones by taking my eggplant recipe and adding digits to it. Yeah, that will work for testing.
It's taken a number of hours today, but I have entered all the database interactions and whatnot for the meals, daily plans, and meal plans. I haven't been able to test them because I need some fodder for testing and am thinking it will be easier to create fodder if I implement the rest of the GUI first. Probably not my best plan, but I really want to be done with this project.
Aside from being uncertain if my various methods will work, I've discovered two potentially life-shattering issues. First off, when coding for the daily plans and meal plans, I'm afraid I may have hit a circular bit of logic. The meal plans contain a list of the daily plans involved and the daily plans contain the meal plan they belong to. I'm not sure if this is going to turn into a cluster when I try to update one master list and it requires entries from the other master list. Perhaps I'm being paranoid about it and it will work after all, so I'm still hoping. If not, throw another problem on the debug file!
The other concern I have involves dates. I think I've zeroed in on working code to pull them from the database and put them back into the database. However, I didn't think about how the use was going to put them into the form for the database. Trying to parse user input for dates doesn't seem like a particularly winning idea. I guess I was just imagining a date picker GUI piece and didn't realize Java doesn't have one natively. I'm going to search around and see if anyone has an implementation they're willing to share...
So a search for pre-built date modules came up with some solutions, but I really don't know how to import the libraries and then use them. I think my knowledge of Java Swing is still too rudimentary to be able to plug in custom components outside of the NetBeans IDE. It's a shame but perhaps it should be a version 2.0 issue and I should go with a rudimentary date entry field. Yeah, I think I'll do that and see what happens.
Write the Recipe Builder update logicWrite the Recipe Builder delete logicWrite the HTML builder for RecipesWrite the database interaction methods for the Meal, Meal Plan, and Daily Plan classes- Update the meal planner tab based on the successes and failures of number 4
- Write the GUI logic for the meal planner tab (all three interaction methods)
- Write randomizer logic for meal plans
- Design GUI for meal plan randomizer
- Design GUI for shopping lists
- Design logic for shopping lists
- Design printer control for shopping lists and meal plans
- Write Capstone Project Paperwork and submit it.
- CELEBRATE!!!!!!!! (when I pass, anyway)
No comments:
Post a Comment