246 reputation
1617
bio website
location Monterrey, Mexico
age 28
visits member for 3 years, 1 month
seen 21 hours ago

Living in Monterrey, Mexico.


Jul
25
comment Why would programmers ignore ISO standards?
You shouldn't store a date as string, use DATE data type instead.
Oct
1
comment In DOM, why is childNodes defined in the Node interface if only some node types can have childNodes?
Check my update, my point is why define something in the interface that not every Node will be capable to do it.
Sep
30
comment Shall I separate the admin part from the rest of the war
Also keep in mind that if the WARs need to comunicate to each other they will have to do so by webservices/EJB alike and that means serialization/deserealization which adds overhead.
Sep
6
comment Do MVC web frameworks favor anemic domain model in order to avoid duplication?
Anyway, even with this you still have to duplicate validation in the view model and the domain objects, suppose that you have a business rule that says that "Member" can only be age > 18, if you had used View Model you would have a field "age" in the View Model and also in the domain object, then you would have also the same validation in both the domain and the view model, that's a lot of duplication and if the business rule changes you would have to update all the view models that contain that validation.
Sep
6
comment Do MVC web frameworks favor anemic domain model in order to avoid duplication?
The problem with view model is that you have to duplicate a lot of fields, and that's a lot of maintenance but the counter argument is that it is worth because if the model changes you don't have to update the views and also gives you more security ensuring that the view can't update fields that are not supposed to be updated in that view.
Sep
6
comment Do MVC web frameworks favor anemic domain model in order to avoid duplication?
It's interesting that concepts that are used in some technology are not used in another one, for example the View Model you talk about is not known in Java (I've never heard it before either) and in Java, frameworks advice to bind directly to the domain objects. I've been reading about this in .NET (ASP.NET MVC) and the opinion is the total opposite, they say that you shouldn't bind directly to the domain objects and create what you said "view models". Very interesting how the opinions change depending on the technology.
Feb
5
comment How can I deal with a team member who dislikes making comments in code?
+1 but I think this doesn't apply to API doc which is very important because you need to have well documented what the function/method does and return.
Nov
8
comment Pattern for a class that does only one thing
@StevenJeuris I don't think it's an anti-pattern. An anti-pattern would be to clutter up refactored methods with lot parameters instead of storing this state that is common between these methods in an instance variable.
Aug
24
comment Is defining a variable to name a method argument a good practice?
@Caleb what about if you just pass to makeColor an RGB object for example: makeColor(new RGB(255,255,255)); More cleaner isn't it?
May
11
comment Why is Global State so Evil?
I think that passing a context object either by function parameter or dependency injection would cause problems if the context is mutable, same problem as using mutable global state.
Feb
20
comment How do I explain a “Hello World” program for beginners?
Still Java is one of the most used language.