March 2008 Archives

Dejan Bosanac

AddThis Social Bookmark Button

Dependency management was always one of the crucial Java project management tasks. It’s where tools such as Maven and Ivy make all the difference and allow developers to maintain their project dependencies in an easy way. There are two important elements for this to happen:

  • Centralized repositories - containing library JARs
  • Metadata - describing those JARs and creating repository structure

This is something we have for years thanks to the Maven developers. But if you ever tried to manage dependencies manually in your project, you know how tedious this task can be:

  • Find a library you want to include
  • Find out its metadata (groupid, artifactid and version)
  • Put an appropriate XML snippet in your project management definition file

I find step number two especially tedious and that’s why I’ve always thought we need an additional component to make our lives a bit easier. That missing link are “indexes” that would make repositories easily searchable and provide infrastructure for building useful tools for developers.

Fortunately, there has been some activity in this area lately. First, Eugene Kuleshov wrote about new Maven plugin for Eclipse and general purpose Nexus indexer. If you use Eclipse for the Maven-based project be sure to try this stuff out. It’s really refreshing approach to working with your poms (especially a quick search funcionality).

While I was at this, I wanted to see if there were any progress on web sites that offers similar services (which I think is important tool for Java community). mvnrepository.com has some problems with stability (and performances) lately and I was glad to see Xavier Hanin’s new project called JavaRepo. It’s a promising start, (simple UI and useful info) and could be made into a really useful service. What I would like to see from a service like this is:

  • Ability to add additional public repositories (snapshots, etc) and snippets
    for configuring poms with appropriate repository definition
  • Ability to “subscribe” to a module and receive new release notifications in
    news readers (RSS/Atom)
  • Better result sorting (newest revisions first, relevance, etc.)

I know all this takes time to brush, but it’s great to see things are moving in the right direction.

Shashank Tiwari

AddThis Social Bookmark Button

If you haven’t read anything really silly in a long time, then here it comes!

The caption of a picture in the Wired magazine reads –
“Jason Fried (left) and David Heinemeier Hansson of 37signals helped develop much of the software that has enabled Web 2.0. Photo credit: Jessica Wynne.”

Here is the link to the original article and the photo — http://www.wired.com/techbiz/media/magazine/16-03/mf_signals

I am wondering if Wired has created a new definition of web2.0! Folks at zillions of companies including Google, Yahoo, Wikipedia, Adobe, Sun, Microsoft and ….developers programming in tons of technologies including JavaScript,PHP, Python, ActionScript, Java and ….you are all out of luck :)

What do you think?

Tim O

AddThis Social Bookmark Button

“Get Over Yourself” is advice I’d give to anyone trying to get into technical writing, it’s the technology, it isn’t you.

It isn’t like I’m against tone and color in writing. I enjoy Jim Elliott and Brett McLaughlin, and I learn a lot from both of them. But, they are original, they earn it. I like Scott Oaks style, personable, but not over-friendly - Java Threads was one of the best books I’ve read. What I’m getting sick of is technical writing riddled with too many jokes, asides, stories about extreme sports. I don’t like reading books where every chapter starts out with a story about hiking, or a Daily WTF story about some horrible mythical corporation full of complete idiots (I’ve worked there, I’ve written those chapters).

As an industry, I think we’re too focused on personality these days. There’s a class of conference rock stars that runs around and talks trends, and I think some of this has leaked over into the way we write technical books. Everybody writing a book these days wants to become “that guy with that blog that I saw at that conference”. So in the tradition of Charles Nutter, I’m going to ask the question: Can you effective be one of those travellng conference rock stars? Write a series of well written books? And, be a formidable coder on several core open source projects at the same time? Probably not. So, let’s stop building up the “Coder” as “Superman” idea.

These days, I’m ready for technical books with a little less personality and a lot more substance. Please don’t get me wrong, there are certain authors I like personality from, I’ve already listed a few whom I read, but whenever I come along a new technical book these days I’m looking for technical content, not a new best friend. Antisocial? Yeah. Totally, I’m the guy at Starbucks that doesn’t appreciate the small-talking Barista. Alone? No, I think anyone heads-down at work, reading a book about something like Ant, wants a concise, easy-to-read reference that keeps the chitchat to a minimum.

I’m tired of your funny technical stories and your metaphors: please, just the facts. OK, wait, calm down. I’ll read and enjoy the witty stories, as long as the ratio of hard technical content to witty stories is greater than 10:1.

It’s a little harsh, sure. But, I don’t think I’m alone in this idea. I was just talking to someone who bought a new book on Ruby the other day. He told me that while it was informative, he found it difficult to scan. Difficult to pick out the one or two sentences he needed to read in 5 minutes. I can’t say I haven’t had that happen to me lately….. I’m turning down the color commentary dial at least for the next few books.

