Anteo Java News: Fall 2005
We appreciate and welcome all of your comments and submissions as we are tailoring the newsletter for you. Please send any comments and/or submissions for future articles to Anteo Group Marketing. To receive Anteo Java News by email, contact us.
Thanks and enjoy!
Top Ten Skill Sets of a Java Developer: Part II
By: Ashik Uzzaman
In the last issue of Anteo Java News, Ashik Uzzaman detailed skills 6-10 of the "Top Ten Skill Sets of a Java Developer," and Part II will complete the article with the top 5 skills of a Java developer. To view Part I, click here.
5. Remote Method Invocation (RMI)
Java RMI is a mechanism that allows one to invoke a method on an object that exists in another JVM, possibly in different host machine. The RMI mechanism is basically an object-oriented RPC mechanism that you must use when you are writing client/server solutions or distributed applications in Java. It may seem critical that many of the Java jobs today even don't specify requirement of RMI knowledge as if they consider it as a part of Java fundamental knowledge like collection framework or I/O. Don't allow yourself the luxury of not exploring this necessary technology, otherwise you may have to pay for it.
4. JFC/Swing
The Java Foundation Classes (JFC/Swing) are a set of Java class libraries provided as part of Java 2 Platform, Standard Edition (J2SE) to support building graphics user interface (GUI) and graphics functionality for client applications that will run on different platforms such as Microsoft Windows, Linux, and Mac OSX. You need to know it because desktop or client/server applications need to provide a GUI based client interface so that users can carry on their operations. Although it's possible to maintain a career as a Java developer by only developing systems using Servlets, JSP and EJBs; but ultimately your applications may need rich client interface where Swing is the predominant technology over AWT and an open source effort SWT. Develop small desktop applications using Swing to discover that GUI of Java applications is no less attractive than GUI of applications developed using other non-Java technologies. This will rescue you from restricting yourself as only a web application developer.
3. SQL, JDBC & Database Server
SQL (Structured Query Language) allows you to create and manipulate database systems, pose complex questions of a database. JDBC technology is a Java API to provide cross-DBMS connectivity to a wide range of SQL databases and access to other tabular data sources, such as spreadsheets or flat files. With a JDBC technology-enabled driver, you can connect all corporate data even in a heterogeneous environment. Java developers must know SQL along with JDBC to a good extent as well as work with various DBMS or RDBMS. Oracle Database is one of the most used databases closely followed by MS SQL Server, MySQL, DB2, PostgreSQL etc. Our industry has a 4 decades knowledge base of DBMS while 2 decades of RDBMS, and a luxury of ignoring this skill set may prove fatal for your career. You should have considerable working knowledge of at least one of these databases and make your hands dirty with SQL.
2. EJB, JMS & Application Server
Enterprise JavaBeans (EJB) is a server-side component architecture that simplifies the process of building enterprise-class distributed component application in Java. By using EJB, you can write scalable, reliable, and secure applications without writing your own complex distributed component framework. EJB architecture uses RMI-IIOP for distributed objects communication and JNDI for locating services, objects or resources by name. The Java Message Service (JMS) API is a messaging standard that allows J2EE application components a distributed communication that is loosely coupled, reliable, and asynchronous. In job market J2EE means use of EJBs with these technologies and so a Servlets/JSP developer though may claim himself as a J2EE developer from Sun MicroSystem's definition, he will not be recognized as a J2EE developer in the job market.
Despite there are many alternate excellent application development frameworks (e.g. Spring), EJB systems are still developed and maintained and will remain in mainstream Java development in future for its advantages in developing large scale enterprise solutions. Even if you don't use EJB in your project, the knowledge of EJB will let you develop systems with better designs and approach. This is why EJB development experience is needed either in landing an opening in an EJB project or proving yourself competent to a non-EJB Java project. You need to specialize on one of the Java application servers among the many available in the industry notably BEA WebLogic Application Server, IBM WebSphere Application Server, Sun Java System Application Server, Oracle Applciation Server, JBoss, Apache Geronimo etc. Look at the application server matrix at http://www.theserverside.com/reviews/matrix.tss before choosing one for you to specialize on. Many J2EE openings currently demand a few years work experience with a specific application server (e.g. WebLogic or WebSphere). If you are a little ambitious in your career as a Java developer, you can't avoid working on EJB, JMS and a well-known Java application server.
1. Servlets, JSP & Web Server
Servlets are Java technology's answer to CGI programming. They are server extension modules or programs that run on a Web server and build dynamic Web contents. JavaServer Pages (JSP) is a server-side scripting technology that provides a simplified, fast way to create dynamic web content through the use of servlets. While it is possible to develop web applications in Java using either of the two, they are usually fit together to create dynamic web-based systems. A career of a Java developer can't be secured without knowing these technologies to a considerable extent. You need a web server to deploy and execute your systems developed with Servlets/JSP. There are many popular Java web servers with the open source and commercial flavors among which Apache Tomcat is the reference implementation of Servlet/JSP container and is widely used. While you should work with few different web servers, master at least one of them ins-and-outs. From my experience, I consider this skill set as the most important in my ranking.
Recap: Top 10
1. Servlets, JSP & Web Server
2. EJB, JMS & Application Server
3. SQL, JDBC & Database Server
4. JFC/Swing
5. Remote Method Invocation (RMI)
6. Application Frameworks - Spring/Struts
7. Persistence Framework & ORM Tools
8. XML & Web Services
9. Design Patterns & UML
10. Java IDE
A few of the above technologies may not be important to you in your present or future job; but not everything you learn needs to be job-focused. You can always prepare a different list for yourself. Keep yourself updated with the industry and include the useful ones in your skill sets to stay ahead in the field of employment. See below for a few other Java technologies here that could not find a place in the top 10 but may prove worthy of your consideration.
- JSF
- Java Reflection API
- Unit Testing - JUnit
- TestNG
- Multi-Threading
- JAAS
- Knowledge of SDLC, CMM, ISO, Agile/XP
- Version Control System - CVS, SubVersion, Arch
- Bug Tracking System - BugZilla, JIRA
- Logging in Java, Log4J
- Applets
- AOP/AspectJ
- Build Management Tool - Ant, Maven
- Javadoc
- Java On Windows/Unix/Linux
- Midlets
- XDoclets
- MDA
- JavaScript
- Java Performance Tuning
Guidelines for using Ant
By: Patrick Carroll
Apache Ant is a Java-based build tool. For those of you who've been in the software business for a while, it's a lot like "make." Since it's Java-based, it has the advantage of being operating system-neutral. Since it's XML-based, it eliminates a lot of the non-obvious issues associated with other "make" tools, such as proper tabbing. Since it includes an exec target, any decent hacker can make it behave like "make" - if necessary.
When Ant is properly installed, invoking "ant" at the command line will cause Ant to look for a build.xml file in the local directory, and attempt to execute the default build target in that file. The goal of this note is to make Ant build.xml files as user-friendly as possible.
With that, here are some good ideas to use in your next Ant build.xml file.
Create a Default "help" Target
The beginning of your Ant script should look like this:
<?xml version="1.0"?>
<project name="project-name" default="help">
Given a help target like this:
<target name="help"
description="Sends help text to the console.">
<echo message="Targets:"/>
<echo message="jar - compiles the code and builds a jar file"/>
<echo message="junit - run all the junit tests"/>
<echo message="junit -Dtest=[class name] - run one junit test"/>
<echo message="checkCode - run PMD, javancss, etc., on the code"/>
<echo message="clean - clean up the build directories"/>
</target>
typing "ant" at the command line should result in something like this:
Buildfile: C:\starbase\common dao\build.xml
help:
[echo] Targets:
[echo] jar - compiles the code and builds a jsr file
[echo] junit - run all the junit tests
[echo] junit -Dtest=[class name] - run one junit test
[echo] checkCode - run PMD, javancss, etc., on the code
[echo] clean - clean up the build directories
BUILD SUCCESSFUL
Total time: 500 milliseconds
It's usually best to have the default target do something innocuous like print help.
Make Targets Flexible
Here's a sample unit test target:
<target name="unitTest"
description="Executes the unit test(s)">
<mkdir dir="${build.testResults}"/>
<junit printsummary="yes"
errorProperty="unitTest.failed"
failureProperty="unitTest.failed">
<classpath refid="junit.classpath" />
<formatter type="xml" usefile="true"/>
<batchtest todir="${build.testResults}">
<fileset dir="${project.test}">
<include name="**/${test}.java"/>
</fileset>
</batchtest>
</junit>
<fail message="Test(s) failed. See log and/or reports for details."
if="unitTest.failed"/>
</target>
Assuming all unit tests are named "[individual test name]UnitTest.java", setting the "test" property to "*UnitTest" at the beginning of the build.xml file:
<property name="test" value="*UnitTest"/>
will cause all unit tests to execute. However, configuring your unit test like this also allows a command line invocation of "ant unitTest -Dtest=MyUnitTest" to execute a single unit test.
Use Symbolic Names
When using third-party jars, it's tempting to use the name of the jar when building a classpath. For example:
<path id="compile.classpath">
<pathelement path="C:/repository/log4j-1.2.9.jar"/>
</path>
The problem here is that when the next version of log4j comes out, you'll have to update *all* your build.xml files to reference the latest jar.
A better option is to have a single properties file - "repository.properies," say - that defines all the third-party components, as follows:
log4j.jar=C:/repository/log4j-1.2.9.jar
Including this at the head of the build.xml file, as follows:
<property file="C:/repository/repository.properties"/>
Will allow classpaths to be specified as:
<path id="compile.classpath">
<pathelement path="${log4j.jar}"/>
</path>
And when the log4j jar changes, a single update to "repository.properies" is all that's needed to make sure all projects are using the latest log4j jar.
Conclusion
These practices will make your Ant projects much easier to manage. Feel free to use them.
Customer Service and the Software Consultant
By: Gil Estes
Being a software consultant, I find myself having to balance the needs and wants of the client with working to do what is right. Typically the players involved are you (the consultant) and a manager or technical lead (the client). Seldom do you get the opportunity to work with the truly senior executive leadership of a company. Most likely it will be with a mid-tier management position of some kind.
In a Perfect World
In a perfect world, you are brought in by a confident, self-assured manager who is technically savvy, experienced and successful. This person has a solid understanding of the business issues involved, the technical possibilities and what is a good solution. A true communicator, this person will also be open to suggestions from you, the hired consultant.
In a Less than Perfect World
Unfortunately, there are those times when this is not the case. The client (manager) may be relatively inexperienced and therefore, lacks the understanding of just what it takes to get the job done. In addition, they may have read a few too many "technology of the month" articles in the weekly trade publications.
In my experience, I have had the privilege to work with some outstanding clients who fell into the former category. If all of your clients are like this, then you need read no further. If not, read on....
Identify the Goal
More than likely, the actual scenario will fall somewhere in between these two extremes. Either way, the first thing to do is identify what the goals of the project and/or your role are. At the highest level, the fundamental goal of both the client and you should be to have a successful, satisfied client. How to go about achieving that goal is the focus of this article.
The Customer is NOT Always Right
For many, the old saying "The customer is always right" seems to be a safe path to follow. This is what worked in our parents' generation and has proven to be a hallmark of retail sales for decades. This is also what some clients are looking for. But what happens when the client is just plain wrong? In this case you have a few options:
- Do what the client wants since they are, after all, writing the checks.
This will almost surely result in an "unsatisfied" client when, in the end, the project fails. Even though you can say "It wasn't my idea," you will surely be blamed because you are, after all, the consultant. In addition to being blamed, seldom is a consultant retained who is "perceived" as responsible for a failed effort.
- Do what you think is right, in spite of what the client wants.
In this instance, if you end up with a solution that accomplishes the task, the client may be appreciative and grateful. At the same time, depending on the client's ego, you may also alienate the client so that even though the problem is solved, any chance of further work with that client will be gone. Then again, if you miss the mark, and you did it your own way, you will surely be blamed and not hired again for future work. In a worst case scenario, you may even find yourself open to legal issues.
- Illuminate the perceived issues for the client to see.
If you understand your role as one of "helping" the client, then the best option would be to help them discover the problems and possible resolutions. But how do you do this without coming off as arrogant?
- Ask Questions.
Ask lots of questions. Even if you know the answers, ask questions that will make your client think. By asking intelligent questions, you show your client that you are interested in doing more than just coding a solution. It shows that you want to have a deeper understanding of what they are trying to accomplish. It will also force the client to understand "why" they are doing certain things, and may show where there are short comings in their thought process. The key here is self-discovery.
- Provide Examples.
Provide examples of how others have solved a similar problem. For the purpose of discussion, it never hurts to have an example or two available that show how a similar issue was resolved successfully. When presented as a question (What if we approached it like ACME, Ltd did in this article I read... ), it will come across as trying find alternative, successful methods of accomplishing the clients objectives.
- Understand the Client.
Not understanding the client is probably the single biggest mistake I have seen consultants make. Try to understand where your client is coming from. They just might have a valid reason for wanting things done in a certain manner. They just might have a better understanding of the business need than you do, and there may be other factors driving the decision. Again, ask questions. By asking questions, it may reveal flaws in your own thought process, and will again show that you are taking more than just a passing interest in their needs.
To summarize, a primary key for success as a consultant is understanding that your job is to help the client succeed. To accomplish this, it may mean going beyond doing just what the client asks. It may well mean pushing for deeper understanding on both your part and that of the client by asking questions that help you both come to an understanding of how best to satisfy his needs. By doing this, you put yourself into a role of partner who will be called back again and again for future projects.
Current Openings
For our most current openings, click here.
back to newsletters >
For more information about the Anteo Group, contact us.