prmr / Creco

Recommendation System for Consumer Products
Apache License 2.0
6 stars 2 forks source link

Refactor Data API #63

Closed enewe101 closed 10 years ago

enewe101 commented 10 years ago
prmr commented 10 years ago

I'm splitting this into two issues: Refactoring and testing.

enewe101 commented 10 years ago

Question about item 3 in the description "Cleanup CategoryBuilder and move its functionality into CategoryNode:

I'm not clear on what this entails exactly. Obviously not just renaming CategoryBuilder as CategoryNode!

I think it's something along the lines of changing the relationship between Category and CategoryBuilder -- i.e. not having a call to Category's constructor right inside CategoryBuilder, but rather, in build logic outside that scope. Is there anything else that should be eliminated from the functionality in CategoryBuilder as this functionality is moved to CategoryNode?

I'll do my best here but any high-level pointers will help me produce something more in line with what you have in mind!

prmr commented 10 years ago

I don't have a clear answer. I think it's just a question of clarifying the separation of concerns between the two classes to make testing easier. It looks to me like the design of CategoryBuilder can be improved a lot, too (e.g., by finding a cleaner (non-flag) way to do the intersection).

enewe101 commented 10 years ago

So far:

enewe101 commented 10 years ago

Also:

The changes on this branch make some of the CRData testing obsolete. I'm going to tackle the issue of writing tests next.

I think this issue is ready to close. I also think I should merge with master. (All tests passing). If anyone has an issue with that let me know. Otherwise I'll be merging soon.

enewe101 commented 10 years ago

merged

mangalagb commented 10 years ago

The master branch seems to be broken. I am unable to run the application or the tests.

enewe101 commented 10 years ago

It's working fine for me. I ran the tests and did manual testing of the app before pushing. Just double checked again, and it's working. What kind of error are you getting?

prmr commented 10 years ago

Works fine for me too.

mangalagb commented 10 years ago

This is what it says "Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'siteController': Injection of autowired dependencies failed;"

mangalagb commented 10 years ago

My local copy of master seems to have been corrupted. I deleted it and pulled it freshly and all works fine now. Sorry for the trouble.

enewe101 commented 10 years ago

Weird eh? It's happened to me periodically too...