342 reputation
312
bio website dicasdotnet.blogspot.com
location
age
visits member for 3 years, 9 months
seen Aug 26 at 16:05

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
Apr
7
comment How Can I Make My Programming Class More Interesting?
That is exactly the subject he presented :). When I give some lectures I try to do the same approach, even if it is programming language or something like that I often ask questions like: "How would you do? Why can't it be that way? What is the advantages/disadvantage?" and so on :)
Mar
23
comment How do I create a mature SW design before the implementation itself? And how do I cope with changes?
Hi, you are right. But because of the nature of this project (we are not in a company, meeting everyday, and so on), keep tracking of all changes may be very hard. So my intention would be to make the design as mature as possible, so the changes would be few. But I think it is not possible :(
Mar
22
comment How do I create a mature SW design before the implementation itself? And how do I cope with changes?
Yes, this is a very good advice. I will "mix" it with Péter Török's. thanks!
Mar
22
comment How do I create a mature SW design before the implementation itself? And how do I cope with changes?
This is a very detailed explanation. I think I will use it during the process because I have time and because I want really to have a "strong" design. thanks!