2,618 reputation
1614
bio website
location
age 26
visits member for 3 years, 3 months
seen Oct 23 at 8:40

Software engineer from the UK


Oct
22
comment Use a service layer with MVC
AutoMapper comes with a built-in unit testing functionality which allows you to verify all your mapping routines with one line. Author of this post did not mention that.
May
8
comment Can manager classes be a sign of bad architecture?
Managers often have a lot of power (responsibilities) and they can be a pain to deal with - just like in any office environment ;) EventManager means nothing. EventDispatcher describes what it does.
May
1
comment How to pick the testing values for parameterized tests for stateless functions?
Some of the frameworks out there allow you to specify multiple inputs for the same test. nunit.org/index.php?p=values&r=2.5
May
1
comment Design review: how well does my object oriented design fit the SOLID principles?
Surely you are missing an instrument for playing melodies. Note shouldn't be playing itself.
May
1
comment How to (or should I) have one assert per test with object comparisons?
Nothing is stopping you from wrapping your assertions into a method.
Apr
29
comment What is the Loopback Pattern?
Mock is a proxy that is able to fail a test, as opposed to a stub that cannot fail a test. Mock also tracks its own interactions. For example, when I call a mocked object's method, the call gets tracked so that later I can verify that I called the method so many times.
Apr
24
comment Organising models in ASP.NET MVC
-1 You can have the same view model utilised in different views. For example, you might have a SelectRecipientViewModel - view model for selecting a recipient. Now you might have two ways of selecting recipients, so you'd have two views making a use of the same view model. It's common for clients asking for the same functionality but presented in a slightly different way.
Apr
23
comment When to start thinking about scalability?
Let it become an issue, don't fix it if it's not broken. I saw dozens of projects where people were hung up on scalability concerns. Guess what happened? Many of the projects never made it out of the door.
Apr
22
comment object model and data model
You are assuming that there will always be a table storing data. This is not always the case. It might be XML, it might be graph database or a text file. Object model may guide your database design (assuming you are using relational database), but I wouldn't use it as a rule.
Apr
22
comment Natural Language to Search Criteria - Date Ranges
Domain specific languages come to mind - martinfowler.com/books/dsl.html
Apr
22
comment Entity Framework - Loading Related Entities Explicitly
If I understand you correctly, in your domain layer, you inject a an instance of a class that can retrieve any data from a database. In my mind this is similar to passing an object factory which can give you pretty much anything. Whoever looks at the constructor of consuming class won't know what dependencies the class has - they will only know that it retrieves data from the database or some other data store.
Apr
10
comment When to use a Singleton and when to use a static class
What do you need a static class for? They have their uses, so it'll be helpful to know before giving any kind of advice.
Apr
8
comment ID properties on Domain objects in DDD
Good point. Then there might not be a need for Id at all.
Mar
27
comment Should we test all our methods?
Blindly testing everything that could break doesn't make sense. There needs to be a strategy where high risk components get tested first.
Mar
27
comment Injecting dependencies (DI) in c++ applications
-1 Inversion of control has got nothing to do with dependency injection. Two are completely different things. IoC container allows you to commit to certain implementation during runtime. From the article you quoted: "dependent object is coupled to the object it needs at run time" - runtime is a keyword here.
Feb
6
comment How to store currency ranges in a Postgres table?
Three columns: Start, End, CurrencyType. E.g. 0, 250, USD
Feb
5
comment Best way to hide API key in source code
Don't put it there
Jan
14
comment Can we live without constructors?
IoC frameworks allow you to inject dependencies into constructors. This is normally done from the composition root of the application and this is the only place that is aware of IoC container (framework).
Dec
3
comment Is logging hours for software work a good idea?
It's common but it puts pressure on developers - especially if they have been at the company for a short period of time. Asking you to log the time without justifying the reason for it is equally not right (according to my ethics anyway).
Nov
25
comment Architecture(structure)-oriented vs. feature-oriented project structure
From the scalability perspective, the second approach should be fairly easy to scale out horizontally.