Welcome to X.U. Chronicle Journal Sign in | Join | Help

X.U Java Chronicle

About The Author - Liming Xu Creator of Jumptree Project Management Software
Jumptree Project Management - Official Release is Two Weeks Away and Counting

I know it's my Java blog and my software is made in ASP.NET 2.0 (you are probably using some non-Java based project management software anyway like basecamp, mantis and what not right?), so I still feel like I should let everyone know that we’ve just updated and released the beta 1.0.0.1 version.



There are a couple of things we fixed based on user feedbacks

 

  • Installer Errors – A few of the beta testers encountered the Email Warning at the end of the installer. This has been fixed because there was a concurrent accessing error when reading the email configuration file.

    In addition, from users’ descriptions, there seems to a problem updating connection string in the configuration file. We realized our installer was not logging all the information needed for customer support, such in this edition, we added a full logging stack and in case any of you encounters any problems in the future, simply post back the content of the log files will be sufficient

  • Business Rules – A few beta testers pointed out some confusion over the statistics that we are reporting for the projects and we are glad that people are testing it to that extend. While we fixed some in this edition, we felt it’s not enough. We will go through all the stats modules and make sure everything is crystal clear.  
  • Cosmetic Fixes – There were a few bugs in the GUI interface here and there, such as missing css class names for divs and what not. These have been fixed as well.

Some people have been asking us if we provide the source code and the answer is not 100%. What do I mean by that? For the trial version, all pages are pre-compiled and NOT updatable. Meaning if you open up any of the .aspx file, you won't see anything there. However, for the commercial release (either through purchase or if you are approved for being a non-profit organization), then you will see the source code of all the .aspx code behind. 

At this point, we do not provide any API for customers as we are not ready to do that just yet, but if you have ASP.NET developer in house, by reading the code, you will be able to customize the logic to certain extend. Just a note, we do not provide offical support for customizing the application. However, if you post any questions on our forum in the future, we will try our best to answer your questions.

Other than the software itself, we still have a few things left to do. For open source projects or special individuals, we have a special “Approval” process to implement. Once approved, these people will be able to get unlimited licenses for our software and this has to be incorporated into the customer management portal that we have here for our customers.

Furthermore, we are near completion with the documentation and user manual, it should answers a lot of the simple questions that you might ask yourself. It will help a lot in case you  have any questions regarding the usage of the software.

In addition, forum has to be updated as our existing forum is missing a few features that we need. I’ve been creating a new forum using NHibernate as we are already considering restructuring the data access layer of our software using NHibernate for the next release. This will expand the databases that we can support for the needs of different customers. It gives us a good starting point.

Finally, our purchase system use Paypal on the backend, we’ve been testing in the Paypal sandbox account and we are ready now to switch to the official commercial version this week. We think the transition should be rather painless and all that’s left to do is to re-test the purchase process once again.

Thanks again for your patience and we hope to see you again in two weeks.
Java to .NET, Back To Java Again, My Little Impression of The Two.
After 8 month of dedicated time on my project management software using .NET 2.0, it's finally done and meanwhile, back to my Java day job agian.

Been at my new job for about a week and I have been trying to setup the project Skelton using JSF, Hibernate, Spring and deploy using Tomcat/Jboss/Websphere servers in Eclipse, my my, it is me or is that a *** load of stuffs? 

