Wednesday, March 29, 2006

Carnegie Mellon financing

The last couple of weeks have been kind of depressing. Getting admitted to CMU 's MSE and not being able to pay for the tuition was a real turn down. Thanks to the tremendous effort by my family, especially my parents and my sister I will probably going to be able to attend for the intensive 12-month course. The real problem was that since I'm an international student, securing a loan is very difficult, and in my home county there aren't any provisions for this sort of things. Fortunately, I have an uncle in the US that may be willing to lend a hand in case I need it.

While investigating for loans I found and interesting site called MyRichUnlce that lends money, but instead of repaying the loan the traditional way with a interest fee, you are bound to pay 1% of your salary for an X amount of time after graduation. Seems really interesting idea since these guys know that once you get your higher education your probably have better paying job opportunities.

The next step is to complete and submit the required forms, that include standard user forms and medical records and then wait for the I20 which will allow me to get my student Visa.

Sunday, March 19, 2006

Carnegie Mellon acceptance!!

Wow!! Today I received an acceptance letter from Carnegie Mellon Master in Software Engineering program. I'm ecstatic and really happy for the news. I remember taking the GRE 2 years ago in case I one day decided to got to a US school and also sending the application forms on december when I actually thought my chances where slim. I believe it was my work at my current company with CMM practices and belonging to the SEPG that helped. Anyways...it's going to be cool.

The only thing left now is to find financial support to go there since the Argentinean economic collapse 2 years ago has left the country (and my savings) with a devaluated 350%. A good salary development salary here is about U$S 18.000 a year. You do the math...So here I am analyzing my possibilities with a strong conviction to make it somehow (donations and loans accepted :) ).

And I haven't got into the difficulty that’s going to be surviving the program. I promise I'll keep posting how this process advances.

Friday, March 10, 2006

Web 2.0 rants

Hi couldn't help to marvel at what is going on with these new cool web 2.0 sites that are poping up everywhere. In only a year I realized I haven't almost installed any new rich client applications on my computer. I use Gmail to email and chats, Plaxo to have to store contacts and calendar events (but soon google will have a calendar too), bloglines for RSS, del.icio.us for bookmarks a of course blogger to blog about whatever is on my mind.

After the news spread about google buying writleyit seems we will not need office anymore. Google seems to be THE web company since they understand what the internet is all about. Anoter site that cought my atenttion today was thumbstacks, an online PowerPoint style program that looks promising.

I just can't wait to see what's next!

Tuesday, March 07, 2006

About DTO, ViewObjects and friends

A few weeks ago at the DDD forum a user (plind69) asked a question about how to send business objects to the presentation layer but have them show only a subset of data based on security settings. Needless to say, this is a much debated topic as witnessed by the large response and variety of opinions. Most solutions where based on the idea of DTOs, weather they are static or dynamic with proxies.

Users that had used DTO in a solution know how painful they can be: for starters DTOs are hard to maintain since every time a domain class changes so must the DTO (and also their assemblers/desassemblers). Then, there is this strange code-smell feelilng that you're duplicating code all over just for the presentation to use. To avoid this some suggest using dynamic DTOs (a nice dynamic DTO framework can be found here).

Although somewhat similar to dynamic DTO, some suggested using dynamic proxies to restrict the view. The solution looks promising for the particular issue of restrict certain fields, but I still believe that other issues should be accounted that are not possible to address with this particular implementation, like the fact that sometimes there are performance implications that make it undesirable to expose domain objects directly. Per example, imagine a fictional complicated purchase algorithm. If the result is calculated on the server, there is no need to send the actual value but a cached value. DTOs are perfect for the task since all its members are cached values. A DTO is basically only a cached set of data from the domain.

So, is there a solution? I don’t know J. First of all, let me tell you that I don't believe there is a silver bullet (at least not that I found) to solve this issues. I think that the mechanics of how to present domain classes to the user (or WS for that matter) should be considered on a use case-by-use case basis.

Maybe using a mix of adapter and proxy pattern could make life easier? A domain object could be proxified to return (or not according to security permissions) the information from the domain object itself, but if needed it could return a cached value. This could be similar to how you use a mock object but instead of creating all mock interfaces by default you pass in the actual domain object. So assuming you could do something like this:

VO viewObject = new VO(personRepository.ForId(1));
viewObject.cacheValue(“complexProperty”).returnValue(complexValue);
viewObject.restrictView(“restrictedProperty”).throwException(IllegalAccessException.Class);

In this way when you accessed regular properties or method, the information will be requested to the actual Person class; if you request a getComplexProperty you will be returned the cached value and if you request getRestrictedProperty you will get an IllegalAccessException. Also I don't think this approach is usuable in the case of Web Services (DTO seem more appropriate here).

So, what do you think? Is this practical or even possible? How do you feel about the different approaches?