javawaveblogs-20

Wednesday, September 19, 2007

Java 5 new features

Several useful features were introduced in Java 5.

The compiler is also updated and all translate to already defined Java bytecode,
meaning that virtual machines can execute these features with no need for an update.
These features make writing Java code easier, cleaner, and faster.
Even if you choose not to take advantage of these features, familiarity with them is vital.

The new features of Java5 are listed below:

Generics: A way to make classes type-safe. this helps us in narrowing an instance
of a collection to hold a specific object type and eliminating the need to cast
objects when taking an object out of the collection.

Enhanced for loop: Less error-prone and cleaner for loop for use with iterators.

Variable arguments: For passing an arbitrary number of parameters to a method.

Boxing/unboxing: Support for automatic conversion between primitive types and their
reference types.

Type-safe enumerations: Clean syntax for defining and using enumerations, supported
at the language level.

Static import: Ability to access static members from a class without need to qualify
them with a class name.

Metadata: Coupled with new tools developed by third-party companies, saves developers the
effort of writing boilerplate code by automatically generating the code.

Tuesday, September 18, 2007

NetBeans IDE 6.0

NetBeans IDE 6.0

The NetBeans IDE is a modular, standards-based, integrated development environment (IDE) written in the Java programming language. The NetBeans project consists of an open source IDE and an application platform, which can be used as a generic framework to build any kind of application.

for more information: http://www.netbeans.org/index.html

Working with Netbeans and ubuntu

1) Download JDK example: jdk1.6.0-beta2.bin into your home folder.

2) In terminal run : ./jdk1.6.0-beta2.bin
(make sure to chmod +x so that it can actually run)
result : you will get a folder in home such as jdk1.6.0/

3) In terminal run : sudo mv jdk1.6.0 /opt
result : you just moved jdk1.6.0 into /opt folder.
So now /opt/jdk1.6.0 is the location of the jdk.

4) In terminal run : sudo rm /usr/bin/java
result: remove any link that is in your system path for java.
So you can replace it with the jdk in /opt

5) In terminal run : sudo ln -s /opt/jdk1.6.0/jre/bin/java /usr/bin
result : made a link to your new jdk.
So that it is easy to be found by other programs

6) Dowload the latest snapshot of netbeans ex. nebeans 6.0

7) In terminal run : ./nebeans6.0-xxxx.bin
result : netbeans installer will find you jdk and will use it
for installation of the IDE.
At the end of installation you should have an icon on your desktop
for nebeans that uses java JDK that you placed in your /opt/jdk1.6.0 folder.

In netbeans folder structure you can find a file ~/netbeans6/etc/netbeans.conf
in there you can also point to a jdk of your choosing
like this : netbeans_jdkhome="/opt/jdk1.6.0"

Installing Java on Ubuntu

Update the apt repository with the following lines.

deb http://us.archive.ubuntu.com/ubuntu dapper main restricted
deb http://us.archive.ubuntu.com/ubuntu dapper universe multiverse

After this have apt updates its repository

Run the following command
sudo apt-get update

Once the above command is run. Its time to install java.
Run the following command to install java.
sudo apt-get install sun-java5-jdk

Installing MySQL on Ubuntu

It is very very easy to install mysql-server on ubuntu. All you have to do is run the following command.

To install
sudo apt-get install mysql-server

To run
mysql -u root -p -h localhost

Monday, September 17, 2007

Client Interaction -- Tips

1. Do not write "the same" in an email - it makes little sense to them.
Example - I will try to organize the project artifacts and inform you of the same when it is done.
This is somewhat an Indian construct. It is better written simply as:
I will try to organize the project artifacts and inform you when that is done

2. Do not write or say, "I have some doubts on this issue"
The term "Doubt" is used in the sense of doubting someone - we use this term because in Indian languages, the word for a "doubt"
and a "question" is the same.
The correct usage (for clients) is:
I have a few questions on this issue


3. The term "regard" is not used much in American English. They usually do not say "regarding this issue" or "with regard to this".
Simply use, "about this issue".


