{"id":19758628,"url":"https://github.com/alvarogarcia7/gilded-rose-kata-java","last_synced_at":"2026-05-18T15:36:26.074Z","repository":{"id":69480728,"uuid":"98724198","full_name":"alvarogarcia7/gilded-rose-kata-java","owner":"alvarogarcia7","description":"Practicing the Gilded Rose kata in java","archived":false,"fork":false,"pushed_at":"2017-08-04T12:56:01.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-08T15:02:50.944Z","etag":null,"topics":["analogy","architect","atdd","emily-bache","gildedrose","golden-master","java","kata","legacy","legacy-code","make","makefile","maven","mvn","refactoring","refactoring-exercise","refactoring-kata","technical-notes","travis-ci","ubiquitous-language"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alvarogarcia7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-29T09:59:41.000Z","updated_at":"2017-08-04T12:59:13.000Z","dependencies_parsed_at":"2023-03-27T11:48:26.866Z","dependency_job_id":null,"html_url":"https://github.com/alvarogarcia7/gilded-rose-kata-java","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alvarogarcia7/gilded-rose-kata-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarogarcia7%2Fgilded-rose-kata-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarogarcia7%2Fgilded-rose-kata-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarogarcia7%2Fgilded-rose-kata-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarogarcia7%2Fgilded-rose-kata-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvarogarcia7","download_url":"https://codeload.github.com/alvarogarcia7/gilded-rose-kata-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarogarcia7%2Fgilded-rose-kata-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33183154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analogy","architect","atdd","emily-bache","gildedrose","golden-master","java","kata","legacy","legacy-code","make","makefile","maven","mvn","refactoring","refactoring-exercise","refactoring-kata","technical-notes","travis-ci","ubiquitous-language"],"created_at":"2024-11-12T03:25:19.559Z","updated_at":"2026-05-18T15:36:26.057Z","avatar_url":"https://github.com/alvarogarcia7.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gilded Rose kata\n\nPracticing [Emily Bache][emilybache]'s [Gilded Rose][gildedrose] kata\n\n## Technical notes\n\nThis is the process used to reach the current state:\n\n  * I've created a golden master testing strategy for the existing features\n  * Break the dependencies to `GildedRose`, pushing behavior down to the newly-created objects\n  * Follow TDD to add the new feature (`Conjured Item` support)\n  * Do not add more unit test coverage, as there is no request for further user stories/business features*\n\n### Protecting the Item\n\nAs the `Item` class cannot be modified, I've created a wrapper to push the behavior to the new class.\n\n### Separating the rules\n\nIn the current solution, the behavior related to updating quality lives in the `domain.Item` class and its children.\n\nThis can be seen as a `Rule` and a `Rule Engine` pattern: the `domain.Item` (plus children) are the `Rule`s and the `Factory::build` is the `Rule Engine`\n\nEach rule is autonomous on how to apply itself. The rule itself indicates whether there is a match or not (using an `Option`). The rule engine just iterates through them until a match is found. Therefore, the order of the rules matters\n\n### Using factories\n\nUsing factories (or named constructors) instead of normal constructors has been a great success. \n\nBy contract, the constructor MUST return an instance of the class, but a named constructor MUST return an instance of the class or any children (covariant)\n\n### Project as a legacy codebase\n\nI've decided to handle this refactoring kata as a legacy codebase and do not add unit tests for the existing behavior. \n\nFor the new behavior, on the other hand, it's now easy to create unit tests, follows a request from business to expand the behavior, so I've added unit tests\n\n### Ubiquituous language\n\nThe `ItemProductionCenter` is where `Item`s are produced\n\n### The role of the `Architect`\n\nI've tried to find abstractions for those who decide when to build: `Architect`. They decide when a `Builder` pattern should be used\n\n\n[gildedrose]: https://github.com/emilybache/GildedRose-Refactoring-Kata/tree/master/Java\n[emilybache]: https://github.com/emilybache\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarogarcia7%2Fgilded-rose-kata-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvarogarcia7%2Fgilded-rose-kata-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarogarcia7%2Fgilded-rose-kata-java/lists"}