PS: It is also a message I’d give to the subjects of this photo in a recent Wired article. Vamping coder rock stars. I’m sure the persons pictured in this article had no control over the Wired photographer, but reading this makes me want to write more Java. Honest, a picture like that makes me want to attend less conferences, write more books, and get heads down into some coding.

Growing tired of the rock stars in programming that hire professional photographers to bring dramatic lights to the studio so they can looked seductively into the camera for some Ruby on Rails blog they are hosting (no DHH I’m not talking about you). I think we’re straying from technology and getting too much into personality. (Ironic, where’s the technology in this post.)

(For the record, this is about no one in particular. Matt, this isn’t about you. Raible is someone I read, listen to and I follow his recommendations frequently. Charles Nutter, also not about you. If I were president, Charles Oliver Nutter would be in my cabinet as the first Secretary of Dynamic Languages. This is about everyone. And, before I make DHH curse at me, this isn’t about you, I’m sure you find that photo as ridiculous as we all do. Hell, people, this is about me.)

Shashank Tiwari

AddThis Social Bookmark Button

In the last few years India has emerged from being a small outsourcing destination to a large computing powerhouse (especially as far as programming resources and their critical skill sets go). Its one place that boasts of millions (not just thousands anymore!) of Java programmers. One reason for this growth has been the love for Java among enterprise customers up here in the United States, who outsource work down to India, and another has been the continued support from Sun and its affiliates (many of who train around its well recognized certification programs) in providing ample training and mentoring infrastructure in India. Yet, one more important reason has been the use of Java (over its traditional counterparts — i.e. C & C++) as the language of choice for instructional purposes in teaching programming languages at educational institutions. Finally last but not least, Java is easy to learn and there is too much out there on the web to help you get started :)

In the last couple of years Java has seen strong competition from two directions. The growth of Rich Internet Applications (Ajax and Flash platform based) got many Java programmers to use non-Java UI technologies with there Java servers and the advantages of dynamic languages (like Python and Ruby) lured the Java programmers away from the language towards efficiency and “more-with-less”. This phenomenon is global but local impact (in the United States) has so far been the greatest. However, it got me curious to see how these changes were impacting the millions in India. I started out by finding out the “State of Flash based RIA Adoption” by engaging in a conversation with an active developer and community leader to get a feel of what’s its like out there in the field. I plan to cover Ajax and the dynamic languages related discussion in subsequent posts.

Paul Browne

AddThis Social Bookmark Button

My fellow Java Developers. Two years ago I wrote an article on ‘Web 2.0 and Enterprise Java - move over Struts‘ looking at what was likely to replace Struts 1 (then and now a de facto web standard). How did our predictions fare?

Remember that article (and this one) isn’t looking for technical best, but which is going to be a best investment of your time to learn (in a mercenary commercial sense). And if you’re deciding which to use in a project , which framework is going to be easiest to support in 5 or 10 years time?

Broadly speaking, the frameworks we talk about break into two types: those that treat the web as a set of pages, and those that treat the web as a set of components (think Visual Basic, Delphi or Oracle Forms act-a-likes).

So , what has changed in the last 2 years:

  1. The rise of Spring. Not only has it gone mainstream, but the Spring MVC, Spring Webflow and Spring-JavaServerFaces are very powerful and widely used web frameworks. A sign of how things have changed is that for Sruts 1 the Spring guys wrote the integration for the (then) bigger Struts framework. For Struts 2 , the integration was provided by the Struts community. With the forthcoming Spring 3 release the framework is increasing momentum; More annotations and less XML in Spring MVC; Rest Web Services out of the box, support for Dynamic languages like Groovy and Spring Webflow becoming a more ‘just use it where you need it’ solution.
  2. Adobe Flex and OpenLaszlo - Flash graphical interfaces on the Web, built using Java. I don’t think these will be *the* mainstream choice but I do think the will be more than a just a niche. And for design led companies, nothing else (not even Microsoft Silverlight) can come close in terms of a user ‘wow’ factor.
  3. JavaFX and Applets done right (Jim Weaver has a good article on this). More of a competitor to Adobe Flash as both are rich content in the browser using an easily obtainable plugin. JavaFX will appeal to developers because of it’s Java like syntax. I hope I’m wrong, but for rich web content, would you put your money on Sun (an Engineering led company) or Adobe (an almost apple-like design led one)?
  4. Frustration with JSF (Java Server Faces). For the last 3 years I’ve thought that ‘*this* is the year of JSF. I’m still waiting not because of lack of demand (as web apps become more complicated and use more Ajax they become more like the JSF component based model). It’s now uphill for JSF as I (and a lot of other Developers) have given up. I’m still waiting for the ‘EJB 3′ moment when JSF becomes more simple and more usable. Remember , we ‘re not talking about technically best, but which is going to be in widespread use.
  5. Google Web Toolkit (GWT). Looking at it one way , GWT is JSF done right - a component based web framework , but one that is fast and has a lot of community support. Even then it took me a long while to warm to GWT - I’ve bad memories of web-components that hide their internals (remember Microsoft Interdev 10 years ago?) . What got me over the hump was thinking of GWT as a compiler not to Assembly or bytecode , but to Javascript and HTML.

