No bushshit. Blogging ~~

Tuesday, February 15, 2005

Spring I

I am interested to study the framework these days. In my opinion, a framework should be really easy to use or innovative which can encourage the developer to think and apply in a standard and most efficient way.
Spring is one of a successful example that I found in Web. It has been popular for a year long which also suggests AOP. The author, as I quoted from the TTS article, stated that it is a lightweight containers and is able to reduce many JAVA code by allowing the container to handle the object construction or correlations. It is also able to cover every level of the Tier-system and without code change inside existing modules. The container handle the resource and as the class (object) has low cohension between each other, which otherwise ease testing.
EJB has been too heavy for me as I need to start it in a Websphere Server (involve many setting) and the deployment and design of the beans is quite annoying. And most of time testing is quite time consuming and difficult. Struts, on the other hands, makes things worse.
It is a good news to me that Spring sounds simple and easy to implments. It may be able to minimize the problem of using the EJB and Struts. Also if I intend to use Hibernate later,
I think I will go through a long road to study this aspect.

http://www.springframework.org/
http://www.theserverside.com/articles/article.tss?l=SpringFramework

Monday, February 14, 2005

Apache BeanUtils Commons

While going through the custom tags of my company handled frameworks,
I knew I have to study a series of open source projects of Apache group.
One of them is BeanUtils Commons.
To say it in simple, it is a technique which allow dynamically handle
the setter / getter of JavaBean. It is not required to instantiate the class
and called its setter method but we can construct a string of the name of requested attribute,
(which may inside a map, a list or just simple attribute itself) and called it directly through a BeanUtils method.

The benefit is that I can set/get the attribute based on a logic process in RUNTIME. All thanks to the reflection advantage of JAVA language and allow much flexibility in programming.

More than that, I can use the BeanUtils method to invoke the method of an object (invokeMethod) or copy the attribute from one object to another (copyProperty) which usually occurs between data object and Struts form.

Some authors suggest the use of DynaForm or (DynaBean, DynaBeanClass) and I think I need to study it much later.

http://jakarta.apache.org/commons/beanutils/
http://blog.csdn.net/calvinxiu/archive/2005/02/02/277748.aspx
http://www.javaworld.com.tw/jute/post/view?bid=12&id=842&sty=1&tpg=2&age=0
http://yhe.dalian.cn/showlog.jspe?log_id=105








Just find that some of the apache project is worth to study

Sunday, February 13, 2005

Tomcat day

Whole day busy to make the Tomcat start up normally. But after several hours try, I still discover error exists in starting up because some of the properties are not able to set. It is too ridiculous that I download several versions of copy and encounter the same problem after clean installation. Luckily (or lastly) I give up fixing it as it only affects the userDatabase which my application would never care about.

I then draft a simple application which model an online bookstore. I jog down the database schema within thirty minutes and most of my time is busy at setting the servers (SQL and web). It is tiring to look over the instruction manual and I am happy for not being a system administrator, which I think is the most exhausting and boring job in the world.

Good Luck. Everything seems to work after I wrote up the code and DAOs and apply using the JSTL. I think I could use it as template and apply other technique on it later.

I feel unhappy that I tried to use the RAD (Rational App Developer) and setup the test environment. But the trial version is not well-fixed and it seems not support the MySQL and the test environment is out of control all the time.

Two hours is left before next day, I think I should study the Custom Tags which defined by my colleagues. It always would be nice if they can document everything (including these tags) they call it as a part of framework and urge me to use them in new projects.

Saturday, February 12, 2005

New year New Start

Normal day. For me that is nothing special for these Chinese lunar new year holidays.
Boring is everything. It is good luck for me that I am able to take one third of my time to sleep. It seems to compensate my countless sleepless night I spent on current project.
Being a programmer may not fit my lifestyle. But as I told my boss, I am chosen by IT and it is my fate to be tortured. However, why shouldn't I start thinking seriously about my future and whether should I still stay in current position? Hope I can have my decision soon.

My imitation told me that I have to organize my life in this new year. OK, I try. Last night I listed out three tasks and tried to accomplish them today, which all related to my computer studies. Luckily, I already done two of them and still having three hours left for the remaining.

Just decide to do some simple projects to train up my skill. I reinstall my computer and put all the necessary softwares in. Suck that Oracle 9i database installation confused me so much. I give up after an hour struggle with this monster. No problem as I think I can use MySQL instead if I am not decided to use EJB.

A book called "Java Testing Pattern" just attract me but after I read it I am not able to understand it all. Maybe I am lack of experience in testing and eXtreme Programming and so in my working environment. We are result-oriented rather that test-oriented ?? Even though I believe XP may be good, I am not confidence to convince my supervisor to apply it. As they like to say, no one would allow a work that can be done by a man to be shared by two. But I doubt if they would allow a person to do a job in double time or longer just because his silly mistake and misunderstanding.