Question

I'm working with a communication layer and there are objects called "*EnvelopeSO" and "*EnvelopeRO".

I've tried to find them at wikipedia, search engines, here, but they are hard to search for.

Are these postfixes frequently used? What do they stand for (abbreviation, acronym)?

Était-ce utile?

La solution

These postfixes commonly says what is the role of the object.

For objects intended to transfer data, it is common to add the TO suffix, so we have ServerTO, AccountTO, UserTO, CompanyTO, CustomerTO, SaleItemTO, etc. TO is an acronym for Transfer Object. A variation of this is the DTO suffix which means Data Transfer Object.

For objects intended to control the database access we have the DAO suffix for Data Access Object, so we have a UserDAO, CustomerDAO, SalesDAO, etc.

The UI or GUI suffix is frequently used for user interface objects. These are acronyms for Graphical User Interface or simply User Interface.

Other common uses of this are VO for Value Object and DO for Domain Object.

I once saw BE suffix for Business Entity, SL for Service Locator and PB for Page Bean.

Although this is a common practice in lot of places, I weakly recommend against it. A descriptive name is normally much better than a cryptic acronym suffix (or prefix), but if you can't find one that is not too long, use the acronym. Instead of CustomerTO or CustomerDTO you could name it just Customer. Instead of SalesDAO you could name it SalesPersistence or SalesDatabase. This eliminates the problem of trying to understand what the suffix should mean when you get a VendorDSA or a PersonTF.

In partcular the DTO, TO, DAO, UI, GUI, VO and DO suffix are very common and widespread. Other suffixes are normally obscure.

For your case in special, I have no idea of what is SO and RO, and I can't do anything better than just guess, which again shows that a descriptive name is better than an acronym as a suffix. My best bet is that SO is Service Object and RO is Resource Object.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top