# Java to Clojure: "Refactoring" refactored functionally

DevFeed: [Java to Clojure: "Refactoring" refactored functionally](<https://devfeed.tech/articles/java-to-clojure-refactoring-refactored-functionally-32156.md>)

Original publisher: [Read original article](<https://adambard.com/blog/refactoring-refactored/>)

Published: 2014-06-10T00:00:00Z

Content type: tutorial

Language: en

Sources: [Adam Bard](<https://devfeed.tech/sources/adam-bard.md>)

Topics: [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [Clojure](<https://devfeed.tech/topics/clojure.md>), [Java](<https://devfeed.tech/topics/java.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [clojure](<https://devfeed.tech/tags/clojure.md>), [code](<https://devfeed.tech/tags/code.md>), [functional](<https://devfeed.tech/tags/functional.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [java](<https://devfeed.tech/tags/java.md>), [object-oriented](<https://devfeed.tech/tags/object-oriented.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [types](<https://devfeed.tech/tags/types.md>)

## AI overview

This tutorial refactors a video-store example from object-oriented Java into a more functional Clojure style. It compares the original class-based design with Clojure protocols and immutable records, while noting that the source example differs from Martin Fowler's book.

## Source excerpt

I was searching for a good example to illustrate some properties of refactoring object-oriented code into a more functional style, and I came across this example from Martin Fowler's Refactoring. It describes the process of refactoring code for a video store. It's a nice little example with a useful narrative to go along with it.