irufus / gdax-java

Java based wrapper for Coinbase Pro (Formerly known as GDAX API and Coinbase Exchange API)
MIT License
177 stars 131 forks source link

Recommend using Lombok for Data Transfer Objects, and toString methods in each DTO #43

Closed code-with-coffee closed 4 years ago

code-with-coffee commented 6 years ago

Hi,

I'd recommend using Lombok for DTO's such as Account, Order etc, which will take away the boilerplate code for getters/setters,

And more importantly, introduce toString() methods for all, so that it's easy to log out a list of Orders / Accounts etc. (If using Lombok, @data annotation will automatically add toString). If not using Lombok, this should be added to DTOs manually for ease of client use.

build.gradle compileOnly('org.springframework.boot:spring-boot-configuration-processor') compileOnly('org.projectlombok:lombok')

Account.java @Data annotation.

Thanks.

robevansuk commented 6 years ago

Thanks for the suggestion. keep them coming if you have any more ideas.

robevansuk commented 4 years ago

I have worked with Lombok in the past and I think given there's not much demand for it (and the IDE will auto generate a lot of the boilerplate code automatically (its no effort)), it makes understanding the code much easier to not use lombok. If demand crops up again in the future I'm happy to reassess.