|
I'd be inclined to have a shared class library of DTOs used to communicate with the API, and put the validation in there. Then have the UI view-models delegate as much of the validation to the DTO as possible.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: I'd be inclined to have a shared class library of DTOs used to communicate with the API, and put the validation in there.
That would be fine if the only issue were missing property data. The DTO'scould validate themselves. But in the case of business logic, there are times when you would need to go to the data.
Plus, putting the validation in the logic means that the DTO's can only be used in that app. If you then created another app that uses the same data, then the DTO's are now housing logic specific to the first app. The second app may not require the same validation.
IMHO, DTO's should be dumb objects that do nothing but carry data.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
It is generally a bad practice not to validate one's data that has been sent via the internet to an API before committing to a repository/database. If the volume of data being transmitted results in a sluggish UI, perhaps the core design is incorrect and should be reevaluated.
|
|
|
|
|
At least three times a day.
That's how often I press a link, button or whatever JUST after it moves to another location to be replaced with something I did not want to press.
It happens on my phone
It happens on my PC on the system tray
It happens in the browser
And other places...
Every morning I must push that icon to log in to the companys VPN in windows system tray. I wait for the icon to load. I wait for the other stuff to load, see my click-target jumping around in the menu. Ok, now everything is loaded, everything is still, I press it...NOOOOOO....JUST then it was replaced by another icon/button for an update of SSMS. I'm late for my morning meeting. The PC freezes for 60 seconds. My head boils....
Reading the morning paper on my phone...same thing....JUST when I press that article it's replaced by a link to an annoying ad (ok, maybe that's not a design flaw, maybe that's meant to be).
Same thing in Visual Studio...wow, it says I can start working while it's loading my project....lets press the file I want to work on.....NOOOOO......JUST THEN....
So: Designers of user interfaces of the world: Please: If you go with that fancy dynamic loading, please see to it that the things already loaded ARE NOT MOVED!
modified 13-Oct-20 4:31am.
|
|
|
|
|
It must be you, that never happens to me.
|
|
|
|
|
Did you have an actual question or did you just sign up to post a rant that everyone is going to ignore?
modified 12-Oct-20 15:01pm.
|
|
|
|
|
It's a good rant, although the Rant button could have been used, and it's already gotten three responses.
|
|
|
|
|
Truth be told, the CP "login" in the top right corner never works for me. It should be modal once you invoke it, but you only get to select your email, them it disappears. Then you do something else instead which I can't remember because I'm still thinking of why no one ever fixed this.
(But thought it must be me)
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
It works correctly for me every time. And the details in the modal popup are saved in the browser's cookies, not on the Codeproject system.
|
|
|
|
|
I think you're "clicking" that link and going to the / a "login" page directly.
If you hover over it, you get a type of login "tooltip" that you then start playing tag with.
If you do manage to tag (focus) it, a drop down will show some emails you can now stab at ... at which point the "login tooltip" disappears before you get to enter a password.
No keys were typed or buttons were pressed. I didn't make this up.
In any event, what's the point of "2" login facilities (the "tooltip" and the page). If you're not seeing the hovering "login tooltip", you're not "doing it right".
(It's only in Edge via Outlook; I'm always automatically logged in on FireFox).
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
modified 13-Oct-20 4:27am.
|
|
|
|
|
No, that's not what I see. I just signed out in order to test it. If I hover over the login at top right the little popup window appears with my email and password filled in. I then click the "sign in" button and I am back here. That has been the case for as long as I remember, using IE, Firefox and Chrome.
|
|
|
|
|
I could produce some "video evidence", but can't see the point. I'm not denying your reality.
(Maybe it's related to my mouse "scroll speed setting" or something ... super fast)
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Gerry Schmitz wrote: I could produce some "video evidence" I do not disbelieve you, I am merely telling you what happens for me. There may be a million reasons why our experiences are different, but that's just software.
|
|
|
|
|
It's posted in a discussion group and does not need to be a question.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
You need faster computers.
It happens to me once in a while and yes, it is very annoying. Sometimes it has nothing to do with dynamically added controls, it's just that the browser is taking a while to apply the CSS.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
It happens to me every time I try to click the Network notification icon or the speaker.
|
|
|
|
|
GenJerDan wrote: It happens to me every time I try to click the Network notification icon or the speaker. This must be a joke but I don't get it.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
No joke. I'll have the pointer over either of them down there, but as soon as I start to click, everything jumps to the left and I end up clicking the wrong icon. It's probably a setting, to show hidden icons until needed or something. Fixing it would would remove what little excitement I have these days, so I won't even check for a resolution.
|
|
|
|
|
Oh, I see. You were responding to the wrong person. No worries.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
Is the answer: every time they stop to concentrate on the problem of making the dynamically/asynchronously loaded code do the work they might have already solved when loading the pages/links/button?
|
|
|
|
|
Do you have anything better to do with your life than posting garbage?
|
|
|
|
|
These are arguments: static void Main(string[] args) {}. Inside a class a function is a method and not a function.
But I see often that those arguments are called parameters. Why? We call a method with parameters and not with arguments.
Inside the method parameters become arguments, Isn't that true?
|
|
|
|
|
Quote: When a parameter is passed to the method, it is called an argument.
C# Method Parameters
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
I had to look it up for C++ to discover that it uses the same terminology. I've often used them interchangeably and wasn't sure if there was actually a distinction. So thanks for teaching me something today.
|
|
|
|
|
Thanks for the kudos!
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|