This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Productivity increase by using Jakarta Commons

 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A newbie to Jakarta Commons, I like to find out what is the productivity increase like for someone using Jakarta Commons in typical web application development. Comments from the author of the book appreciated. Others pls comment too.
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Frankie Cha:
A newbie to Jakarta Commons, I like to find out what is the productivity increase like for someone using Jakarta Commons in typical web application development. Comments from the author of the book appreciated. Others pls comment too.


My company have used common Pool, common lang, common Primitives, common Math, and common IO. It is seems that a lot of common ** should be in core JDK in future. When you want to write a XXXUtil class, try to find one common first
BTW: if you are using Strut, you should know that Validator,Digester aready include in Strut (actually they are abstracted from strut).
 
Author
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Commons adoption will lead to a significant rise in developer productivity. I can say that from first hand experience as on almost all J2EE projects at Rightrix Solutions we use Lang, Validator, Digester and DbUtils. DBCP and Logging are also used quite commonly.
I dread to think of how much time it would take for developers to write custom code to do the tasks performed by these components. Parsing XML, validations, connection pooling, logging...
Even simple features like those provided by the Lang component will take many days to write and test thoroughly.
---
Pro Jakarta Commons
Implementing DbUtils (An article based on the book's contents)
Jakarta Commons
 
Xie Ruchang
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Harshad!
Two more questions.
A. How big is/are the jar file(s) for Commons?
B. When come to deployment, what are some tips for version control, since it is not part of JDK. Is this covered in your book?
Best Regards
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Frankie Cha:
B. When come to deployment, what are some tips for version control, since it is not part of JDK.

I am far from an expert in version control issues, but it is my firm belief that the current best practice is to have .jar files under version control. An alternative approach could be to use a build system like Maven which manages library dependencies for you (although this doesn't help much if the particular version your codebase is built against is no longer available online).
 
Harshad Oak
Author
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Frankie,
A. How big is/are the jar file(s) for Commons?
>>> Most jar files are less than 200 kb
B. When come to deployment, what are some tips for version control
>>> Version control should not be very difficult as fortunately most components have the version number as part of the jar file name. Also older versions of a component can be easily downloaded from the Jakarta site.
>>> In cases where one component depends on another, the compatible versions are stated.
>> As Lasse suggests, keeping jar files as part of the version control mechanism could also be a good option.
Apress Author Page
Pro Jakarta Commons
Implementing DbUtils (An article based on the book's contents)
Jakarta Commons
 
Xie Ruchang
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Mike, Lasse and Harshad
[ April 14, 2004: Message edited by: Frankie Cha ]
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

. When come to deployment, what are some tips for version control
>>> Version control should not be very difficult as fortunately most components have the version number as part of the jar file name. Also older versions of a component can be easily downloaded from the Jakarta site.


I agree with having jar files under version control, however it is a pain when jar files have different names. e.g. when having the a version number attached to the jar.
considerations:
1. if you dont have a version number then you can have it under real version control and check in a new version, promote or label it and all dependencies are fine. Downside to this approach is that you cannot see which version of the jar you are using. e.g. log4j_28.jar or log4j_27.jar since both files will be renamed/checked in and promoted as log4j.jar.
2. If you are using a version number in the jar file, be aware that you have to check in a new file, label or promote it, then make sure you do not label or promote the old one and make sure the dependencies in your projects are still ok e.g. in meta-inf directory files.
so yes you need to have the files in version control, but there are several ways to do it, all with downsides to them.
regards,
friso
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
back to the original comment

I like to find out what is the productivity increase like for someone using Jakarta Commons in typical web application development.


yes, i can see definite increase in productivity, but you will have to learn the commons first. (like myself) this will take time, and is called investment.
 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by frisode jonge:

I agree with having jar files under version control, however it is a pain when jar files have different names. e.g. when having the a version number attached to the jar.


I disagree with you. Why should i have version control of jar files if i�m not developing it? It makes the repository bigger without a good reason.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Vinicius Boson:
I disagree with you. Why should i have version control of jar files if i�m not developing it? It makes the repository bigger without a good reason.

The idea is to manage configurations of your whole software -- including the correct versions of 3rd party JARs. If you keep your libraries under version control, you don't need to read "README.TXT" in order to figure out which version of log4j.jar should you download. You just need to tell the version control system that you want "the configuration of the day before" and you'll get it.
[ April 16, 2004: Message edited by: Lasse Koskela ]
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have major problems with the fluidity of the Jakarta Commons public API.
The last (or was it a bit earlier) release changed so much in the public API that a lot of code using them needs major changes to work again.
This is not good of course and a major reason why I'm wary of using them...
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks lasse,
you are right, i want to have my jars in there because when i take my stuff out of pvcs (any label) it needs to work without me having to add jars and configuration settings. So yes i am going as far as config settings for websphere.
friso
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Jeroen Wenting:
I have major problems with the fluidity of the Jakarta Commons public API.


Looks like you have used quite a few of them. I think i will employ digester and httpclient right now in one of our projects.
I read the excellent java ranch article on BeansUtils and that looks impressive as well. Can you list those specific apis for the benefit of others so that we will also be wary of the ones that constantly undergo api changes?.
 
Xie Ruchang
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,
Back to the version control thing.
Supposed I have three projects A, B and C using Jakarta Commons (JC). These projects vary in their development pace and may not synchronised to a particular version of JC. When checking in each version of A, B and C, should I include a copy of JC with each project.
Approach One
For example, check in A1.0+JC1.0, B1.3+JC1.1, C2.1+JC1.0
or
Approach Two
Just check in A1.0, B1.3 and C2.1 and separately JC1.0, JC1.1.
Approach One will waste space but approach two will make the integration process complicated.
Comments you folks please!
 
friso dejonge
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you normally do is just give jc1.0 and jc1.1 a different label or promotion group and get all files with that promotion group for that specific project.
so project A gets label A and version JC1.0 gets label A
project B gets label B and version JC1.1 gets label B
project C gets label C and version JC1.0 gets label C
Now get all files with label A, and you get the right version. Then if project A upgrades to the later JC1.1 just change the version label on the file in version control
The waste of space should not concern you. In normal files it stores a delta. However I assume in binaries there cannot be a delta and it stores a complete new revision anyway. So if you have two versions of a binary you will always have the same amount of discspace that you use.
If you need more info dont hesitate.
regards,
friso
 
a wee bit from the empire
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!