vidakovic commented on code in PR #5613: URL: https://github.com/apache/fineract/pull/5613#discussion_r2924440520
########## fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartWriteService.java: ########## @@ -0,0 +1,36 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.fineract.portfolio.interestratechart.service; + +import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartCreateRequest; +import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartCreateResponse; +import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartDeleteRequest; +import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartDeleteResponse; +import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartUpdateRequest; +import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartUpdateResponse; + +public interface InterestRateChartWriteService { + + InterestRateChartCreateResponse interestRateChartCreate(InterestRateChartCreateRequest request); Review Comment: Here (the function names/signatures) we can use the "natural" order of the words (aka as you would say it in a sentence): - `interestRateChartCreate(...)` -> `createInterestRateChart(...)` - `interestRateChartUpdate(...)` -> `updateInterestRateChart(...)` - `interestRateChartDelete(...)` -> `deleteInterestRateChart(...)` Just when you name requests, responses, commands, command handlers then the inverted naming strategy is better, because in that context when you auto-complete stuff you will search over ALL the classes in the system; just imagine we would have `CreateLoanRequest`, `CreateClientRequest`, `CreateAccountRequest`... (add 500 more) how long that list of classes in your auto-complete would be. But inside the scope of a business logic class we have usually only one (or very few) functions that start with `create...(...)`... so, again, we can keep the natural order, makes reading easier for the devs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
