Jacob Stein (18) [Avatar] Offline
#1
I'm almost done with the book, only a few chapters left. I really enjoy it, and I'm quite happy, as I'm able to properly build my own APIs and such. I am still a bit uneasy about convention, I like to follow closely and unfortunately there's not enough repetition or statements to know what to do. For instance, I keep my EF Core (I'm experienced with it already) in my Data folder, but should I name things XBindingModel, XViewModel, etc.? I read your post about over-posting and looked at the book's GitHub, which was useful, but convention seems to vary. It would be nice to have a solid way of naming things. Granted the code will still work either way, but it's nice to know what you're doing.
Thank you,
Jacob
Andrew Lock (51) [Avatar] Offline
#2
I'm almost done with the book, only a few chapters left. I really enjoy it, and I'm quite happy, as I'm able to properly build my own APIs and such.


Thanks so much glad you've enjoyed it!

... should I name things XBindingModel, XViewModel, etc.? I read your post about over-posting and looked at the book's GitHub, which was useful, but convention seems to vary. It would be nice to have a solid way of naming things.


To be honest, I vary very much based on the code base I'm working in. The important thing is consistency.

Having said that, my personal reference is to have an explicit suffix for the models like you suggest. I typically go for XViewModel and XEditModel (Edit just because it's a bit shorter than Binding).