Colby-CPU-Sim / CPUSim

GNU General Public License v3.0
53 stars 19 forks source link

Separate Model and UI #31

Open Nava2 opened 8 years ago

Nava2 commented 8 years ago

Extract the model from the user interface package into subprojects. This allows for easier use of the model without the JFX UI and easier upgrading later.

Nava2 commented 7 years ago

This issue has been an adventure, that I'm not done yet. I've ended up refactoring a lot of the model to DRY it up and expose it in different ways.

I'll have to produce a better summary than this, but I'm almost ready to have a PR. That being said, I'm concerned about the amount if bugs introduced and will need help testing.

You can see the progress work here: https://github.com/Colby-CPU-Sim/CPUSimFX2015/compare/master...Nava2:excise-model

Most of the work has been adding Types to Non-specified generic code that is within the model (which then translates to the UI..). Additionally, extracting common behaviour into interfaces and utilizing some OO-style relationships to share the functionality. For example, there was ~8 implementations of createUniqueName() that were all the exact same.

Also, I will be doing this via multiple PRs, there's way too much in that branch for one single request.

djskrien commented 7 years ago

We can help debug it when you submit the PR. I've skimmed some of your changes and they look very appropriate. Parts of CPU Sim are showing their age.

Nava2 commented 7 years ago

Sounds great, thanks for looking. I appreciate that. I'm hoping to be done the "refactoring" by this week.