Reputation
43,629
Next tag badge:
207/100 score
16/20 answers
Badges
13 109 196
Newest
 Nice Answer
Impact
~1.2m people reached

Aug
14
awarded  Nice Answer
Aug
10
comment Is that good idea to add ViewModel exactly same as Model
@MehdiDehghani: It's not as simple as yes or no, it's more that the security issues with direct access to data model are rare and easily coded around. If security were the only reason to use a View Model, I would suggest other solutions (server-side validation, for example). But I'd recommend a ViewModel for decoupling and it will, almost incidentally, help you protect your data model.
Aug
9
comment Is that good idea to add ViewModel exactly same as Model
@MehdiDehghani: Security isn't really a good reason to separate the two objects. The best reason is that the model as viewed in the UI (possibly in multiple formats) is not necessarily the same as the model stored in the database (never in multiple formats and more likely to "model" the business). Even if they look the same now, they are likely to diverge as an application scales; it's better to handle them separately, so there's no temptation to force one model into the other when that time comes.
Aug
6
answered are technical user stories allowed in scrum
Jul
30
comment What if the “catch” block is empty - “{}”
@Wilman: Whilst I agree that never is a strong word, NEVER catch (Exception) and swallow it. That will catch OutOfMemoryException, for example, which really should be thrown up to a handler at the top level. If you want to catch a specific kind of exception and swallow it then a comment is enough -- but that should be a rare case.
Jul
30
awarded  Good Answer
Jul
1
comment Is testable code better code?
Doesn't really answer your question, but you should keep in mind that good test coverage makes code easier to refactor and refactoring often leads to better code.
Jul
1
awarded  Enlightened
Jun
22
awarded  Good Answer
Jun
16
awarded  Enlightened
Jun
16
awarded  Nice Answer
Jun
15
awarded  Good Answer
Jun
15
awarded  Nice Answer
Jun
15
revised How to quantify the work perfomed by a developer/programmer?
added 8 characters in body
Jun
15
revised How to quantify the work perfomed by a developer/programmer?
added 651 characters in body
Jun
15
revised How to quantify the work perfomed by a developer/programmer?
added 651 characters in body
Jun
15
answered How to quantify the work perfomed by a developer/programmer?
Jun
8
comment A Factory could be replaced by a key on the web.config? How would be the trade-offs of each approach?
Are you sure that it was instead of the factory? It seems to me that you have a factory either way, but one uses the environment name to decide which class to return and the other uses a config setting.
May
27
answered Design patterns for implementing optionally supported features
May
26
comment Design patterns for implementing optionally supported features
I think the point here is that P_User doesn't EXPECT anything of m_p, but if things are provided then it uses them. I don't see how DIP solves that problem.