I have great experience in IT over 12 years: front / back - ends, mobile, system administration and deployment cycle. I implement effective and great software products.
Hey, in your example of S, good to see clear example of responsibilities conjunction, where you follow also D principle:
// processvalidateRequest=(req)=>isValidForm(req)&&createUser(req)//Call an external function to validate the user formisValidForm=(req)=>testForm(req.name,req.password,req.email)//Only Create User in the DatabasecreateUser=(req)=>User.Create(req.name,req.password,req.email)
Dear Dmytro,
Thank you for noticing, the example in "I" has been revised.
But the intent was to just show the purpose of the principle, not the concrete implementation, which is lacking of course! As the validation method is just loggining a string :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey, in your example of S, good to see clear example of responsibilities conjunction, where you follow also D principle:
What is the purpose of example in I:
Dear Dmytro,
Thank you for noticing, the example in "I" has been revised.
But the intent was to just show the purpose of the principle, not the concrete implementation, which is lacking of course! As the validation method is just loggining a string :)