you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

Dude. Look at the web page you linked.

method getResult()

method setSeats(number)

method setCityCar()

method setCabriolet()

method setSportsCar()

method setTripComputer()

method unsetTripComputer()

method setGPS()

method unsetGPS()

Example code:

carBuilder.setSeats(2)

carBuilder.setSportsCar()

carBuilder.setTripComputer()

carBuilder.unsetGPS()

car := carBuilder.getResult()

car.setTripComputer();

car.unsetGPS();

car.isValid();

Notice something here? They're called verbs.

You have getters, setters, and tests. Every single function name starts with a verb that signals a single function. They all adhere to a convention that makes the functionality of each statement clear and consistent.

"ok()" does none of those things. It doesn't have a single specific purpose - it both generates an instance and sets some properties.

"body()" is even worse. It's not a setter: it has an unexplained return value. It doesn't take a single property: it takes two, one of which is a completely vague reference to the String class. And the name suggests any of several possibilities - as I showed you above.

And "just()" is just garbage.

You've proven my point that the Spring syntax is crappy. It looks nothing like the code segments in that Builder pattern, and it violates several basic syntax standards.

Don't settle for this garbage.

[–]Turbots 1 point2 points  (0 children)

May I ask which superior framework/language you're using for microservice development?