How has Struts 2 got on in the meantime? I’m not sure. Remember , Struts 2 is very different from Struts 1. Conceptually it’s very similar to Spring MVC (Simple Java Beans based with configuration); Slightly easier to learn and maybe slightly less powerful than Spring (although both are more than capable for most Enterprise web applications.

The ‘I’m not sure’ bit comes from two (non technical) factors:

  1. Struts 2 hasn’t achieved the massive Enterprise developer mind share that Struts 1 did. It’s a better framework, but it’s got more competition.
  2. If you’re using Spring in the middle tier, why not have one less framework and use Spring MVC (instead of Struts 2) in the presentation layer as well?

Back to the previous predictions , how did we get on?

Scenario 1: Adding Ajax to existing Struts Applications. Use AjaxAnywhere - closest to the approach taken in the article Sprinkle Some Ajax Magic into your Struts Web Application. Despite writing this article , I see the frameworks evolving rapidly to the point where you would only take such an approach for adding Ajax to ‘Legacy’ applications.

How did we do? I’d maybe widen the choice of Ajax Libraries (to include DWR , Dojo, Prototype and others) but the basic idea of evolving rather than replacing your Struts 1 app still holds true.

Scenario 2: Need Ajax Now for a new Java Application. Use Appfuse as it gives Struts, Ajax (with DWR) and the possiblity of JSF integration now, all ‘out of the box’.

How did we do? I still recommend AppFuse, as it combines (name-your-web-framework) with Spring Hibernate(and other ORM) and Maven. However I’d now tend towards choosing Spring MVC (unless you’ve a reason to use Spring 2), given that you’re probably already using Spring in the mid tier.

Scenario 3: Medium Term. Use an implementation of JSF (either MyFaces or whatever Appfuse promotes - probably Struts Shale). Struts Shale (JSF) has so far released only ‘overnight’ builds. Apache MyFaces (JSF) tool support and Ajax capabilities are likely to improve over time. Both Struts-Shale and MyFaces are likely to play well with AppFuse , making it a safe bet for investing your time checking it out.

How did we do? Struts2 and Spring both still give you migration route to JSF. But do you want it?

So out of the creative ajax-induced chaos of 2 years ago, I see 4 or 5 clear choices in Enterprise web frameworks: Struts 2 (as a follow on from Struts 1). Spring MVC, due to the huge mindshare Spring has on the mid-tier. Google Web Toolkit , both as a natural home of frustrated JSF developers , and because who’s going to argue with the people who gave us maps and mail? Flex, because Flash apps done well just look so good. And JavaFX, because Applets-haven’t-gone-away-you-know.

In my view, we would have been delighted to have any of these framworks 5 years ago. And each (for different reasons) is likely still to be popular in 5 years time. Your missions now is to pick the one that suits your project needs.

Robert Cooper

AddThis Social Bookmark Button

I’m back in the Dirty South from my trip to Crested Butte for the second annual Java Posse Roundup. As you can see in the photo above, there was 6 to 10 feet of snow over the whole area. Far and away the most snow I have ever seen in my life.

Once again, JPR was a great experience. Unfortunately, it seemed harder this year to make it to all the sessions I really wanted to attend, because I wanted to attend most of them. While the theme of “Don’t Repeat Yourself” was honor to some extent, the session topics ran the gamut from examining the Java EE roadmap to Networking for Geeks, and from Agile development to “Why open source people are weirdos.”

Interestingly, a good bit of the discussion this year was not directly about Java-the-language. Jim and Tobias from the Jython project were there and providing a lot of perspective on JVM language implementations. There were hack sessions with Scala, organized by Joel Neely and Dianne Marsh. Chet Haase flew his new Adobe flag and gave a “Filthy Rich Flex” boot camp. On the “off-Java the platform” tip, the week opened early Monday afternoon with Dick Wall holding court at Bruce’s house with a great Q and A on the Android platform and philosophy.

The evening lightening talk this year, once again, stand out as a highlight of the week. 5 minute blitzes on topics like Django on Jython, the history of the lowercase “a”, Yahoo! Pipes 2.0, Marketing for Javapolis, and the operation of the four-stroke internal combustion engine. Video of these session was taken this year using Joe’s camera, so expect some (perhaps not so professional) video of this to wind up on a *Tube near you soon.