346 reputation
312
bio website dicasdotnet.blogspot.com
location
age
visits member for 3 years, 10 months
seen Sep 12 at 13:40

Sep
5
comment Does Play framework approach necessarily leads to confuse code?
Interesting point. I have a very limited experience with rails, but I really liked the language. The similarity to rails caught my attention in Play framework. I am starting the research now. I will make some prototypes to see it in action, thanks :)
Sep
5
comment How to use ViewModels in a layered architecture?
I feel relieved that it is normal. I like your separations ideas, I will propose to our team, thanks :D
Sep
3
comment Does Play framework approach necessarily leads to confuse code?
Yes, your points are valid. I just don't want to spend some time coding things and get with a confusing code that is hard to maintiain after some time (and then wasting more time getting around my code that implementing new things)
Sep
3
comment Does Play framework approach necessarily leads to confuse code?
I will take a look on this link, thanks :)
Apr
16
comment How to make my code decide which class to instantiate based on a parameter?
Yes, I used string in my example for sake of simplicity, but the idea is to use an ENUM. Java is OK, the important is the concept, not the implementation. Thanks a lot :)
Apr
15
comment How to make my code decide which class to instantiate based on a parameter?
Sure, I have queries that are going to be called against a database. I want to have the same flow for the queries that do not have any business logic applied to it (ex: get all users, get all students, and so on)
Mar
6
comment My architecture has a problem with views that required information from different objects. How can I solve this?
Perfect explanation! Thanks! I marked the post as answer, but I have to wait 2 hours to give you the bounty ;)
Mar
6
comment My architecture has a problem with views that required information from different objects. How can I solve this?
ps: the question was made before I read the links you sent because I would like to clear this and give you the points, then take my time to read everything :)
Mar
6
comment My architecture has a problem with views that required information from different objects. How can I solve this?
wow, while I know some of the concepts you talked about, there is a lot to read, so it will take a while, so one last question before I accept this answer (the points in this question will be the best points ever spent here :) ): I would receive the DTOs in my BL. So if I have a method foo() called by 2 views, I will have foo(DTOView1) and foo(DTOview2), each would instantiate a new BO object and populate it and then call the "real" foo(). Correct? This would cause my BL to have many foo's, is this correct?
Mar
6
comment My architecture has a problem with views that required information from different objects. How can I solve this?
Hey! thanks for the answer. I will read it during the day and get back to you! Tks! One last question (I'm still reading you answer, so sorry if you already answered): Would you agree with w/ @AndrewM when he says that BO should be created on the view layer? If so, how would you solve the issue that my business layer be coupled with my DTO's and, therefore, to my view layer, since DTO's represent the set of information required for a specific view?
Mar
5
comment My architecture has a problem with views that required information from different objects. How can I solve this?
I've edited the question with a reply for you. :)
Feb
28
comment My architecture has a problem with views that required information from different objects. How can I solve this?
This pattern deals with the idea of collaboration and staleness. (Please see the edit). When you say to create a new model, you have the same idea of my adapter object. The problem is that this would be a "disguised DTO", it would be attached to the VIEW needs and I could require many different combinations of informations, causing my system to have many different objects, one for each request.
Feb
27
comment My architecture has a problem with views that required information from different objects. How can I solve this?
That looks interesting, I will take a look tonight and get back to you ASAP :D
Dec
5
comment How to organize methods that check username/email availability in a REST API?
Yes, that is true, but we have the email, which is used to login and a username is used to the user's open open (just like facebook, your profile page is /username). I would like to be able to check both individually, only the email or only the displayname. This can still be achieved with one method only, but it looks confusing to me
Dec
4
comment How to organize methods that check username/email availability in a REST API?
ok, thanks a lot! :D
Dec
4
comment How to organize methods that check username/email availability in a REST API?
We are creating the API that is meant to be open to the public, so we do not know how it is going to be used. would you have any reason why the only one endpoint?
Dec
4
comment How to organize methods that check username/email availability in a REST API?
No, I would like to provide a way to verify the availability of the email without creating the user. Creating the user is an independent call and not necessarily atomic. I just would like to know the best practice in providing this kind of method
Dec
4
comment How to organize methods that check username/email availability in a REST API?
that is a great catch! Thanks! How would you check if the email inserted by the user is already taken? (we can't accept two or more users with the same email in our system)
Nov
24
comment How do you avoid name similarities between your classes and the native ones?
For the computer it is not a problem, but for the developer it might be, since you've got EmailMessage and MailMessage, for instance.
Nov
24
comment How do you avoid name similarities between your classes and the native ones?
Yes, I thought about it, but it gets verbose. I would like something "cleaner", but the solution you proposed is my current one. I will add this to the explanation