Sunday, September 23, 2007

Google's code review

Just happened to find out on how Google is keen on the code review. Very finite long process. It tells you the value they give to their code reviews. "Review first before commit" is something similar to "Test first code" model . The bottom line is , you got to pay attention to code review a lot thought you may not be using the Perforce or any special tool.

Friday, September 21, 2007

Robert Hanson on my million dollar Q

Robert Hanson writes about the million dollar question I have been asking to myself for long time. Whats the standard practice to learn/adapt new technologies. It is good to learn new technologies. But there are toooooo many new THINGS ! . Like he mentions on MVC, how many MVC I have gone through last year or so ? From simple JSP to Struts, JSF , spring MVC and take GWT if you wish. Sure, I learned these THINGS and that helped me to improve my skills. Every models have their own pros and cons. But will this be effective ? Can we make full use of these technologies if do continue like this ? It is true that these things are evolving and there is always a superior THING on the corner. But my questions is (Or rather lots of people's Q is), when should we do this ?

I think it is the question of how the existing technology meet our expectations and how good the new technology would help to improve our solutions. I think our temptation to learn new technology (Or on our thrill on use new technologies) often beats and we skip to answer those questions and just do it.

Any comments ?

Wednesday, September 19, 2007

Eric Evans' interview on InfoQ

Eric Evans talks on domain driven design in this interview. he is briefing on the basics of DDD and particularly on how you should focus on the domain targeted design and not on any underlying technologies. I think it is a common mistake that when we do the domain driven design we tempt to have a particular technology in the back of the mind, which will always disturb our focus.

He talks about the ubiquitous languages which have been used in such designs. The concern I have is, who is the right person to do such domain driven design. Is he the domain driven architect , project leader, tech lead or the pre sales person? And at which point this phase will fall in the process cycle? because we often have the communication gap on the domain driven design when it comes to the development life cycle. So we need to make sure the model and the ubiquitous language are properly conveyed through out the software life cycle.

Another important aspect I found is about on which areas of domain you have to model. Evans says, you should not model everything in the domain. It is very important to isolate the models and only focus on the complicated areas. Obviously overuse of DDD will probably affect the design as well as the business value.

Want to find more .. visit this interesting site on DDD

Thursday, September 13, 2007

Spring web services

Arjen Poutsma, project lead for the Spring Web Services framework, talks about the contract first approach in this interview , which we have discussed in my last post. Spring web services released very recently and looks impressive. I think it doesn't offer any client side support. Also we need to wait and see on Apache CXF 's response on this. Apache CXF is considered to be a good model to use with spring.

Monday, September 10, 2007

Interview on SOA and Web services

WS-* vs REST arguments are getting very popular these days. Knowing WS-* for some extent and read through the REST concept a bit, I don't understand the real fuss behind these arguments at all. Since all the big industrial giants are competing on this each other, I don't want to dig my little head in to it. But I just wanted to clarify something to myself. So this post is just to make my self clear on these technologies. I think by asking my own questions to me, I will be able find some answers or at least my friends will jump in to me and explain it. Let me try to make this post more interesting. I would like to invite Lasantha (The busy journalist in Sri Lanka) to interview me on this !!!


Lasantha : Hi JK, would you spend some time on a interview with me.


JK : Me ? With you, oh no, you are a very dangerous guy !


Lasantha : That's all past JK, Now I moved in to interview about these more safer WS vs REST arguments !


JK : Oh god, You will find it more difficult than your political interviews man. Anyway go ahead.


Lasantha : People are arguing on WS-* vs REST , SOA vs ROA etc etc. What's your opinion on this.


JK : First of all Lasantha, I do not belong SOA republican party or ROA conservative party. I am non-aligned guy or rather I know neither of these technologies very much.


Lasantha : Thats ok, what do you think about the SOA and ROA?


JK : Well, SOA is an attempt to approach a design on a service oriented way. You define the services independently first and then provide a way to the designer on how these services can talk each other. Basically it is an evolution of traditional modular programming. But different is , you embed the service call inside the codes in the traditional distributed programming, where in SOA you treat them as services and provide the meta data about a service to another service instead calling it from source code.


Lasantha : What's the point doing it ?


JK : There is a point. First of all you see a business driven design (Is it a new term or an obvious one ? ). Designers will start looking the system in a services oriented way. So reusability will become easy and sensible I suppose. Atomic level of modularity becomes larger and the a service it self will become an application you can see.


Lasantha : Yes I see a point.


JK : There is another important point as well. Remember I told you, a service will offer a meta data of it, where another service can use the meta data to know how to talk with that service. So just think like if that meta data becomes a standard one then every body will start using it. The so called interoperability will become easy then.


Lasantha : Isn't it the CORBA or DCOM trying to archive ?


JK : You started asking your political questions now. Well I didn't tell you that CORBA is different from SOA. You see, SOA is a concept. CORBA or DCOM or web services are technologies which can be used to implement a SOA application.


Lasantha : So SOA is not web service then ?


JK : Correct, no way both can be same. In your terms, SOA is like communism and web service is like Marxism . But you know there are Leninism or Maoism where all these are trying to archive communism in different ways.


Lasantha : oh Ok .. So SOA is more of a methodology while web service is a kind of representation or rather implementation right ?


JK : Yes great.


Lasantha : Then why people confuse on web service and SOA are same.


JK : It is like how REST people forgot about the origin of REST. REST was there even before, but now only it becomes a buzz word. Like wise the SOA concept is there even before these CORBA and DCOM came, but now only it shapes up well with web services. And full credit to the companies who successfully faltered people for make them believing SOA and web service are same !


Lasantha : That means web service is not the sole representation of SOA ?


JK : It cannot be sole ... but it is the best option available for now. Something like 'Dravid is the best currently available option for Indian captaincy !, but of course not the best '


Lasantha : Why do you think so ?


JK : Because Ganguly has just come back in ! Just kidding. Ok get back to the point. This is one thing I am also looking for. I think web services adopt SOA really well. Probably when web service was introduced there must be a good understanding on SOA. So web services concept or rather specs might have developed with SOA in mind.


Lasantha : Can you describe more please ...


JK : The key success for the SOA is on how you define the contract. That is very important since here machines talks each other without any manual intervention. The contract specified in web services is more clear , understandable which is in XML. More over CORBA is a an object oriented model. The client server coupling is very tight opposed to the web service's loose coupling. The wire protocol is SOAP which is much easier to work with than the binary format in CORBA. And I see CORBA as an underlying technology as it doesn't address the SOA approach in a broad way. But web service is giving is a big picture and it is very easy to design a SOA flavored application using web service than the CORBA. I think these days these kind arguments are not raising much after WS-I drops the RPC concept in web services.


Lasantha : Why is that ... RPC is a good model though.


JK : Thats the thing. You need to come out from the object oriented model which CORBA posts. SOA is more to do with services not operations. Traditional web services used to create the web service methods and functions at the source code level and the transform them is WSDL. For example you write method called foo in a class and create the WSDL from that java class.


Lasantha : What's wrong with it ?


JK : Every thing is wrong. You have to focus on the contract first, Otherwise you will often change your contract when ever you change the server classes. The RPC feature in WS had this impact. People often looked at the RPC web service as a replacement of CORBA. And they forgot to think about the “service” orientation there. Otherwise you would fall in to the reverse engineering I suppose.


Lasantha : So you think the contract first is very important ?


JK : I think thats entry point for SOA. It's like you have to design first without worrying about the underlying implementation. And when it comes to interoperability, it is even more important. You have to define the contract of your service properly. You got to implement the WSDL. This is all about messaging and services not operations.



JK : Beside that web services adopts the www very well as how it's name suggests. I think thats where it stands tall. Its focus on security and trust like features go beyond what http provides. It tries to standardize these features very well. For example, you can sign a SOAP message and send in a much secure way than what standard HTTP promises. Most of the times http can be safe enough but there are situations when you need more that what http addresses.


Lasantha : I think, we need to discuss this in details and should bring ROA or rather REST in this conversation. We will continue soon


JK : Yes true. It would be better if we continue this with REST later. See u then bye.

Friday, September 7, 2007

My blog on Spring

I set me a challenge to explain Spring J2EE framework to my 5 years old nephew and ended up messing everything. But still I blog this to open up a discussion on frameworks and Spring.
Some of real life metaphors can be confusing or argued other way. But I just tried to use it.

Your comments are welcome.

Click here to read and discuss it.