Honestly,  I personally don't have any strong preferences as Java is better or .NET is better, but the issue is in setting up the environment first before starting any real development. How many Java developers (and I don't care how senior you are) can honestly say you don't get a headache when you tries to setup your projects? Before we are done setting up Java environment, the .net developers are probably already done coding data access layer and sipping their hot coffee while watching TV.  So far, these are what I have downloaded in order for me to START the setup...
  1. JDK 1.5 (similar to .NET SDK)
  2. JRE 1.5 (similar to .NET runtime)
  3. Eclipse Core (similar to Visual Studio)
  4. Eclipse WTP project (similar to Visual Studios's build-in projects like class projects, web application project and etc)
  5. Hibernate IDE
  6. Spring IDE
  7. Ant  (NAnt)
  8. Maven 2
  9. Tomcat 5.5  (Tomcat/JBoss, Websphere is similar to IIS)
  10. JBoss 3.2
  11. Websphere Server
and I haven't even included the *** loads of open source projects like
 
  • Jakarta commons,
  • myfaces,
  • taglibs,
  • displaytag,
  • JSTL,
  • BSF,
  • AXIS,
  • Xceres
 
just  to name a few in addition to reading all of their documentations such as configurations, requirements, dependencies on other libraries and what not.

I addition we have to really pay attention to the versions of the jar files, some frameworks are compatible with a  v1.5x jar while some other frameworks simply do not work with it.  Can you say jar hells? (So you spoiled .NET brats, stop complaining about your stuff!)

While reading up the gazillions types of configuration files and gotchas, I realized that I had a problem in Eclipse. How do I setup multiple projects in a eclipse workspace (equivalent to the idea of a Visual Studio Solution) and each on their own needs to be compiled into jar files (dlls in .NET)  and yet, when I reference them in yet another web project  which will be deployed as .war file (similar to ASP.NET web deployment project, generate one dll for the whole website), so they do not produce duplicated libraries? 

For example, in my Data Access Project, say I reference log4j and in my BusinessLogic Project, I reference log4j again. When I generate the two jar files from the two respective projects, I certainly do not want log4j get to included twice and more importantly, don't include two different versions of the same log4j!  It just make sense to move a single log4j.jar onto the upper level. In addition, I have another web app project. I want Eclipse to build all three projects, generate the jar files for the Data Access Project, Business Logic Project and automatically drop them into my web app's WEB-INF/lib directory, and lastly build the war file. This way, I can focus on my web project as that's the only one i really "cares". Eclipse just doesn't seem to have it in it. Its java build path is only for compilation time, but it doesn't do anything in terms of deployment (Now I miss Visual Studio)

My first reaction was a customized Ant script is needed to build/deploy project, but then it's just so tedious, to write "mkdir", "delete", "targets", "dependency", "classpath", "includes" and etc etc. I'm just REALLY lazy.  So guess what? I tried to find an easy way out, google it first and to my surprise, I ran into the Apache "Maven" project which is so absolutely fantastic, it offered more than what I had in mind,  I was simply beyond joy.

Maven is somewhat similar to the "Guidance Package" in the .NET 2.0 world and you can build customized "software factories" using its framework. What's more interesting is that the libraries you need such as log4j and Junit, it's downloaded during compilation from a gigantic online repository sorted like C-Span for perl and stored in a local "repository" for caching, no longer do you need to manually download the prerequisite libraries before-hand.

This lead me to test out Maven 2, it included quite a collections of "software factories" such as plain java projects, web projects and etc. After a few simply commands, Maven automatically created the structure for me and then by simply typing "mvn eclipese:eclipse", it generated the whole Eclipse project files for me!! Import them back into Eclipse, and viola, a best practice project structures is ready for me to code and I can be on my happy way to Spring/Hibernate. Though I have a feeling, integration of spring/hibernate will not be an easy task either.

I do wish though, Maven 2 could have a software factory  that mirrors what we get in our .NET's Web services factory which automatically sets up several different projects (Business Entities, Data Access, Business Logic, Services Data Types, Services Contracts, Services Implementation and Web) and then probably references them with each other. It'd greatly simplifies the time any Java developers have to spend before starting up a project. This in my opinion, the biggest hurdle I have in Jav. , .NET/Visual Studio simply have an upper hand to get anybody start developing application faster.

Maven2 does have an Eclipse IDE plug-in which helps you build dependencies and deployment (with a little bit manual intervention required, such as setting a parent pom.xml above all projects) and what not, but in my opinion, these features should be by default, included in Eclipse, similar to how Visual Studio auto compile projects into dlls and then properly drop the dlls into the "/bin" directory of the projects that references them, no duplication.

Of course, again Maven2 offers more than simply setting up project structures, additional features include the build-in support for unit testing and etc. This is actually something the .NET Guidance Package could improve to make it easier. (btw, is it me or is it just hard to write custom guidance package/software factories in .NET?)

Having said all these, integration of various java projects together really do take a lot of Java people's time, it's no joke, but it's not desperate. For example, the open source project "AppFuse" does a fantastic job integrating various frameworks for us, I strongly encourage everyone to give it a shot and see how much time it saves you.

So which platform do I like? My impression is Java offers a lot flexibility and choices, but at the same time introduced the "Paradox of Choices", having so many things and integrate them together is no easy task, it simply overwhelm the human brains. .NET on the other hand is in a controlled environment, less choices, but easy to develop.

You can just feel the culture differences between the two camps. Java pps typically seems to like developing very good "high-level" programming frameworks like Eclipese (awesome features in areas such as its plug-in), ant, maven, struts, hibernate and spring(which has been ported to .NET as well) while lacking in areas of better end-user experiences.

.NET pps focus more on helping developers to do less thinking, happier end user experience while lacking in  originality and innovations (I simply don't see the amount of brilliant open source projects in .NET) 

To make an analogy, Java ppl are Americans who invented car, brilliant minds who think outside of the box, but American cars simply is not as enjoyable :)  .NET ppl are Germans, make absolutely BEAUTIFUL/enjoyable cars, but did not invented anything particularly stunning and the car breaks all the time!  

This ends my little speech of the day
Install Tomcat 5.x
I haven't used tomcat for a long time because ever since, I've either used BEA Weblogic  or Websphere, just never went back to tomcat.

My new job is here, so I thought it's time to play with a few things at home, natually, tomcat is my top choice and so, let me document down how I get it installed.

JDK 1.5 Installation

1. First,  jdk 1.5 is required. To download it, please visit JDK 1.5 Resource (which is called 5.0) a bit confusing...  I chosed  JDK5.0 update 11 (just the jre and other core utilies since i don't need NetBeans IDE nor web services support at this minute)

2.  Install the jdk1.5 setup.exe, the next step is setup enviornment variable "JAVA_HOME" and have your path set to "$InstalledDirectory/bin/" so your command line recongizes commands like "java" or "javac".

To set the enviornment variables

a) right click on "my computer" on your desktop.
b) chose "Advanced" tab and click "Enviroment Variables" button on the buttom.
c) click "New" button on the bottom of "System Varaibles",  add a variable name "JAVA_HOME" and point it to where you installed your jdk.
d) from the exisiting System variables, select the "Path" variables, in the beginngin, add the directory where you installed your jdk/bin/ , and make sure you have a semicolon at the end.

