Dto の複数形 - Plural Form of Dto
どうも。このカテゴリーには、アルバイト先での出来事などを書いていきます。
Hello. In this category, I’ll write about events of my part time job.
今日は、テスト仕様書や詳細設計書を作成や、携帯サイトのページャの実装をしてきました。
Today, I made test specification and detailed specification and implemented pager for mobile site.
初めてページャを実装したのですが、動いたときは感動しました。
It was first time I implement pager, but I’m very impressed when it worked.
携帯サイトには、struts というフレームワークを使用しています。
We use struts framework to make mobile site.
今日、少し悩んだこと。それは、変数の命名についてでした。
Thing I was bothered today. That was naming for variable.
List などのコンテナの変数名をつける際は、次のようにつけることができます。
When we decide variable name for List called container, we can name like the following.
I. List<HogeEntity> HogeEntityList = new ArrayList<HogeEntity>();
II. List<HogeEntity> HogeEntities = new ArrayList<HogeEntity>();
変数名をつける際の好みは様々ですが、自分はやはり II. を選びます。
The more people, the more likings for naming variable, but I naturally choose II.
なぜなら、HogeEntityList の後ろについている List は冗長に感じるからです。
Because, I feel List attached to HogeEntityList is too lengthy.
Eclipse などでは、変数名の上にマウスをかざすだけで、変数の型がすぐに分かりますしね。
Also, using Eclipse, we can know form of variable only over-mousing on it.
それでですね、ちょっと迷ったことがありました。Dto の複数形は……?
Then I have a little bothering that what Dto plural form is?
二種類考えてみました。
I thought two kings.
III. List<HogeDto> HogeDtoes = new HogeDto();
IV. List<HogeDto> Hoge Dtos = new HogeDto();
少しググってみたのですが、ぱっとしたものは見つかりませんでした。
I googled a little, but I couldn’t find clear document.
結局、HogeDtoes で実装したのですが、いかがなものでしょうかね。
Finally, I implemented as HogeDtoes, but how about it?
難しい微妙なところです。
It is very little difference but is difficult.