4. Do not say "Pardon" when you want someone to repeat what they said. The word "Pardon" is unusual for them and is somewhat
formal. You can say, ‘Please come again or could y ou please repeat.’


5. Americans do not understand most of the Indian accent immediately - They only understand 75% of what we speak and then interpret the rest. Therefore try not to use shortcut terms such as "Can't" or "Don't". Use the expanded "Cannot" or "Do not".


6. Do not use the term "screwed up" liberally. If a situation is not good, it is better to say, "The situation is messed up". Do not use words such as "shucks", or "pissed off".

7. As a general matter of form, Indians interrupt each other constantly in meetings - DO NOT interrupt a client when they are speaking.
Over the phone, there could be delays - but wait for a short time before responding.

8. When explaining some complex issue, stop occasionally and ask "Does that make sense?".
This is preferrable than "Do you understand me?"

9. In email communications, use proper punctuation. To explain something, without breaking your flow, use semicolons, hyphens or
paranthesis. As an example:
You have entered a ne w bug (the popup not showing up) in the defect tracking system; we could not reproduce it - although,
a screenshot would help.
Notice that a reference to the actual bug is added in paranthesis so that the sentence flow is not broken. Break a long sentence
using such punctuation.


10. In American English, a mail is a posted letter. An email is electronic mail.
When you say "I mailed the information to you", it means you sent an actual letter or package through the postal system.
The correct usage is: "I emailed the information to you"

11. To "prepone" an appointment is an Indian usage. There is no actual word called prepone. You can "advance" an appointment.

12. In the term "N-tier Architecture" or "3-tier Architecture", the word "tier" is NOT pronounced as "Tire". I have seen many people pronounce it this way. The correct pronunciation is "tea-yar". The "ti" is pronounced as "tea".


13. The usages "September End", "Month End", "Day End" are not understood we ll by Americans. They use these as "End of September",
"End of Month" or "End of Day".


14. Americans have weird conventions for time - when they say the time is "Quarter Of One", they mean the time is 1:15. Better to ask them the exact time.


15. Indians commonly use the terms "Today Evening", "Today Night". These are not correct; "Today" means "This Day" where the Day stands
for Daytime. Therefore "Today Night" is confusing. The correct usages are: "This Evening", "Tonight".
That applies for "Yesterday Night" and "Yesterday Evening". The correct usages are: "Last Night" and "Last Evening".


16. When Americans want to know the time, it is usual for them to say, "Do you have the time?". Which makes no sense to an indian.

17. There is no word called "Updation". You update somebody. You wait for updates to happen to the database. Avoid saying "Updation".

18. When you talk with someone for the first time, refer to them as they refer to you - in America, the first conversation usually starts by
using the first name. Therefore you can use the first name of a client. Do not say "Sir". Do not call women "Madam".


19. It is usual convention in initial emails (particularly technical) to expand abbreviations, this way:
We are planning to use the Java API for Registry (JAXR).
After mentioning the expanded form once, subsequently you can use the abbreviation.


20. Make sure you always have a subject in your emails and that the subject is relevant.
Do not use a subject line such as HI.


21. Avoid using "Back" instead of "Back" Use "ago". Back is the worst word for American. (for Days use "Ago", for hours use "before")

22. Avoid using "but" instead of "But" Use "However".

23. Avoid using "Yesterday" hereafter use "Last day".

24. Avoid using "Tomorrow" hereafter use "Next day".







Sunday, September 16, 2007

UDDI Clients and Servers

UDDI clients


uddi4j: UDDI for Java
UDDI.NET SDK: UDDI for Microsoft .NET
uddi4r: UDDI for Ruby
uddi4py: UDDI for Python
UDDI::Lite: UDDI for Perl

UDDI servers


Apache jUDDI: Open-Source UDDI Server
BEA Aqualogic Service Registry
Novell nSure UDDI Server: Open-Source UDDI Server
Microsoft Enterprise UDDI Server: Part of Windows 2003 Server
Systinet Registry
Oracle Service Registry
Software AG CentraSite
SAP Enterprise SOA PI7.1

diggthis