and that's all there is to the JDK part of setup, let's move on to Tomcat.

Tomcat Installation

First, go to the Apache Tomcat project,

1. Download the "Core" package.
2. Download the "Administration Web Application" package (When I was using it awhile back, I remember the admin application was included by default, I guess it's changed since then..I'm definilty getting old, hehe)
3. Unzip the "core" package into a directory of your choice.
4. Open up the "Administration Web Application" temporarily in your zip utility, you'll see two folders /server and /conf.   copy the admin folder inside /server/webapps/ into step 3)'s /server/webapps.
5.  Similar steps for /conf and copy the admin.xml  into step 3's /conf/Catalina/localhost/
6.  Now, let's go to the directory of step 3), find /conf/catalina/tomcat-users.xml, add two roles
"manager" and "admin"
and another user with these two roles, say "tester" like the following


  <role rolename="manager"/>
  <role rolename="admin"/>

  <user username="tester" password="changeme" roles="admin,manager"/>
7. Let's start the tomcat web server. Open up your command prompt Start->Run->type cmd
8. switch to the directory in step 3 (cd  blah/blah)
9. cd into bin directory
10. Type catalina run

You shall see the default Tomcat page and from there, you can log into the "web administration tool".

I'll talk about how to configure the equaivlent of "virtual directories" of IIS in tomcat in a later time.

Happy Tomcat.

Where are all the Java Bloggers?

As much as I enjoy .NET developement, I can't help myself but to dive into the Java development again. This time, I'm hired as a consultant to work on this application using Hibernate, Spring, Tibsco and Oracle.

I honestly haven't touched Hibernate/Spring for awhile and a lot of things seemed to have changed. In the past two years, I've enjoyed ASP.net development so much that I haven't followed up with the Java technologies that much.

I just happend to notice that when I key in a java issue in google, it doesn't turn up many java bloggers where in .NET, almost any issue you might encounters,  you are bound to see a few blog posts about it in the first 10 results.

Where are all the Java bloggers? I see a lot blogs here on blog.sun.com, I guess I must not be searching on the right topic?

Anyhow, after reading  much about of Hibernate/Spring, I see some very poweful things, hopefully when I'm done with this application, I can port the knolwedges I gain from developing it and apply them to my .NET applications.