Tuesday, September 29, 2009

Note to myself

In my quest to learn more about MVC pattern I should read more about Presentation Abstraction Control (PAC) and Model View Presenter … yeah guess what (MVP) ... u don't get prize for guessing.

Monday, September 28, 2009

New project – Coming up!!!

So I met a very interesting set of people last Sunday. Among then was a guy name Ted David who now retired is a promising musician. He plays Sax and Flute, leads a band that plays latin music and also arranges pieces of music that he sells to other bands. He is also an amateur programmer and it appeared that he knew more than me. Anyways, as we were talking he mentioned that he is trying to redesign his website which he uses to sell his compositions. He is interested in using Ajax, I guess partly because it is cool. Since I have been reading up on Google Web Development Toolkit for sometime and was getting bored with the dry text, I jumped on the opportunity to help him make this website using GWT. I want to use this opportunity to share on my blog the process that I will follow in this project. I am hoping that in return I can get some free flute lessons out of him.

So watch this space for more if you interested in learning about the "cool" GWT.

Friday, September 25, 2009

Flash of Genius or Fight Club

My landlady gave me this dvd to watch coz she had a week to return it. It was lying around on my table for one week and she asked me at the end of the week if I had watched it. I lied saying that I did coz I didn't want her to feel bad. Immediately I went to my room, popped some corn and with a chilled can of diet pepsi sat down to watch the movie.

"Flash of Genius", that's the name of the movie. Directed by Marc Abraham and based on a true story, it's a movie about a man who invented a gadget sitting in his basement and fought to earn his name as its inventor. Very inspiring story. With all the Hollywood glitz and "true story" remixing the movie was churned out very well. I apologize before hand if I sound a bit negative but I have my reasons.

One thing I was positive about was the acting talent exhibited here by Greg Kinnear who is a very impressive actor who is still waiting to earn the credit among the general audience (aka earn an Oscar). He managed to put a dimension to his role which I could personally identify with. When I say personally I mean I have faced such a personality before. A personality who believes in fighting every battle that comes along, fighting every battle as if it was the last one, fighting every battle with out caring what others are saying, what the loved ones are going through. The movie was inspiring because the battle was won with a very favorable end and they mostly are won in real life too. But my question is; is it worth the pain, the anguish that one might himself go through and put other people around him through.

The wife of the character has a line in the end that she tells her husband after he has won the "battle". "I know you, this is not the end. There will be another fight after this." I don't know what is right and wrong in this aspect. But from the perspective of the loved one, fighting with no legible cause at the end is an act of selfishness not heroism.

Monday, September 21, 2009

Derby – Not the horse race

Derby is an open source Apache project. It is a relational database implementation in Java. The basic advantage of this is that you can embed it in any Java-based solution.
Derby can be divided into two:
1. Embedded framework
2. Client/Server framework

Embedded framework: In the embedded system the derby engine does not run in a separate process and there are no separate database processes to start up and shut down. So the magic is that the database engine runs inside the same JVM as that of the application. So derby becomes part of the application just like any other jar that the application might use.

Friday, September 4, 2009

What is JAXB

JAXB is important in binding XML to Java classes. JAXB allows java programmers to process XML and XML data without having to know XML processing. The developer does not have to create or use SAX parser. JAXB makes use of the given XML schema and generates the required JAVA classes corresponding to the schema.


 

Why do we need XML representation of data?

One of the fundamental concerns in Webservices based systems is to be able to transmit data in an interoperable manner. XML has emerged as the standard for exchanging data across disparate system.


 

How is JAXB different and more preferable in comparison to using XML parsers like SAX and DOM?

Parsers like SAX and DOM are commonly used to access XML documents in a Java programming language. Programmers invoke DOM and SAX parsers to parse through the XML document and logically break it up into discrete pieces.

SAX parsers: In the SAX approach, the parser starts at the beginning of the document and passes each piece of the document to the application in the sequence it finds it. Nothing is saved in memory. The application can take action on the data as it gets it from the parser, but it can't do any in-memory manipulation of the data. For example, it can't update the data in memory and return the updated data to the XML file.

DOM parsers: In the DOM approach, the parser creates a tree of objects that represents the content and organization of data in the document. In this case, the tree exists in memory. The application can then navigate through the tree to access the data it needs, and if appropriate, manipulate it.

With JAXB programmers can get access to data without having to know XML or XML processing.