Naming convention question

I have a quick question on naming convention for an object that is the same structure (same fields, etc..) for a response and request object. Should I call it ObjectRequestResponse or just Object or just ObjectResponse? I'm wondering if any of them are better?
5 Replies
JavaBot
JavaBot3d ago
This post has been reserved for your question.
Hey @Kale Vivi! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
ayylmao123xdd
ayylmao123xdd3d ago
how about ObjectDto
dan1st
dan1st3d ago
if the request and response is practically the same, you might use the same class for it if it isn't, I'd say ObjectResponse since RequestResponse is redundant
Kale Vivi
Kale ViviOP3d ago
Yeah I want to use the same class but wondering about names. Is Dto fine here for req/res objects though for external api integration Another thing is maybe dropping the suffix but wondering if that's confusing between domain objects and these req/resp objs
JavaBot
JavaBot2d ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?