11

When a function that sends an email to recover the password get's this summary I'm lost for words regarding documentation 😂

Comments
  • 0
    is it only me or adding 'dto' to class name is too annoying? Why having namespace if having to also add it to class name? Or 'dto' and db entities are in one folder?
  • 1
    @gitpush they are in separate folders. This is like it was when I open the file but to refactor all is spending the rest of my life just updating code. 😂
  • 0
    @hbatista91 better leave it as is XD
  • 2
    @gitpush last time I saw DTO in a code base it was a nightmare. It's some pattern people copy often blindly.
  • 0
    @RANTSMCPANTS I wouldn't be shocked if that's the case, whats next: UserRoleEnum, getUserFunction(string Id)
  • 0
    @gitpush The thing worse than suffix spam (which is sometimes a kludge needed to avoid name collisions, really bad if you have to go from one to two to three to four until you might as well use the fully qualified name) is DTO spam. As in people create them because of following some pattern like its a recipe for cake and you end up with nothing but an implementation of that pattern, often entirely automatically.

    The result is that you end up with DTOs all over the shop particularly when people are trying to be enterprise with command bus, DDD, etc.

    DTO to me, might be alright, but it's also often a strong smell of a code base where perhaps even 50% or more of the layers of indirection are pretty much just taking one anemic object, then spooling off it's values from getters into the setters of another objects over and over, back and forth.
  • 0
    @RANTSMCPANTS The only thing I like about layer is separation of concern, as for models ya its bad then getting from one place and setting to an exact same object in an another place but just different namespace

    It might be wrong but for models that are identical I just throw them in a different lib and then inherit from them when needed.
  • 0
    @RANTSMCPANTS To me, Dtos are just common objects with properties, sometimes for specific transactions. They're useful.
  • 0
    However, when the Dto is just an email, it could've just been a string.
Add Comment