Opinion Archives

Shashank Tiwari

AddThis Social Bookmark Button

Its about 6.30PM here in Prague and the day 1 of The Server Side Java Symposium (TSSJS) is wrapping up for the day with an award ceremony (sponsored by GigaSpaces). I am too tired and sleepy to carry on after yesterday’s long flight and lack of sleep but thought of posting a few interesting things that I noticed here at the symposium today.

Firstly the venue and the setup is pretty cool and there are over 300 people from many parts of Europe. The day started with a brilliant keynote by Stephan Janssen. His topic being: Supporting the RIA Space. (A Java conference kickstarts with a talk on RIA — interesting! isn’t it?). If you were at JavaOne this year and attended Stephan’s talk then you probably heard a lot of this. I had to step out of his talk a little early to get setup for my own talk, which followed Stephan’s. I spoke about JPA/Hibernate and RIA integration. Was happy to have a house full of attendees at my talk but was surprised when I saw only a few hands go up on my question: “How many of you are familiar with RIA?”. In fact a few were getting familiar with the subject only from the keynote that had preceeded my talk. Very interesting, again!

TSSJS speaker lineup is quite impressive. There were talks by many well known people, including Nati Shalom (GigaSpaces), Alexandru Popescu (InfoQ), Michael Keith (EJB 3.0), Guillaume LaForge (Groovy/Grails), Holly Cummins (IBM) and Geert Bevin (Terracotta, UMYN & RIFE) on day 1 itself. There were many other good speakers today: its just that I presume the ones I listed are better known than others. There are many more good speakers in the next couple of days to come. Obviously I could not attend all the sessions today so it would be unfair for me to comment much about the ones I never even peeked into.

Both the Groovy talks (Alexdru’s and Guillaume’s) were cool and well attended. Java Performance (Holly’s) and JVM Clustering (Geert’s) were very popular as expected.

These days when you go to a Java conference its a lot about dynamic languages (and their existence on the JVM) and the first day here reinforced the same feeling. However, one interesting change was a company called ZeroTurnAround , which promised dynamic redeployment of Java applications (far better than the JVM HotSwap). Their tool is called JavaRebel (I spoke with Jevgeni — who carries a fascinating title of Lead Rebel in the company) and he was kind enough to walk me through a lot of examples where Java code could be redployed effortlessly. There message could be interpreted as: “Java can be dynamic in some ways too, without being dynamically typed or interpreted!” If you are a Scala fan, you will be happy to know that JavaRebel comes built-in with Lift, the emerging Sacla framework. Talking about frameworks, there are too many in the world of Java to catch up these days and that is the topic of my next presentation at TSSJS this Friday. I am not going to miss the opportunity to express my frustration dealing with over supply then! Wish these framework makers found a way to create alternative energy sources; with their commitment there with be no oil crises today :)

More tomorrow!

Robert Cooper

AddThis Social Bookmark Button

Vincent Pardington has a good post up on DZone beginning an SOA pitfalls series. His first post, on NIH in the SOA world is a good one, but I think misses one important point:

First of all, the idea of a SOA is to reuse existing services. If department A builds a get_personal_details service, there’s not much point in department B building a get_address service. Assuming the get_personal_details service returns the full address.

Of course, there may be multiple reasons why department B would do this:

  1. They don’t know about the get_personal_details service. In this case there is no proper service registry, a point we will discuss later.
  2. The way they design their application does not cause them to think about reuse. This is one of the things that can happen when applying Big Design Up Front. Something we will also discuss in a future blog (way to build up the suspense, not? ).
  3. They’ve known about the get_personal_details service but they decide not to use it. Maybe they don’t know what it does exactly, maybe they don’t trust department A to get it right or keep it right, or maybe they’d rather have full control over the implementation. In this case, you have some classical NIH hitting you. This is the time to discuss the ownership of the services and allow both department A and department B to feel in control.

I think there is one more here that is organizational. In my experience, services in the enterprise tend to be developed as part of an application. The problem is, they aren’t staffed as standalone products after the application for which they were originally designed goes into maintenance mode. Let me set up a #3 to Vincent’s storyboard:

Team B knows about the get_personal_details service, but the address returned doesn’t include the shipping code for the address. They would love to use it, but Team A is now working on the next project. Team A’s boss doesn’t want to spare resources to amend expand the service, and Team B’s boss doesn’t want to take ownership of the service.

The problem is one of perspective. In reality, Team A built TWO applications: One for the end user and one for developers and they should be slotted to do ongoing enhancements to either one of those. I know at Manheim there was an earnest effort to establish a product ownership system fro the “Services” products. The problem there was, nobody in management wants to own them.

I know there was a great article in ACM Queue a little over a year ago about the services infrastructure at Amazon. Their solution was to treat the services products as a profit center: every call back to underlying services was “billed” to the application group making the call. This has the effect of encouraging the service owners to add value to the services infrastructure, as well as encourage upstream applications to be frugal in their stress to the back end. I found this to be a really compelling structure, but I can also see how it might lead to some… poor… software decisions in a less disciplined organization.

Robert Cooper

AddThis Social Bookmark Button

So this has made the rounds on /.

I will say this about UML: some of us are visual people. As the token Left-Handed guy in the software world, I admit, I see the world in somewhat visual terms. I think some UML is valuable. Class diagrams, obviously. Sequence diagrams, sometimes. Use case diagram, rarely. But this goes to a larger issue with UML:

UML is not a process.

Is RUP dying a miserable death? Yes. I admit, I still think Coad is a demi-god in the OOAD world. Actually, even if you “know” the UML “answers” on the IBM cert exams, you are likely overly ceremonial. However, if UML is suffering it is because of this one fact:

People don’t pay for tools anymore.

TogetherJ 4.x was amazing. That was the last release before it became redonkulously expensive, but I loved it. Today I use NB. There are a couple of commercial UML tools, but Sun has a free UML tool for NetBeans that round trips. Frankly, the problem with Sun’s is the printed output blows, and they certainly don’t have the fantastic integrated UML/JavaDoc output that I remember so fondly from Together.

Is UML dead? No. However, I think UML documents have a place in the Agile world that they have lost. The problem is UML-as-Process was never really a great idea. UML-as-documentation in an Agile-Refactoring-CI world: sure. Someone just give us the tooling at a reasonable cost, and UML will come back with a vengeance.

Shashank Tiwari

AddThis Social Bookmark Button

Last year JavaOne got the UN guy and was trying to eradicate poverty; this year they got Neil Young and were showing off the cool stuff. CNET blogger Dan Farber has a good write-up and the video that tells you all about Neil Young’s appearance at JavaOne. Read it from the source. I will avoid repeating it.

The good part of this year’s showoff is that Blu Ray and BD-J are cool in reality and they do what they promise. It’s not poverty eradication, its higher resolution and better interactivity and better digital archiving so I guess its more achieveable ! If you know nothing about Blu Ray or are confused on the value it adds then maybe you will benefit from seeing Sun’s Webcast on Blu Ray and browsing hdcookbook.

With the web continuously morphing into the read-write digital media network, applications becoming increasing interactive and the dividing line between business applications and entertainment getting twisted if not necessairly blurred, its not far when quite a few Java developers may use technologies like BD-J to write their applications. To some of the so called — “enterprise developers” — this may seem alien and surely we are not talking about universal applicability of this technology, but don’t be surprised if such stuff starts creeping into your realm too.

The moral of the story (for Java developers) — “Start becoming cool, if you aren’t already !”
The question (for Sun) — “Is coolness directly proportional to increase in revenue?”
A request (to Google and Steve Jobs) — “Please stop driving everybody up the wall.”
A word (to the users) — “You are loving it :)”
A word (to speakers and event organizers) — “Start making friends with rock stars”

Shashank Tiwari

AddThis Social Bookmark Button

JavaFX.com is up and running! The problem is that it doesn’t work well on most browsers. The small fonts are unreadable when viewed in FireFox or Safari. The site takes a long time to load up. The only thing notable is the transition from one window/panel to the other. Considering almost everybody else can do this as well, I am a little confused what to look at and be impressed about :)

Maybe, I should be happy there is finally something there and not just vapourware, like we saw at last JavaOne.

For a second, lets take a look at what competition’s got :

Flex Showcase
Silverlight Showcase

Now you tell me, if Sun should have waited to get this all trim and proper or am I missing something out here?

Shashank Tiwari

AddThis Social Bookmark Button

Although JavaOne 2008 officially starts tomorrow, it commenced today with CommunityOne. Carrying on the trend that started a couple of years back JavaOne is continuing to emerge as an event for things more than just Java. For statistics sake at least 10% of the 391 sessions that make up the content catalog are about Groovy, Ruby, PHP, JavaScript or Python. Also like Java the conference itself it becoming a “platform” , with many mini events within it. There is the Groovy Meetup and the Agile Event and the Adobe presentations to name a few. Not to forget the numerous gatherings sponsored by Eclipse, JBoss, Adobe, Oracle and QCon are becoming events in their own right. Then there is the excitement around social networking at the event. So hope all of you at the event have fun mingling, learning, discussing and catching-up.

Robert Cooper

AddThis Social Bookmark Button

So I am going to break rules here, I am pretty sure, six ways from Sun-day (haHA!).

I am pretty sure I have never commented on this before, because, I agree with the 16,000 of you who will tell me it is in bad taste, but the first thing that always stands out in my mind about San Francisco? There are no black people here. Not that there are none. That is silly. I, however, come from Atlanta, a city with a 65% African American population. Moreover, I live in Midtown Atlanta. given the population averages, in my “hood” you are likely black and/or gay. In spite of its reputation, a city of straight white/asian/latino people is definitely a big change for me.

Tim O

AddThis Social Bookmark Button

In Choosing an OSS License and the Ext-JS saga, Graeme Rocher (of Groovy on Grails fame) reacts to the recent ExtJS switch from LGPL to GPL. Here’s a quote:

What they have effectively done is built up a community, taking full advantage of the open source model by accepting user contributions and patches and then turned around and kicked their own community up the backside. It is projects like Ext-JS that give open source a bad name. How can a company have faith in open source if the people behind it can’t even decide how to license the thing?

In related news, the Java Service Wrapper did something similar. Jason Van Zyl commented on the JSW license switch on the Maven developer’s list:

Project[s] that start using a commercially liberal license and then switch[ licenses] long into the life of a project is wrong. If you want to do the GPL/commercial thing then say so from the start. [There is] nothing wrong with this model, but for libraries and tools using a commercially liberal license is the best way to get community adoption and then to flip the license I find a little unsavory.

Anyone interested in forking it and maintaining the version that was not GPL?

In related news, ActiveMQ is opting to move away from Java Service Wrapper.

Update (5:45 PM Central): A little madness thinks ExtJS has discovered step 2 of the elusive Slashdot business model:

The model works because step 1 allows you to build a community around the more liberal LGPL license. In particular, as the LGPL is commercial-friendly, the community will include many people building commercial applications. Once the community is suckered in and committed, the license is changed, leaving them high and dry. Well, not quite: they can continue to use new versions of the library by buying a commercial license. Hence the profit!

Update (6:17 PM Central): More from Stephans Blog

Tim O

AddThis Social Bookmark Button

O’Reilly is sending a few bloggers to JavaOne, I’m going to be attending with my reporter’s hat on. We’re interested in knowing what your questions are for this year’s conference. We want to give you, the reader, a chance to let us know what you are paying attention and what questions you have for Sun executives this year.


powered by ODEO

Tim O

AddThis Social Bookmark Button

David Herron left a comment on the last blog post, here it is:

“ultra-fast Java Plugin”? Have you taken a look at 6u10? That’s where your ultra-fast Java Plugin is, it’s already been announced, and you can download it today to try out. “Openjfx looks like a ghost town” .. Well, inside Sun JavaFX is not a ghost town and I have no idea why there isn’t more public dev-list activity. “Clearly, development of the compiler happens somewhere else” is a big 10-4. If you scrolled down to the bottom of https://openjfx.dev.java.net/ you’d see a link to https://openjfx-compiler.dev.java.net/ which is the project for the compiler. “Consumer JRE” .. that has morphed its name into 6u10.

David, compiler list is clearly very active. Lot’s of Sun activity. Let’s see why the public project has such low activity. I have taken a look at the 6u10 (I had to fire up my old Vista machine to see it), it’s clearly an improvement, but read more for the obstacles to adoption. I can’t yet go to my managers and justify writing a customer-facing application in a Java Applet, maybe explaining the reasons why this is the case might provide some useful feedback.

Why JavaFx Public Lists are a Ghost Town?

There isn’t more public dev-list activity because there are not many people using JavaFx. There are not many people using JavaFx because there are not many consumers who have upgraded to Java 6. 6u10 is in Beta, so we can’t expect consumers to install it yet. Couple that with the fact Sun doesn’t touch the JRE or JDK for Macintosh and Apple’s Java 6 is still a “Developer Preview”…. who knows if they are going to put much effort into making sure that Applets load quickly. On top of that, for some strange reason all the Applets I try to run in IE 7 end up with this strange button that reads “Press SPACEBAR or ENTER to activate and use this control.” Maybe this newer version of Java might start to hit consumers in the next few months, how quickly do you think we can expect market penetration for the Java Plugin to equal that of the Flash 9 Player? How closely have you been working with Apple to make sure that the modular JRE is a part of the Apple development effort?

People are not milling about the JavaFx lists asking questions because there seem to be some major obstacles to adoption. If I’m creating some web site that needs to stream videos and display interactive Rich UI and I don’t want to turn away everyone using a Mac, I’m certainly not going to be very excited about the 6u10 update. It follows that I’m probably not going to consider JavaFx because of that. You guys are in a tough place because it is going to take time for 6u10 to hit the market, in the meantime, the competition continues to gain market share.

How to Really Make Applets Viable

I’d start considering Java Applets if I heard both of these hypothetical announcements from Sun…

  • (hypothetical) “Here at Sun, we’re watching the trends in the computer industry and we’re noticing that Apple has started to achieve real market penetration. Apple’s growth is phenomenal, and we’re announcing today that we’re going to be committing real development dollars to supporting the JDK and the JRE on Apple platforms.” (hypothetical)
  • (hypothetical) “It is clear to us that video is driving new applications and features on the internet. We’re happy to announce that we’ve signed licensing deals which will allow us to support a wider set of media formats including flv. We’re putting a lot of development into the Java Media Framework.” (hypothetical)

If we heard something like that at this year’s JavaOne, I’d start paying more attention.

The more I think about it, the more I’m convinced that applets being viable for the web isn’t about technology AT ALL. It is about business. A business that needs to implement an RIA thinks about the user audience, thinks about platform support. Mac users are not an insignificant population any more and Apple’s market share is growing at four times the rate of the competition. There’s this other company out there that is writing a Rich UI container for both stand-alone and browser based applications. The framework has good media support and they don’t have a hang up about supporting Mac OSX. They are named Adobe. If Sun doesn’t support Apple, and Apple drags its feet, you can’t expect any reasonable business person to elect to use a technology that it going to turn away a rapidly growing segment of the market. If Sun really wants to focus more on the consumer JRE, then they need to support the two major consumer platforms: Windows and Mac.

Let’s set the bar for Consumer JRE

It is unfair to keep on harping on Sun for startup times, the Consumer JRE is faster, and it’ll probably attain a high market penetration sometime in the next year? Let’s talk about the remaining expectations. Mac support and better media support. Sure, I can use Java to playback videos, but not the ones that count - Flash Video and H.264. Instead of trying to move the industry away from H.264 and FLV, Sun should just pay the patent license. If Sun were leading the market, then I think Sun could start trying to drive the market toward free and open standards, but Sun doesn’t, and I although I detest proprietary formats as much as everybody else here, I don’t think that the Open Media Commons initiative is going to help us Java programmers write client-side applications in Java anytime soon.

If the Consumer JRE was really ready, I wouldn’t be watching Eckstein discuss the improved applet startup time in JDK6u10 via a SWF from blip.tv which is streaming me a Flash Video on a Macbook Pro. I’d be watching Bob discuss the new Consumer JRE by way of an updated version of the JMF delivered in a Java Applet. If you really had confidence in Java, you’d have used the Cortado Applet and streamed it some Ogg Theora. You’d be updating the JMF. Are you updating the JMF?

Tim O

AddThis Social Bookmark Button

In the absence of info, I’ll make some predictions. Make your own predictions in the comments.

I’m going to guess that the keynote is going to talk about Project Caroline. If it is ready, Sun is going to want to position this as the big announcement for this year’s JavaOne. I’ve already blogged about how I see the momentum with Amazon EC2 (utility) and Salesforce.com (apps) in this space. Google has arrived a bit late to the party, they already have an offering in SaaS via Google Apps, and everyone seems to assume that whatever solution they come up with in the PaaS area is going to ultimately succeed for the obvious reasons… they have the culture, people, and scale to make something like this work. Few dare to doubt Google.

…which brings us to a company which is familiar with making big announcements greeted by a symphony of silent doubt (Sun and JavaFx). The Register broke this story back in February. If those PDF slides (in the Register story, I don’t deeplink), are accurate we’re looking at utility computing a step above EC2. Instead of expecting people to interact with a series of web services, it appears that there is some sort of Java API. Caroline is going to be met with a chorus of doubt, but there are some interesting things from those slides. I think Sun has the ability to come out of the gate with some features that EC2 is just adding to the offering, and I also think that Sun has this “full-stack” of technology products that span the entire spectrum…. if anyone can pull it off, I think Sun can. But, they are late to the party and they have a lot of catching up to do.

Something Big About JavaFx?

I’m predicting that Danny Coward formally introduces some ultra-fast Java Plugin and that we’ll see a big upgrade to the JavaFx product.

We should expect to see some real meat behind JavaFx at this year’s JavaOne. If we don’t see something big about JavaFx, then it is going to make it tough for Sun to remain credible. And by “big”, I don’t mean tighter NetBeans integration. JavaFx was the big announcement last year, they established an open source project “openjfx” on java.net, but take a look at the developer and user mailing list traffic over the last year.

Month Dev List Messages User List Messages
Mar 2008 2 192
Feb 2008 1 132
Jan 2008 0 81
Dec 2008 0 82
Nov 2007 3 152
Oct 2007 0 140
Sep 2007 5 414
Aug 2007 7 100
Jul 2007 3 233
Jun 2007 13 226
May 2007 119 481

There’s some activity in the user list. It looks like there is something of a healthy community in the openjfx site, but openjfx appears to be nothing more than a Wiki and a series of sample applications. The “codebase” hasn’t changed substantially in about 5 months, and most of the dev list activity is commits to the web site. Openjfx looks like a ghost town.

Clearly, development of the compiler happens somewhere else, and because I see so many JavaFx sessions this year one has to imagine that there is a whole chunk of new code wrt JavaFx that is going to be announced at JavaOne. Sun is also going to have to do something about the speed with which Java starts in the browser to answer all the nagging questions from last year. I’m guessing that Chris Oliver is chained to a desk working on some impressive demonstration right now? He wasn’t a very frequent blogger, but it isn’t a good sign that he hasn’t blogged since December 2007. (Maybe it is a good sign, maybe it means he’s focused on JavaFx?)

Consumer JRE

Danny Coward announced an early release of the Consumer JRE last October. I’d be surprised if this hasn’t really matured by this year’s JavaOne. Danny Coward’s blog is like Chris Oliver’s blog in that there are huge gaps. I think he blogged once in Nov 2007 and then once again last month. If we see anything about JavaFx at this years JavaOne it is going to have to be closely followed by a demonstration of a Java Plugin in a browser that loads so fast you don’t even notice that you are looking at an applet.

Tim O

AddThis Social Bookmark Button

GCalDaemon

So, I’m doing a thought experiment about ways to get around a fully locked down production network. Basically, I’m trying to find a way to send SMTP mail from a network that is very locked down. (Appropriately) the network administrators have locked down the network such that I can’t create a socket to anything. This makes perfect sense, you really do want to have control over what you are sending out. What doesn’t make sense is that port 80 is wide open. I can’t SSH out of the network, but I can connect to port 80. So, I need to send email, a colleague points me at this GCALDaemon project. Now, I’m not doing this, but the requirement was interesting enough that I wanted to see what could’ve been done if I really wanted to send email. Evidently I could just use GMail over port 80. I could just drop a bunch of files in a directory and GCALDaemon will take care of the rest sending them via HTTP over GMail. I check it out, looks pretty cool. But, whoa… look at the feature list (and my emphasis):

  Open source and completely free of charge
  OS-independent standalone application (Java 1.5)
  Bidirectional sync between iCalendar and Google Calendar
  View and edit your Google Calendar offline
  Supports 'Google Apps for Your Domain'
  Supports multiple file listeners with multiple Google Accounts
  Makes Gmail contacts accessible via LDAP
  Customizable Gmail notification
  Converts RSS/ATOM feed to iCalendar format
  Reusable mail transfer agent
  Remote control your computer via Gmail
  Multi-user abilities (up to 30-40 HTTP and LDAP clients)
  Run in service mode on Windows NT/2000/XP
  Run in embedded mode in a Servlet Container
  Low memory usage (10-20 MBytes)
  Automatic and fast (3-5 sec/sync)
  Customizable logging system (Log4J / CommonsLogging)
  Ability to do TCP/IP hostname/address filtering

I think this solution has a little bit of Rube Goldberg in it, but Google is reliable, I’m willing to live with something like this. Look at the feature list though, something jumps out at you….. “Remote control your computer via Gmail” Now that’s cool, but also very scary. (some digging) It stores scripts in GMail using IMap. Your computer syncs with that folder and then executes scripts from the folder. The whole process is triggered by you sending an email with a secret subject to gmail. There’s a diagram on this page… from the site:

This management service keeps checking a Gmail inbox regularly, if it finds an email from a trusted sender and with a secret subject, it reads and executes a specified script file. Then GCALDaemon sends back a response, which contains the script’s output. Most mobile carriers and recent phones have built-in support for sending email through SMS gateways, therefore a simple cellural phone should be enough to manage a computer.

Evidently, the alien overlords have arrived and they are controlling your computer via GMail IMAP. It is written in Java source is in the download. From the download, the lib directory looks refreshingly sparse. It doesn’t appear to be using everything and the kitchen sink in terms of JAR files (like all of my projects). In other words, the lib directory doesn’t contain 150 MB of JARs everything from Spring to Hibernate. Instead it looks like it is using Commons Codec, C-Collections, C-HttpClient, C-IO, C-Lang, C-Logging, Rome API, ical4j, activation, mail, servlet API, LDAP.

Source code, from the source you can see that we have Andras Berkes to thank for this code. Project appears to be covered under an Apache License Version 2.0 (Good, good!) The source looks very straightfoward/well-documented, and if you take a look at org.gcaldaemon.core.mailterm.ScriptRunner, you can see MailTerminal is easy to understand. Next question, why isn’t this thing in Maven?

Systems like this are going to be essential as we move to a model that involves more applications integrating with hosted platforms like Google Apps. Think about the ability to control machines from GMail, now couple that with my previous entry. You see where we’re going with this?

Ridicule

BTW, a colleague is now making fun of me on Skype.

HIM: btw, they could have written this gcaldaemon stuff in 1 minute if they used salesforce (and they wouuldn’t even need access to the net or a computer).

Laugh now, the cloud has you squarely in its crosshairs. Assimilate or perish.

Tim O

AddThis Social Bookmark Button

Today, Michael Podrazik writes about a new “generational shift” to Software-as-a-Service (SaaS). Michael’s a Java architect who is considering using EC2 and S3 instead of colo machines for his next project. In his post he captures an idea that’s quickly becoming obvious in light of the recent announcements in the Software-as-a-Service (SaaS) or Platform-as-a-Service (PaaS) space. Here it is (emphasis mine)…

We’re entering into a new generational shift in computing. I’m not speaking of generations of people but rather an uplift of paradigmatic abstraction as has occurred so many times before. This is not a shift from static to dynamic languages, although that trend will surely continue. It’s not that Java developers are all going to start using Rails or everyone is going to switch from template to component-based ways of developing webapps. The new debate is not going to be between X and Y framework but between X and Y platform, and if platform used to mean Mac-Windows-Linux, the shift I’m talking about is: ’s/Mac-Windows-Linux/Google-Amazon-Salesforce/’

There has been an undeniable series of developments in the hosted-platform, managed-environment, I-don’t-even-know-what-you-call-it, SaaS? that have until now resisted full-blown, critical mass, hype-factor. I think that that all changed on Tuesday with Google’s App Engine announcement.

Like Apple, no matter what Google does it gets attention, and App Engine is undoubtedly going to get lots of it. People will love or hate the choice of Python, love or hate the persistence API, or lament the lack of filesystem access, or OS access, or inability to link to C libraries. All of that is irrelevant though, because the real story is that they will have done for this new hosted-app space what IBM did for the PC-space years ago, which is push it over the top into general acceptance. It validates the concept. read more…

I’ve been thinking about this for a while in light of Amazon and the newer, more developer-focused products coming out of Salesforce.com. We’re approaching an inflection point where the arguments over whether a project should be done in Rails vs. Java vs. PHP will be trumped by foundational questions about whether an organization should invest in infrastructure and development at all. If you are like me, and you make your living developing applications and managing infrastructure. What can you do to prepare? I don’t have the answer directly, I think we’re going to see a dramatic shift in the job description of the “computer programmer” over the next few years. There is a brewing discontinuity in most organizations that engage in software development, and I think that this discontinuity is the first sign of this generational shift. In terms of technological revolution, I think the business user is leading the technologist.

On the one hand I speak to developers and architects who downplay the feasibility of SaaS solutions. Are they really secure? Don’t you yield any sort of competitive advantage on a platform like Salesforce? Are you not locked in to a platform like Google? It seems that there are a host of convenient and self-interested observations from the people who have the most to “lose”. I’ll sit in meetings where a room full of people are discussing how many machines to buy for a new system, when it is clear that the answer is “buy no machines at all, use EC2″. On the other hand, I speak with managers and executives who will happily testify to the millions of dollars they’ve saved by using products like Salesforce. At the Salesforce conference yesterday the logo was the word software with a red slash through it, and often a room full of business users would applaud when someone boasted of reducing headcount in the IT department. If you are a software developer, you can’t help but feel a little out of place. No?

Taking a step back, I see two groups, an emerging industry, and a gigantic, uncontrollable economic wave. The two groups are technical administrators and developers used to maintaining hardware and deploying applications, and business users who are eager to cut costs where they can. The big wave is the weakening economy (at least in the US) that is either at the bottom of a small recession or at the beginning of a depression unlike any seen since the 30s (depending on who you read). Add to this an emerging industry of Platform-as-a-Service. Just like the recession in 2001 and 2002 pushed many organizations to offshore development, the weak economy of 2008-2009 might just be the force that pushes many organizations to forgo heavy investment in hardware and custom software development.

What are you doing to prepare for this “generational shift”, this wave?

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

So I want to pontificate about SOA in the Enterprise for a few minutes here. I, as an “enterprise” developer obviously have an opinion on this topic, but this final rant was spawned by listening to Dalibor on Java Posse speaking of OSGi in the Enterprise. I had a similar conversation with 
Brian Ehmann, the Java Posse intern, a while back. So I want to address several things.

First, I want to talk about OSGi, and why I would never allow it in “my” enterprise. In “my” enterprise I want absolute control over what every service has in its runtime environment. Indeed, as a longtime Fedora user, one of the things I loathe about its Java support is the dependency system that works just as Dalibor describes — at the OS level. The beauty of Java on the server is that applications and their API dependencies can be packaged into a single artifact (WAR/EAR) that is completely isolated from the library install or configuration of the server itself. Anyone who has dealt with install libs on Unix machines understands this. Indeed, if any two of your “enterprise apps” had to have the same version of something even trivial, like Log4J, this could become a serious problem for deployments.

Secondarily, the last thing I want is my application “updating” itself without my (or Major League Baseball’s) expressed written consent. One of the “theories” I have espoused for a long time, and indeed one of the reasons I fell in love with J(2)EE is the WAR  file, and having a singular artifact from the developers. A WAR/EAR file is an artifact that can be built by development and move seamlessly from development, to QA, staging and production as a singular, atomic unit. As soon as you introduce dynamic dependency updates in your production systems, you have lost this atomicity in terms of production bits. It is true that OSGi does not mandate this loss of atomic control, but it does encourage it.

Of course, this example has a certain narrowness of focus. Of course things within the enterprise change, but one of the advantages of a Web Services based infrastructure is low-level dependencies as I have discussed to this point are maintained independently. At the service level, of course you need to control change. In my current environment we do this by endpoint management and control. This is one of the things that strikes me as a failing of “SOA” as a “solution”. Endpoint discovery is almost never a real problem for the enterprise. Low level network services like DNS are perfectly adequate for controlling this. Barring that, in the “WS” world. simple things like controlling HTTP routing through Apache or a specialized load balancing product work well. These solutions make it easier than most “SOA” products to run multiple live versions of a service without forced deprecation as well. Sure OSGi can operate at this level for service version control, but why trust it? Why allow binary update of runtimes on servers when endpoint URIs are easier to control over time?

Finally I want to address the issues of SOA as a failed technology. Bill de hOra and Joe Gregorio have noted that SOA has reached the “assign blame” state of failure. Indeed, here on the O’Reilly network shadows of this meme have kicked around.. I want to note that SOA is still a valid idea, but much like BPM, the marketing doesn’t live up to the hype. In enterprises with “architect” staff who are fundamentally unqualified– though I don’t believe the position is unnecessary in medium-large organizations — or a technical debt load that has become unmanageable, SOA proffers no real solution to any problem. Companies selling their SOA product as a silver bullet to said architects that will eradicate said debt are doing so at their own peril. Best case, their thousands of dollar projects will be quickly forgotten failures. Worst case, these enterprises will feel scorched by the failure and never want to deal with the same companies again. In reality, the former is most likely, since the people making the decision to go with the failed technology products will keep their jobs, blaming the failure not on their own lack of understanding of the enterprise they are responsible for but the vendors. Indeed, these sales relationships mean the same vendors get to come back when the next “Silver bullet” enterprise solution is available.

Shashank Tiwari

AddThis Social Bookmark Button

Bruce Eckel says Java is at an “Evolutionary Dead End”. His perspective is that retrofitting newer features into Java is making it absurdly complex. He states the choice is between no more evolution or breaking away from the past. In any other scenario he suspects things are only going to get worse. As a passing by remark, he proposes moving on to Scala as an exit strategy, if Java continues to evolve while honoring backward compatibility.

Technically his point is valid, realistically what are the millions of Java developers who build Java applications at thousands of enterprises going to do if they can’t incrementally take advantage of some of the newer features? It may be possible for Ruby or even Python to radically break away from its earlier versions and start on a fresh slate because not only do they have lesser number of deployments but on an average they have programmers smarter than the average corporate journeyman.

Java has evolved from being a replacement for C++ to an all pervasive cross domain programming language. One of the primary reasons for this growth has been the abundance of features, availability of commercial and open source implementations of these features and wrapping up of these features in all sorts of APIs, with the assurance of stability.

If we drop everything and restart, won’t Java be a completely new language? How would we guarantee we get everything right this time around? Which portions of Java will benefit from reinvention the most? What will we do while we are busy reinventing, knowing what we are doing is soon to be rendered obsolete — it won’t get done in a jiffy in any case?

Shashank Tiwari

AddThis Social Bookmark Button

In a recent interview Dr. Gosling said -
“If you look at something like Flash, when you get to the much more advanced stuff — with richer interfaces, more complex network protocols, more complex APIs — it really falls short.”
Source : Redmond Developer News

While, I would agree with Dr. Gosling, that the Flash VM, the ActionScript library and the Flex framework is not a be-all and end-all RIA solution (remember that its incarnation as a application developer’s tool — as opposed to a designer’s easel — is fairly recent and it is continuously and rapidly evolving as we speak!), I have a feeling Dr. Gosling is actually saying that the grapes are sour ! (For those who may not be familiar with the fable of the The Fox and the Grapes read on and you will quickly see the connection.).

At this time in its current form and shape Flex is a great option. Further, far from being competitive, at Saven Technologies, we have experienced that Java and Flex are complementary and can help build rich interfaces fairly effectively. Let me explain some more of this, but before that let me dissect Dr. Gosling’s comments and set the context.

Dr. Gosling has specifically pointed out that the shortcomings are related to support for networking protocols and complex APIs. My reply — TCP and UDP are two popular transport level protocols. Flash supports TCP. It does not support UDP. At the application level Flash supports HTTP and HTTPS. It supports AMF, which is a SOAP like but more efficient message format, and RTMP, which helps stream audio, video and data across the Internet. It does not support many application level protocols including SMTP, POP3, RTCP and many more. With the protocols in Flash repertoire one can build most consumer applications that utilize HTTP, Web Services and RESTful constructs.

One of our financial services clients was not satisfied with this. Not only did they want remote procedure calls, they desired real time data push and secure connectivity. With the help of LifeCycle Data Services, a server side integration technology that runs without a fuss in any Java application server, and the protocols mentioned above (AMF and RTMP), we could easily achieve what our clients desired. LifeCycle Data Services has open source cousins — BlazeDS, GraniteDS and more.

So while Dr. Gosling is right that Flash does not support as many protocols as Java does and he is also right that it does not have direct support for complex APIs, let’s say for messaging systems or database connectivity, the question is that does flash (with its Flex framework) really fall short because of the lack of these. Not really, on the contrary it piggyback on Java and PHP and others for such extensions. We are primarily Java experts who graduated to using Flex as the RIA and we see no trouble in leveraging the Java infrastructure that is so rich and robust. In the application that I was talking about earlier, that required real time updates, we used JMS for subscribing to the market data feed publications. Flex messaging and JMS worked well together and it was just fine.

Finally, Java Applets has support for many networking protocols and complex APIs, then why is it falling short of expectations? Weren’t there other things, including the well known JRE version mismatches that brought it down? Why is Sun creating JavaFX if the most critical ingredients — at least the way its worded it makes me believe that these are so — are already brewed in?

I feel very disappointed when a person I deeply respect and revere needs to make such comments. Java as a language and platform is very comprehensive, user friendly and productive (despite all the noise from the Rubyists) and works in harmony with many other technologies, including Flex. If JavaFX and the Consumer JRE deliver the promise I am happy to adopt it, as I have adopted Applets, Swing and the Java web application technologies so far.

Dejan Bosanac

AddThis Social Bookmark Button

If you haven’t already, be sure to read Steve Yegge’s post on his experience of dealing with large code bases (it’s a bit long post but an excellent read).

He explains the maintenance nightmare of his 500.000 lines of code game written in Java and quite correctly concludes that code size is a crucial problem for big software projects.

Shashank Tiwari

AddThis Social Bookmark Button

Let me start by wishing everyone a happy new year ! I hope 2008 is prosperous and peaceful for all of you. For many of you who still take pride in being a Java developer, I also put down a list of top 5 expectations from the year that has just started. It may be presumptuous on my part to create a single list of top 5 expectations for the eclectic world of Java developers but none the less I will do it! Some of you will agree, some of you will vehemently disagree and the rest will remain silent. In all the cases though I hope to provoke you to think about what you want and desire from the language and platform that you are so intently connected with.

So let’s get started -

1. JavaFx transforms from hype to reality
In 2007 starting with JavaOne, we all heard that the messiah has arrived in the form of JavaFX. Unfortunately, the entire promise is taking too long to manifest into a real option. Hope 2008 either converts it into a real, simple and viable option, so that Java developers don’t necessarily need to take refuse in the alternative rich interface technologies, or just brings all the hype to an end.

2. Glassfish enters the application server choice bundle.
Glassfish is a fantastic open source Java application server and platform. It was the first one to be compliant with the Java EE 5 standards. It has implemented almost everything that the JCP is churning out. It works and it is powerful. However, it still remains an unknown application server in the enterprise. Most managers have never heard of it, many Java developers have never bothered to download it and many others think its not a serious option, even without checking it out. Hopefully developers start taking its advantage in 2008.

3. Lightweight/Heavyweight discussion is put to rest
With Java EE adopting many of the advantages of frameworks, tools and libraries that figured out how to do things in a simple and straightforward manner, the divide between the so called traditional heavyweight Java and its lightweight alternatives is blurring. However, many of the staunch believers and promoters of the lightweight frameworks are not letting the debate rest to peace. May these folks find something more useful and new to champion ! Also, those who switched sides altogether in favor of those dynamic options, beyond Java, that was supposed to cleanse them of all evil may return once they find that their simple framework fails to deliver simple database manipulations or relies on your same old ways to integrate with other things in the enterprise.

4. Google likes Java, somebody convince Apple too :)
The iPhone is popular and many iPhone applications are being built. So far Java is poison for Apple. Hopefully things change this year. Hopefully Java developers gain from this surge! Google has already helped the world of Java developers with its numerous open Java APIs and services. Its has also reinforced that when the winner adopts you, you flourish and proposer! So its not as much about being with Apple the company but its about being in the winner’s camp.

5. Unify some and sunset a few others
Plurality in the world of Java provides ample choice to do even the most mundane of tasks but it often leaves Java developers confused in the middle of this abundance. Java developers for a few years now spend a considerable amount of time contrasting and comparing the numerous commercial and open source frameworks, tools and libraries to get their job done. Hopefully, 2008 sees some of these projects merging and some others just waning into obscurity. Hopefully the feudal lords realize that although dictatorship is detrimental, a unified nation state has its benefits.

Thats all for now!

Speak up! Say whatever you have to say, its all about what you want:)

Once again, a happy new year!

Dejan Bosanac

AddThis Social Bookmark Button

There’s a quite interesting discussion in the blogosphere about proposed extension methods feature for Java 7. The problem tackled by this proposal is how to extend an API (interface) with new methods without breaking existing implementations. The example used in a discussion is a List interface and the sort() method. In order to add another method to the existing interface, Java developers today create static utility functions. Take for example the java.util.Collections class, which is a set of static helper methods for working with collections. Among them is of course the aforementioned sort method.

Robert Cooper

AddThis Social Bookmark Button

I want to talk a little about Android. I am very much going to sidestep the holy war about is it or isn’t it Java, except to say, this looks a lot like something that would have been derived from the Danger stack. The commonalities are striking. As a Sidekick owner, I am terribly pleased with “Java-ish” development for that platform, and I think seeing something similar in wide deployment is great. That said…

First, lets talk about the Android UI API. I recall last year at Sun Tech Days,”The Gos” was asked what, in retrospect he would do different with Java. The first thing he came up with was the Swing API. The “747 Cockpit” feel of the API is overwhelming to new users. Frankly, Android takes this to a whole new level. Just look at the JavaDoc for the Checkbox class:

Constants inherited from class android.view.View
Fields inherited from class android.view.View


Public Constructors

          CheckBox(Context context)
          CheckBox(Context context, AttributeSet attrs, Map inflateParams)
          CheckBox(Context context, AttributeSet attrs, Map inflateParams, int defStyle)
Methods inherited from class android.widget.CompoundButton
Methods inherited from class android.widget.Button
Methods inherited from class android.widget.TextView
Methods inherited from class android.view.View
Methods inherited from class java.lang.Object
Methods inherited from interface android.view.KeyEvent.Callback
Methods inherited from interface android.graphics.drawable.Drawable.Callback

Now, it certainly makes sense for everything to extend View, but View has a helluva lot of stuff on it. I am pretty sure my Checkbox doesn’t need scroll setting, for instance. There are also things like getDrawingRectangle() that seem like they would be better served with internal implementation to a Painter, rather than everything right there.

There is also a dearth of Interfaces to mark functionality. For example, the MenuBuilder.ItemImpl. Notice the crossover with both View and Compound button above.

Public Methods

        int  getGroup()
Return the ordering group of this menu item.
        int  getId()
Return the identifier for this menu item.
        Intent  getIntent()
Return the Intent associated with this item.
        int  getShortcutAlphabeticKey()
Return the key for this menu item’s alphabetic shortcut.
        int  getShortcutAlphabeticModifier()
Return the modifiers of this menu item’s alphabetic shortcut key.
        int  getShortcutNumericKey()
Return the key for this menu item’s numeric (12-key) shortcut.
        SubMenu  getSubMenu()
Get the sub-menu to be invoked when this item is selected, if it has one.
        CharSequence  getTitle()
Retrieve the current label text of the item.
    final    View  getView()
        boolean  hasSubMenu()
Check whether this item has an associated sub-menu.
        void  invoke()
        boolean  isCheckable()
Return whether the item can currently display a check mark.
        boolean  isChecked()
Return whether the item is currently displaying a check mark.
        boolean  isFocused()
        boolean  isSelected()
        boolean  isSeparator()
Check whether this is a separator item.
        boolean  isShown()
Return the shown state of the menu item.
        void  sendSelectionChange(boolean selected)
        void  setAlphabeticShortcut(int modifier, int alphaKey)
Change the alphabetic shortcut associated with this item.
        void  setCallback(Runnable callback)
        void  setCheckable(boolean checkable)
Control whether this item can display a check mark.
        void  setChecked(boolean checked)
Control whether this item is shown with a check mark.
        void  setClickListener(OnClickListener clickListener)
Set a custom listener for invokation of this menu item.
        void  setIntent(Intent intent)
Change the Intent associated with this item.
        void  setNumericShortcut(int numberKey)
Change the numeric shortcut associated with this item.
        void  setSelected(boolean selected)
        void  setSelectionListener(OnSelectionListener selectionListener)
Set a custom listener for selection changes of this menu item
        void  setShortcut(int numberKey, int modifier, int alphaKey)
Change both the numeric and alphabetic shortcut associated with this item.
        void  setShown(boolean shown)
Return the shown state of the menu item.
        void  setTitle(CharSequence title)
Change the label text associated with this item.
Methods inherited from class java.lang.Object
Methods inherited from interface android.view.Menu.Item

Just having marker interfaces for things that support Focus, Check, etc would really help clean some of this up from a API standpoint. Now, getting around some of this Cockpit feel should be easy, since Android includes a declarative XML UI system out of the box.

Now maybe I am just missing something here, but:

<?xml version="1.0" encoding="utf-8"?>
<!-- Demonstrates using a relative layout to create a form -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/blue"
                android:padding="10px">

    <TextView id="@+id/label"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="Type here:"/>

    <EditText id="@+id/entry"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:background="@android:drawable/editbox_background"
              android:layout_below="@id/label"/>

    <Button id="@+id/ok"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/entry"
            android:layout_alignParentRight="true"
            android:layout_marginLeft="10px"
            android:text="OK" />

    <Button android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toLeft="@id/ok"
            android:layout_alignTop="@id/ok"
            android:text="Cancel" />
</RelativeLayout>

There seem to be a few shortcomins here. The schema URL doesn’t seem to resolve to anything meaningful. It *seems* to me, and I could be wrong here, that there is no way to use non-Android provided widgets in your UI. Compare this to the forthcoming GWT declarative UI XML:

<!-- Note how we add a new namespace for the application's package -->
<app:ButtonTree
 
xmlns:g='http://code.google.com/webtoolkit/com.google.gwt.user.client.ui'
 
xmlns:app='http://code.google.com/webtoolkit/com.example.myapp.client'
/><g:Tree xmlns:g='http://code.google.com/webtoolkit/com.google.gwt.user.client.ui'>
 
<g:TreeItem>
   
<g:Button>Do something</g:Button>
 
</g:TreeItem>
</g:Tree>


Here the namespace maps to a package, making it easy to build UIs with other components. Another thing that stands out about the declarative UI stuff is the lack of CSS. While the Android UI lets you specify design elements in:

The following values are supported for dimensions (described in TypedValue):

  • px (pixels)
  • dip (device independent pixels)
  • sp (scaled pixels — best for text size)
  • pt (points)
  • in (inches)
  • mm (millimeters)

Which is great. However, it seems like rather than specifying margins, paddings, alignments, etc, in the XML files, being able to define these in a CSS, or CSS-like file would seem like a better idea. Then, even, allow me to specify different CSS files based on different device UI types: screen size/aspect ratio, portrait vs landscape mode, etc. This has always been one of the failings of mobile development as long as I can remember.

So that summarizes what I don’t like. What I do like is the great separation of functionality into Intents, Activities and Views. To summarize this, you can expose functionality of your application, or use the Android base functionality, by invoking Intents. These intents can then launch something else, or not if the phone won’t do that, or the needed software isn’t there. These can take you to Activities. Activities are single screen-type states in your application with a managed lifecycle. Activities then reference Views with a clear binding pattern, and a suspend-resore lifecycle that lets not just your whole application, but sub-elements of your application (List Buddies, Chat Window, Add Buddy individually) be suspended out of the running state and navigated around. Honestly, it makes me feel better about some of my own API design, I have GWT APIs in Gwittir that look very similar. :)

While I haven’t spent a great deal of time with it yet, there are a few things that stand out as big points of pain in the current developer tooling. There is no way to toy around with the LocationManager class in a real way because the emulator just doesn’t have a way to alter this information at runtime. It is also really complicated to mock out the ApplicationContext class for unit testing your code — which seems very un-Google. While Android is easily one of the most documented new systems I have recently — maybe ever — seen, approaching the docs the first time is terribly imposing. John Lombardo at LinuxDevices.com has a great intro and guide to the guides.

Hari K. Gottipati

AddThis Social Bookmark Button

Google’s Android software for Open Handset Alliance raises eyebrows of every Java developer because of its non-standards. Instead of supporting the Sun’s open source efforts on Java, Google went in a different direction and came up with its own JVM named Dalvik which executes Java programs on Android phones. It is neither Java SE, nor Java ME. It is Google’s in house version based on some of Java SE packages, apache commons, httpclient, junit and their own user interface instead of standard AWT, Swing. It also has android.* packages for Telephony APIs, power management and SMS. (List of Androids packages). In a way its similar to the GWT which uses Java as its development language but does not support the full JDK.

The byte code execution is also different. Instead of executing the .class files, Dalvik VM executes the .dex files which are optimized for minimal memory footprint. The dx tool(part of Android SDK) transforms .class files into .dex files.

We have enough problems with Java mobile development already. Not all phones support all the same Java standards, so there is no guarantee that the same software will run on multiple devices, as the “write once, run anywhere” Java tagline promises. Now Android is going to create more problems than solving. With this, programmers will have a new breed of Java to develop mobile applications, those cannot be ported to any device except Android powered phones. We already have enough versions(standards) of Java, why do we need another one?. I don’t think any Java developer is interested in developing the applications in non-standard version, unless you want to win the 10 million dollar prize? It sounds like Google is trying to bribe the Java developers to adopt this non-standard Java with 10 million dollar prize. Well, may be its another Google’s don’t be evil policy -:)

Google tweaked the JVM to improve the performance of applications for the Open Handset Alliance phones. In fact, for the same tactics, Sun sued Microsoft a while ago. Knowing this, how Google managed to get the license from Sun to tweak the JVM? In fact, they didn’t - according to MIT research scientist Stefano Mazzocchi:

But Android’s programs are written in Java, using Java-oriented IDEs (it also comes with an Eclipse plugin)… it just doesn’tcompile the java code into java bytecode but (ops, Sun didn’t see this one coming) into Dalvik bytecode.
So, Android uses the syntax of the Java platform and the java SE class library but not the Java bytecode or the Java virtual machine to execute it on the phone (and, note, Android’s implementation of the Java SE class library is, indeed, Apache Harmony’s!)
The trick is that Google doesn’t claim that Android is a Java platform, although it can run some programs written with the Java language and against some derived version of the Java class library. Sun could prevent this if they had a patent on the standard class library, but they don’t and, even if they did, I strongly doubt it would be enforceable since Android doesn’t claim to be compatible (and in fact, could very well claim that their subset/superset is an innovation on the existing patent and challenge Sun’s position).

Wow! what a smart approach! I am wondering what the Sun’s reaction is going to be!!!! As a Java developer, I don’t want to develop the applications that only run on Android even if they give 10 million dollar prize. If I did that, it would be encouraging such evil practices of creating non-standard Java.

Why Google is not following the open standards(Java is open source)? Why they are tweaking the standards? What happened to Google’s “Don’t be evil” policy?

What is your take on this?

Tim O

AddThis Social Bookmark Button

I continue to believe that Maven is the first choice for build systems despite the lack of quality documentation (which is a continued problem). Why? (Or specifically, why should an open souce project use Maven above other build systems?…..)

…open source projects benefit from having the most widely portable build possible. Widely portable builds reduce the inefficiencies associated with contributing to a project. In an open source project (such as Maven) there are two distinct groups: end-users and developers. When an end-user uses a project like Maven and decides to contribute a patch to Maven, they have to make the transition from using the output of a build to running a build. They have to first become a developer, and if it is difficult to learn how to build a project, this end-user has a disincentive to take the time to contribute to a project. In a widely portable project, an end-user doesn’t have to follow a set or arcane build instructions to start becoming a developer, they can download the source, modify the source, build, and submit a contribution without asking someone to help them set up a build environment. When the cost of contributing source back to an open-source project is lower, you’ll see an increase in source code contributions, especially casual contributions which can make the difference between a project’s success and a project’s failure. One side-effect of Maven’s adoption across a wide group of open source projects is that it has made it easier for developers to contribute code to various open source projects.

In other words, even with Maven’s problems (which will shortly be addressed, I promise), it still defines a common interface that many developers are familiar with. If you continue to use some custom procedural build system (even in your closed corporate environment) you are bucking the trend. The common interface, the ability to just “sit down in the driver’s seat” and go, is more important than making sure that some highly opinionated software architect at a very large organization is happy with the “cleanliness” of the Maven repository or that someone feels that the Maven conventions can be bent to fit their own conventions.

Go ahead, adopt your own build process because you just *think* you know better, and have fun maintaining it. I know one thing about build systems, they are the last thing you need to be worrying about and your clients or employers rarely care to spend money on your clever, custom build system.

Robert Cooper

AddThis Social Bookmark Button

Google’s much hyped OpenSocial API finally appeared on code.google.com. For the most part it is “Yet Another GData API.” Which is good, and bad. Good in that people pretty much understand it. Bad in that it seems really half-baked to me.

Let’s start with the sample friends list. This would live somewhere like: http://{domain]/feeds/people/{person-id}/friends

<feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005'>
  <id>http://sandbox.orkut.com:80/feeds/people/14358878523263729569/friends</id>
  <updated>2007-10-28T21:01:03.690Z</updated>
  <title>Friends</title>
  <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sandbox.orkut.com:80/feeds/people/14358878523263729569/friends'/>
  <link rel='self' type='application/atom+xml' href='http://sandbox.orkut.com:80/feeds/people/14358878523263729569/friends'/>
  <author><name>Elizabeth Bennet</name></author>
  <entry>
    <id>http://sandbox.orkut.com:80/feeds/people/02938391851054991972</id>
    <updated>2007-10-28T14:01:03.690-07:00</updated>
    <title>Jane Bennet</title>
    <link rel='thumbnail' type='image/*' href='http://img1.orkut.com/images/small/null'/>
    <link rel='alternate' type='text/html' href='http://sandbox.orkut.com:80/Profile.aspx?uid=574036770800045389'/>
    <link rel='self' type='application/atom+xml' href='http://sandbox.orkut.com:80/feeds/people/02938391851054991972'/>
    <georss:where>
    <gml:Point xmlns:gml='http://www.opengis.net/gml'>
    <gml:pos>51.668674 -0.066235</gml:pos></gml:Point></georss:where>
    <gd:extendedProperty name='lang' value='en-US'/>
    <gd:postalAddress/>
  </entry>
  <entry>
    <id>http://sandbox.orkut.com:80/feeds/people/12490088926525765025</id>
    <updated>2007-10-28T14:01:03.691-07:00</updated>
    <title>Charlotte Lucas</title>
    <link rel='thumbnail' type='image/*' href='http://img2.orkut.com/images/small/null'/>
    <link rel='alternate' type='text/html' href='http://sandbox.orkut.com:80/Profile.aspx?uid=5799256900854924919'/>
    <link rel='self' type='application/atom+xml' href='http://sandbox.orkut.com:80/feeds/people/12490088926525765025'/>
    <georss:where>
    <gml:Point xmlns:gml='http://www.opengis.net/gml'>
    <gml:pos>0.0 0.0</gml:pos></gml:Point></georss:where>
    <gd:extendedProperty name='lang' value='en-US'/>
    <gd:postalAddress/>
  </entry>
  <entry>
    <id>http://sandbox.orkut.com:80/feeds/people/15827776984733875930</id>
    <updated>2007-10-28T14:01:03.692-07:00</updated>
    <title>Fitzwilliam Darcy</title>
    <link rel='thumbnail' type='image/*' href='http://img3.orkut.com/images/small/1193603277/115555466.jpg'/>
    <link rel='alternate' type='text/html' href='http://sandbox.orkut.com:80/Profile.aspx?uid=14256507824223085777'/>
    <link rel='self' type='application/atom+xml' href='http://sandbox.orkut.com:80/feeds/people/15827776984733875930'/>
    <georss:where>
    <gml:Point xmlns:gml='http://www.opengis.net/gml'>
    <gml:pos>53.017016 -1.424363</gml:pos></gml:Point>
    </georss:where>
    <gd:extendedProperty name='lang' value='en-US'/>
    <gd:postalAddress/>
  </entry>
</feed>

So, what have we got here? Well, it is awful little. Title is obviously the person’s name. We have a gd:postalAddress field for an address, a georss:where to locate them on a map (this can be a specific location, or just a city pointer), and a thumbnail. That’s it.

This is what the People Data API specs:

Property Type Description
Name atom:title The desired display name for the user
Image link atom:link With rel=”thumbnail”, a small image URL to represent the user
Profile URL atom:link With rel=”alternate”, the standard profile URL representing the user
GeoLocation georss:where Geographic location of the user. This may be approximate, or rounded off to the nearest city.
email gd:email Email address(es) for the user
IM gd:im Instant messaging adress(es) for the user
Address gd:postalAddress Address(es) for the user.
Phone number gd:phoneNumber Telephone number(s) for the user
Key value parameters gd:extendedProperty As different social networks and other sources of People data have many different named fields, this provides a way for them to be passed on generally. Agreeing on common naming conventions is to be decided in future.

That is really not much. For instance, Given Name and Sir Name aren’t broken out into separate fields. That alone can make importing into a standard address book problematic. Secondly, the link rel=”thumbnail” use is COMPLETELY retarded. It gives no real information, and doesn’t really apply. I don’t understand why Google didn’t use MediaRSS for this, which supports multiple representations of the same media element, contains size information, etc. They already use MediaRSS on Google Video, so I can’t imagine it is a religious issue.

Also, hand-wavy stuff like this always makes me nervous:

As different social networks and other sources of People data have many different named fields, this [gd:extenedProperty] provides a way for them to be passed on generally. Agreeing on common naming conventions is to be decided in future.

Name-value pairs seem really inadequate here. I don’t understand why we can’t, much like the APP specification instructs, say that foreign markup of any nature will be preserved. If I want to sync a contact between two different services, that contact information should simply preserve whatever markup the other services wish to include. Moreover, if I wanted to do something like embedding (x/v)Cards in the entries, seems like that should be just fine.

Finally, it seems to me that doing GoogleAuth everywhere for this is less than optimal. OpenID would be much better and would encourage more adoption at the bottom level of the tech food chain — not MySpace and Six Apart, but Joe Blow’s open source project. But it all goes back to the root of the problem here:

Google didn’t design a spec for interoperability of social networks as much as they built an API for dealing with Google. I don’t think this is what people really wanted here. Aside from the fact that it works on the presumption that everyone is going to clear everything through Google, it is going to require a whole lot of user understanding to make this data really portable.

For instance, it seems to me there should be part of the specification that says profile pages have link rel=”opensocial” pointing to the users individual feed. That is easy to communicate to the user that they can point at a buddy’s page to add them as a friend. If that page also had an OpenID link on it, then cross registration outside of the Googleplex would be easy. If the Microsoft SSE extensions were used, then it would be easy for me to maintain references to my accounts on other systems from each other, so with Alice imports her Orkut contacts to MySpace, MySpace can find the myspace <id>’s from people on Orkut with dual membership and resolve that automatically. There also doesn’t seem to be anything implicit in the auth structure for *requesting* access to profile information. It is common to restrict your exposed profile data to people who are your friends. Having links between profiles on different services — presumably with something more like OpenID auth to establish profile ownership — would allow for this; you could import my full information from my MySpace page into Outlook if you were my friend on Orkut.

In short, I am sure OpenSocial will make a dent in something. But it doesn’t seem to be solving the “Give me a truely portable contact list and identity” that I would really like to have.

Robert Cooper

AddThis Social Bookmark Button

The REST zealotry needs to end.

First, let me establish my bonafides here. I work on the ROME project. I built the first module for Google Base. I have used the Propono project to build an APP service. I use REST. REST is a friend of mine.

Here is the thing:

People need to own up to the fact that SOAP has its place. Yes, “SOAP” is neither “Simple,” nor arguably about “Object Access,” and marginally a “Protocol.” But SOAP and WS-* have their place. Just own up to it.

One of the things I had a chat about at JavaOne last year, over a number of free drinks, is that one of the big advantages of SOAP over REST was the use of nillable. There is a complete semantic difference between and the absence of said tag in SOAP. This is a clean advantage over REST where the presumption is total replacement and preservation of “unsupported” tags. In APP this is generally OK, but lets face it, this is a really HARD requirement to meet. The thing is, I listen to the Google Developer Podcast where the idea of adding a “PATCH” method to HTTP is discussed. I read in the illustrious James Clark’s blog about about complex methods for signing HTTP.

So here is my point, REST people… Yeah, SOAP isn’t simple, but the complexity of the envelope tag gives you a clear point to encrypt or pass transaction information. The soap:nillable namespace has to be there, but it doesn’t require a protocolchange. Can’t we just admit that, on a 60/40 basis REST rules? If you want simple and easy and your data conforms to basic preserved ENTITIES, REST is great. When you need encryption beyond basic SSL, differential updates, two phase commits, reliable messaging — all that “other stuff” — WS-* has a place?

I am getting really tired of religious arguments in my space lately. Sure, dynamically typed languages have a place, but static typing has some real advantages. Yes, environment X gives you A, but environment Y gives you B. I am not going to tell anyone that WS-* is the end all be all, but I wish the REST crowd would own up to the idea that WS-* solves some hard problems, and with basic tooling is not “hard to use.”

Tim O

AddThis Social Bookmark Button

Ben Collins-Sussman has an interesting blog entry about Distributed Version Control titled “Version Control and “the 80%”. Here’s an excerpt:

…In a nutshell: with a centralized system, people are forced to collaborate and review each other’s work; in a decentralized system, the default behavior is for each developer to privately fork the project. They have to put in some extra effort to share code and organize themselves into some sort of collaborative structure. Yes, I’m aware that a DVCS is able to emulate a centralized system; but defaults matter. The default action is to fork, not to collaborate! This encourages people to crawl into caves and write huge new features, then “dump” these code-bombs on their peers, at which point the code is unreviewable. Yes, best practices are possible with DVCS, but they’re not encouraged. It makes me nervous about the future of open source development. (Maybe the great liberation is worth it; time will tell.)

I don’t see decentralized version control working for a smaller set of projects like Jakarta Commons. For smaller projects, I don’t think the overhead of a DVCS is worth the effort, but for larger projects like Wicket or Maven, I think DVCS would encourage more external contribution. I also don’t think that forking is the opposite of collaborating - forks are part of the creative (read messy) process of evolving a code base. I can think of a few situations where a fork would have been helpful in the past few years (Struts during the Shale debacle and I’m convinced that someone needs to fork Maven documentation into an external project). An ideal fork competes with the original and inspires change.

…and, if you don’t believe me…

Jason Van Zyl wrote the following email to the Maven developer’s list on September 29th:

…for anyone who has patches or wants to try and work with me to
get changes in I am going to try this method of publishing Maven as a
GIT repository which will allow anyone to clone the repository and
work on any changes you like in a controlled way. Once you clone you
can commit changes to your own copy of Maven and do whatever you
like. Then in order for me to see your changes I can simply pull from
your originally cloned repository to a branch on my side and merge.
Merging is sooooooo easy with GIT. So easy in fact that it makes you
wonder how SVN got it so wrong and makes it so painful compared to GIT.

He continues later in his post:

In the short term I really only want to try with a few people but if
you’re keen, want to learn about GIT (which I highly, highly
recommend) then I will take your patches. I think any developer here
and anyone who has ever tried to contribute changes sees that the JIRA
+patch model is highly unworkable and bordering on completely
useless. JIRA might be fine to raise the issue but with a reference
to a GIT repository to pull from it will make life infinitely easier.
People who are not committers can work with people that are in a way
that resembles everyon being part of the team. Dealing with patches
just sucks ass and as a result we don’t look at them nearly as often
as we should so I hope this can become a model that enables people to
contribute in a more effective way. I’m going to try this with Oleg
but I am highly hopeful. I will help anyone who wants to try this as
I see this as a way to truly collaborate with the community. Down
with JIRA+patches! All hail JIRA+GIT! :-)

Oh, and about Sussman’s 80%. I think we can replace them with some Ruby scripts.

Shashank Tiwari

AddThis Social Bookmark Button

Apache Struts is the most popular Java web application framework till date. However, newer developments have rendered it both obsolete and inadequate. There are a few options that are trying to replace it but there is no clear winner yet! Who do you think is leading and worthy of the position? Which framework should you use today if you are a Java web application developer?

Rich application development technologies, AJAX, RIA or whatever other form that they may manifest in, are currently the most popular web UI technologies. However, Java is still the choice at the server side. Because of this some of the server side UI technologies, based on JSP and JavaServlets, are still prevelant. Many times these server side UI technologies work in association with the rich UI technologies. As an example many developers are incorporating AJAX with Java Server Faces (JSF), the new generation server centric web framework specification from Java. Many others are using Java remoting libraries, open source and commercial, to remote JavaScript and ActionScript calls down to the server side.

Does that mean we should adopt one of the frameworks like Apache Shale that work well with JSF? Does it mean we should use a remoting library with Servlets only, as far as the Java part of the web application goes? Or does it mean we should use a framework that does both - i.e. JBoss Seam?

Shashank Tiwari

AddThis Social Bookmark Button

Google turns 9 today. The official chronological history is online at the corporate history page.

Their most important contribution is the effective search engine they provide. Today, the word searching on the web pretty much implies “googling” ! However, there is another extremely important contribution from their side and that is sharing the code that makes them succeed. Most of you already know and use some of the Google APIs.

So Google now influences not only how you use the web but also how you continue to build the web. This can imply either of the two outcomes - (1) Google the savior - in which case it accelerates liberation of most closed software and compels others to follow and (2) Google the tyrant - in which case it monopolizes not only your business but your mind. What do you think may be the probable outcome? Do you think it makes you uncomfortable that a 9 year old rules your life?

Tim O

AddThis Social Bookmark Button

JavaFX: Anyone out there using it? What are your reactions?

JavaFX was the big announcement at JavaOne this year, and in the intervening months, let’s just say the roar of adoption and support has been underwhelming. Or has it? Post a comment if you are planning to use JavaFX in the near future.

Responses to the previous post: OpenJDK TCK License

Simon Phipps responded to my previous post telling me that I was “free to fork OpenJDK”, but that wasn’t the point. He also goes out of his way to paint me as an Apache partisan. He then went on to say that a TCK license wasn’t even appropriate for Kaffe, Harmony, or GCJ because they weren’t complete. Sorry to belabor this point, but all three of those independent implementations have sought access to the TCK, they did so because they wanted a measure of compatibility (or completeness if you will). Simon is essentially saying neither implementation is worthy of access to the compatibility tests because they are not compatible… Sun is playing word games, and if they want to use open source as a marketing tool, we should be holding them accountable. Play it however you will, but you are using your position as spec lead for Java as a lever to squash any hope for an independent, open-source implementation of an open standard.

Other than this TCK licensing curfuffle, I think Simon Phipps deserves a few minutes of sustained applause, possibly even an uncomfortably long standing ovation for helping to free Java. (I’m just a stickler for details.)

Red Hat’s response to the TCK license

In all fairness to Simon, I wanted to repost some of the inital reactions of RedHat to the OpenJDK TCK License. Andrew Haley of RedHat posted this to openjdk-discuss shortly after the TCK license announcement on August 13th. Here are some excerpts:

…I’m disappointed that the TCK isn’t going to be
available to all GPL’ed Java implementations, including those not
based on OpenJDK. I had hoped to get the Java Compatible stamp of
approval for GCJ.

And, more:

It has been somewhat frustrating that we haven’t been able to work
more closely with Sun on ironing out these problems, but there are
still some legal issues to sort out, and opening up Sun’s
well-established processes is doubtless a huge sink of time.

However I must point out that even given these problems we in the
free software community are in a far better position today than we
were with GCJ (and other free VMs) and GNU Classpath: with IcedTea
based on the OpenJDK code base we are much closer to Java
compatibility.

I’m very excited by the prospect of a 100% free and 100% compatible
Java, and I’d like to thank Sun for that. But still, there is work to
be done.

It’s a mixed reaction but one that seems more positive than negative.

IcedTea

For people who don’t know of the IcedTea distribution it is a temporary form of OpenJDK.

Tim O

AddThis Social Bookmark Button

I remember back to this year’s JavaOne, it was A LOT OF FUN to sit in that press briefing room while jon Schwartz and Rich Green (and the UN guy) talked about how Sun is focused squarely on making the world a better place through developing JavaFX(TM), open sourcing the JDK, and providing mobile phones to impovrished third-world nations.

But, there’s a problem… Sun Microsystems hasn’t really “open-sourced” Java(TM). That’s the truth.

You: What? What do you mean? I went to JavaOne and saw that Sun had “open-sourced” Java(TM)?

Me: Well, technically the source code for OpenJDK is covered under the GPL, but you won’t find any other open source implementations of Java floating around the internet any time soon… Sun is too concerned about competition and maintaining control over the platform.

Me: Java(TM) is a trademark and you haven’t really created a Java(TM) virtual machine until you’ve passed a compatibility kit from Sun. hmmm….

You: Ok, GREAT NEWS, Sun is licensing the compatibility kit to open source implementations. That fixes everything, now Java is really Open Source.

Me: Er, well, not really. They are making it available for JDK implementations derived from OpenJDK. They weren’t really interested in the open source community per se, they were really just interested in bundling Java with Linux distributions. If anything they’ve actively worked to exclude the most dedicated open-source Java developers in a ploy to retain control of “The Platform”. Here read for yourself

“Implementations must be substantially derived from the OpenJDK source
code and must be distributed under GPL which of course would be a
requirement of any implementation making use of code from the OpenJDK
code commons”

That’s what I get from Rich Green’s Orwellian game of verbal twister. It’s just a shame because while it might satisfy the conditions of the FSF in terms of licensing, it has little to do with the freedom to fork (or reimplement) that makes the open source community a vibrant one.

What is Rich Green and Sun Microsystems so scared of? Competition? Are they fearful that Microsoft, Intel, or IBM might start contributing to a non-GPL distribution of Java and improve upon it? Yes, I leave messages in the URLs, from his blog post, it reads clearly: Rich Green is scared of competition.

UPDATE (9/19/07): Just one day after posting this blog entry, we see Can IBM save OpenOffice.org from itself? over at ComputerWorld. Evidently Sun’s other OpenOffice effort is suffering some structural/governance issues.

Robert Cooper

AddThis Social Bookmark Button

I have been struggling with this lately, and Jeff Attwood sums it up really well

But some commenters were understandably apprehensive about the idea of having a Senior Drill Instructor Gunnery Sergeant Hartman on their team, enforcing engineering discipline.

You little scumbag! I’ve got your name! I’ve got your ass! You will not laugh. You will not cry. You will learn by the numbers. I will teach you.

Cajoling and berating your coworkers into compliance isn’t an effective motivational technique for software developers, at least not in my experience. If you want to pull your team up to a higher level of engineering, you need a leader, not an enforcer. The goal isn’t to brainwash everyone you work with, but to negotiate commonly acceptable standards with your peers.

Here is the thing. I fully accept this premise. The problem is one of communication. By that I mean, communicating what the engineering goals should be in a concise form, without starting out having everyone on the same page.

Let me elaborate on this a bit with a couple of personal examples. A *long* time ago, I was tech lead on a dev project. Back when XSLT was brand spanking new, we had a project come through a Professional Services company I was with. I immediately realized we needed something like this, and outlined a whole architecture for a multi-skinned/multi-host/user customized app. Most of the people on the tech team had never worked with any of the technologies before, but I wrote a couple of core classes, and gave very explicit interfaces for each of the components, worked with the “web dev/design” group on XSL and gave them sample documents. Over time the project snapped together like lego, and I was very full of myself. I still feel like this was my best experience with a large team effort, because I was able to build language-level interfaces and test cases and tell people “build this.” Over time, we could optimize later (as you should) and where appropriate, and the architecture grew into a methodology.

Lately, however, I have had a harder time. When you are building more generic frameworks, rather than for a specific app, you need to communicate a *philosophy* of app construction. The problem here is without a “look at this” example, I have not been able to communicate the ideas behind the structure and lifecycle. When you have a team that has diverse backgrounds and maybe doesn’t have the same mental shorthand based on “everyone has built the same apps, read the same blogs, read the same books”, selling, if you will, a new design philosophy is really hard.

The core rules Dennis provides are great:

Be humble. Always first presume that you’re wrong. While developers do make mistakes, and as a new hire you should certainly assist others in catching and correcting mistakes, you should try to ensure that you’re certain of your observation before proudly declaring your find. It is enormously damaging to your credibility when you cry wolf.
Be discreet with constructive criticism. A developer is much more likely to be accept casual suggestions and quiet leading questions than they are if the same is emailed to the entire group. Widening the audience is more likely to yield defensiveness and retribution. The team is always considering what your motives are, and you will be called on it and exiled if you degrade the work of others for self-promotion.

The best way to earn credibility and respect is through hard work and real results. Cheap, superficial substitutes — like best practice emails sent to all, or passing comments about how great it would be to implement some silver bullet — won’t yield the same effect, and are more easily neutralized.

Actions speak louder than words. Simply talking about implementing a team blog, or a wiki, or a new source control mechanism, or a new technology, is cheap. Everyone knows that you’re just trying to claim ownership of the idea when someone eventually actually does the hard work of doing it, and they’ll detest you for it. If you want to propose something, put some elbow grease behind it. For instance, demonstrate the foundations of a team blog, including preliminary usage guidelines, and a demonstration of all of the supporting technologies. This doesn’t guarantee that the initiative will fly, and the effort might be for naught, but the team will identify that it’s actual motiviation and effort behind it, rather than an attempt at some easy points.

There is no one-size-fits-all advice. Not every application is a high-volume e-commerce site. Just because that’s the most common best-practices subject doesn’t mean that it’s even remotely the best design philosophies for the group you’re joining.

My question is: if you have a vision, and want to try something that is honestly new, how do you communicate that vision to software developers… without software?

Robert Cooper

AddThis Social Bookmark Button

So this post is making the rounds amongst the kids. The gist can be summed up with the graphs:

It seems to me that people building LAMP, Ruby, django, or other applications think of themselves more as building web applications with whatever technology tools they need to use: web services, cron jobs, MySQL, ruby, PHP, python, maybe some Java: whatever. What matters is getting the web application working.

People who using Java see themselves primarily as building Java applications that happen to have a “view” (as we OO head-jobs would call it) that’s the web. Our primary goal is the metaphysical and headless application, not the delivery mechanism. Hopefully you can get a sense for my view of Java culture at this point: it’s more concerned with keeping the concepts, work-flows, and design of the application pure and tidy than optimizing the delivery mechanism, or implementation. Them UML diagrams should look good.

So here is my thing, as a Java developer, I am SQUARELY in BOTH camps here. I am going to give you all my dirty little secret:

I think JSF blows chunks.

I think Seam blows chunks squared.

While I can appreciate the design ideals of component based development on the web, each of these technologies, and especially stacked, represent an abstraction above and beyond what HTTP really is that makes me sick to my stomach to think about. I will freely admit, I am a GWT bigot. Once I saw GWT at JavaOne over a year ago, I had the same gut response I had to Java itself having come from the VC++/DCOM world: this is the way we should have been doing it all along. GWT still encompasses this layer on top of native idea, but does it at the right level. GWT doesn’t pretend HTTP is smarter than it is, it just gives you a “real” and reliable client API. Moreover, you still get to run PMD and FindBugs and have good refactoring support on your code as you develop it. Win. Win. Win.

For all the humor about what “QA” loves in the linked article, I have to say “Techops loves ‘technology tools they need to use: web services, cron jobs, MySQL, ruby, PHP, python, maybe some Java: whatever. ‘” One of the things that makes JRuby and Quercus compelling is getting the WAR deployment story. A “mish mosh” application that has 40 steps to deploy to 25 web servers sucks, and it sucks worse than taking time to QA, because deployment (likely) affects the end user and not the organization.

I am not going to say Java is the End All Be All. However, I am certainly not going to poo poo the Java ethos. Granted the Java Web Dev story has not been perfect, but I will hold it up against anything else out there proudly. Moreover, I will give your circa 2002 Struts app credit for maintainability against anybody’s hand rolled PHP, Perl or whatever else App. Frankly, GWT’s unified asset deployment and deferred binding for native hacks leads me to see it as the best successor to Java in “Web 2.0″ development, but frankly anything is better than where we came from. Even RoR, which I have espoused in this space as a PHP killer over a “Java” killer, represents a step forward in maintainable code in the web tier, but only in conjunction with JRuby. The “Check out a tag from svn to all the servers” deployment method will make Techops AND QA ill, nevermind force you to do some kind of rolling load balancer hack to make it happen smoothly.

Shashank Tiwari

AddThis Social Bookmark Button

JBoss Seam and Adobe Flex are two promising technologies. Seam makes it easy to build stateful web applications. It integrates the Java EE frameworks together. Flex is a great rich application development framework. The question is can they and should they be used together?

Seam till its 1.x versions used JSF as the main UI framework. This implied that it was built around a server side UI model. Flex on the contrary is a client side UI framework. Oops! so we have a big disconnect right away! Not really, there possibly are some viable options to make them work together. In the latest version of Seam 2.0.0 BETA the coupling with JSF has been loosened. Also, in the past its been demonstrated that JavaScript UIs (built on frameworks like DOJO or any other) could directly remote to Seam server side components. Remember though that JavaScript runs within the browser whereas Flex applications runs within the Flash VM. Does that matter?One option is to have Flex as the front end and make Flex components remote to Seam? Technically this is a possibility and may be good in situations where Flex is used as a pure view description technology. In fact has anybody wondered writing a JSF render kit for Flex? That would be one nice looking but ugly under the hood hack. The state and event management would be all mixed up and one would end up writing more wiring to save the two together than use in isolation. I know some of you may oppose this thought and may cite cases where you have used Applets as a face for Servlets or similar server side technologies. Yes it works, is it elegant though? And what were the big wins of making them work together anyway? This the same question I ask when I read articles that claim that Spring MVC can work smoothly with Flex and Java Portlets can work effortlessly with Flex. Is it better to make complicated applications by spending more time and energy as opposed to building clean applications faster? In other words is it better to do the right thing or focus on making everyone happy?

So what does it mean in the context of our main exploration of making Seam and Flex work together? We have looked at the dry option of remoting a Flex face to a Seam server side. We could possibly liven it up by managing state on both sides - client and server - and introduce something that could be called a State Transfer Object (STO) to transfer the state information back and forth. Doesn’t sound good! It reminds me of the pain of using DTOs. Is there any other option? My answer is that I don’t know of one yet. I am trying to write a bridge between the two, following the principle of delegation and inclusion of common contexts wherever possible and ofcourse cheating (oh sorry! drawing inspiration) from the JavaScript remoting integration and the GWT integration in the Seam code base. If and when its ready, it would show up as an open source tool for everybody to play with and I will annouce its arrival. BTW, if anyone else here is interested in hacking that with me, you are most welcome to join in. In the meanwhile I would certainly like to hear your experiences in making these two work together. Both real life experiences and armchair musing are welcome.

Jim Alateras

AddThis Social Bookmark Button

On a recent flight from Boston to Melbourne i decided to have a play around with buildr and convert a small rest based web application from maven to buildr. Buildr is a ruby-based DSL build system for Java applications. The ruby plugin comes from the folks @ Intalio and born from their frustration in using maven for build management. The documentation on the rubyforge site is very good and provides a good introduction but to do more you’ll probably need to browse the ruby source code.

It took about a day of playing around before i managed to replicate my maven build, which included compiling, testing, packaging a war and running up the war on an instance of a jetty server.

All extension tasks (ala maven plugins) are written in Ruby so you get all the power and benefits of a turing complete language as opposed to the constraints of maven plugins. It’s definitely much easier to extend buildr with new tasks than to write a maven plugin.

You may have seen Assaf’s claims that builds are faster under buildr and my initial experience seems to confirm this.

If you’re looking at using it beyond a small project have a look at Apache ODE’s Rakefile, which is used to manage multi-project builds.

Shashank Tiwari

AddThis Social Bookmark Button

JSR 314 - JavaServerFaces 2.0 is in the JSR review ballot phase. Check out the details at http://jcp.org/en/jsr/detail?id=314. However, the news is not really that new as conversation about JSF 2.0 was initiated by Ed Burns quite a few months back. For those of you who read his blog, you would be familiar with the JSF 2.0 requirements scratchpad. More recently he summarized the discussions at the JSF EG kick off meeting during JavaOne. Its available online again at Ed’s blog.

All in all, the start looks very promising. By next year when the specification is ready for release we would see a lot of goodies in JSF, some of them being -
- better view decription technology - somewhat like facelets or maybe better.
- application modification and deployment at runtime
- tighter integration with Ajax. perhaps support for a small JavaScript library contract specification.
- better and maybe centralized error handling
- minimization of “xml hell”, use of annotations instead
- possibility of RESTful urls and use of GETs
- skinning and themeing
- reduction of effort required for creating custom components

More details can be obtained from the sources mentioned above.

So all this good. However, I thought it was perhaps also time when one needs to look at the following -
1. unification of the client-centric and server-centric UI models, especially when they pertain to the same programming language. There is no stopping somebody mashing up the JSF lifecycle with a Swing Client but it is ugly and non-standard. How about creating standard hooks?
2. merging managed beans jsr with this one. Somebody in the JCP needs to start merging the JSRs. Of late there is a proliferation of these and at the rate it is going I wouldn’t be surprised if somebody started a JSR to reduce JSRs
3. portal is passe, if not it surely will die sooner rather than later. The client centric webos/webdesktop is gathering momentum. How about jsf taking the lead to include portlets within the realm of components and containers.
4. jsf, like everything web development java on the server side is based on the servlet API, which itself needs some rehaul, considering that it is purely server centric and quite inadequate in a newly evolving peer-to-peer world. Shouldn’t servlets and jsf evolve concurrently so that we could avoid some retrofitting.
5. Last but not the least, what about applications without servers - which go under the name of mashups often. which java web technology is good for it?

Dejan Bosanac

AddThis Social Bookmark Button

If you ever tried to work with SSL Socket connections in Java, you probably know that Java, by default, supports its own JKS and PKCS12 certificate formats. For those who need to work with OpenSSL it is usually suggested to convert keys and certificates to PKCS12 and then import them in the keystore using the keytool command provided with the JDK.

While all this is not a big deal for most of the applications, there should be a better solution for projects that rely heavily on SSL. Not-yet-commons-ssl project, called liked this because it is still not the official Apache project, aims to simplify Java and SSL integration.

First of all, it supports OpenSSL and PKCS8 formats and provides handy classes for dealing with keys and certificates in that format (see PKCS8 examples).

Also, it provides mechanism for easy creation of SSL Sockets regardless of certificate format you are using (see examples). This mechanism also allows us to configure multiple ssl socket factories inside a single JVM.

Commons SSL is a really important toolkit for all that have above modest SSL requirements. The proper support from Apache and a better documentation could help this project become even more useful.

Shashank Tiwari

AddThis Social Bookmark Button

With Sun announcing JavaFX, Microsoft putting their strength behind Silverlight and Flex/Apollo going strong in the RIA space, the wars for UI domination has just begun. Perhaps I should say begun yet again! From Applets to *ServerPages to Ajax/RIA we have seen the user interface go through rapid evolution in the last 10 years or so. In the last couple of years the Ajax/RIA story has been the most prominent one and one technology that has suffered the most has been Java, with one and sundry blaming the poor interactivity of JSP, the complexity of JSF or the poor performance of the Applets. In fact there have been stories, articles and blogs about Hybridizing Java, about bringing in scripting languages into the JVM or about getting rid of our good old trusted friend altogether. However, with the introduction of JavaFX there is a completely new direction and a new set of questions. Is JavaFX a superior alternative to current Ajax/RIA technologies? Is it just a scripting face to the old options? Will it bring the desktop and web UI technologies closer? Will it address the next generation of UI requirements - video, svg, voice and more? Will it evolve rapidly with community participation, thus having implicit approval of the masses? Will it be Sun’s new recipe for success?

Chris Adamson

AddThis Social Bookmark Button

So, it’s been just over a week since my BoF on Java Media. But let’s start with some context about Desktop Java as a whole…

Shashank Tiwari

AddThis Social Bookmark Button

The BOF at Javaone titled “Meet the Java Posse” has so far been the most exciting and entertaining BOF session. The Java Posse folks have developed the brilliant habit of providing exhaustive information while keeping the humor going! If anybody has not heard them yet I think they need to tune in asap to their podcasts at www.javaposse.com. They know about all the jsr(s) and the version numbers of all Oracle products accurate to the sixth place of decimal :)

Tim O

AddThis Social Bookmark Button

http://twitter.com/tobrien - twittering the conference

Everyone I speak to describes the same love/hate relationship with Maven. They use Maven for builds, it tends to work well when it works, but then *crashbang* when it sucks it sucks. I’m not making this up, everyone I speak to professes some frustration with Maven.

FX impressive, but I’m still on the fence

Disclaimer: I like and use Flex. Been using it with Rails applications, it has some limitations. Adobe
(Macromedia) never really got the programming side of Flash right (see Flash 8 IDE) and try writing anything of sufficient complexity to require more than 100 lines of Actionscript. It gets difficult fast.

I’m not ruling out a victory for Sun in the rich client space, and I’m sure Chris Adamson is happy that Sun is refreshing Java on the client-side. But, it is a busy space. I just sat through another FX presentation and, I’ll have to say it’s impressive the stuff that Sun (Chris Oliver) has implemented. Some of the applications are very interactive. Evidently you can download JavaFX now and start using an IDE called FX Pad, check it out.

Me == Hoping that Sun succeeds in this space.

I’m off to a session on Open Sourcing Sun.

No Harmony for Harmony

Quote from Schwartz this morning: “Right now there is nothing preventing Apache from shipping Harmony.” (from the press briefing) And in other news, Geir M. is handing out CDs with Eclipse and Harmony in the pavillion and is draped in the Brazillian flag.

Dejan Bosanac

AddThis Social Bookmark Button

One of the lessons we can learn from early success of the Web was making of ideal environment for use of scripts. There were two main components of the Web platform:

  • Web server (Apache), as an infrastructural component that had to be fast and reliable
  • Web application as a collection of scripts (Perl, PHP, Python), providing the content in an easy manner

The Web as we know it today is a much different place; applications talk to each other through variety of web service protocols, we have Ajax and all these new cool toys. But one principle remains the same: we need reliable infrastructure software with easy integration of scripts for fast creation of content and logic.

I’ve always seen Java as an ideal platform for building infrastructural applications. One of the proofs for this claim is existence of many production-ready asynchronous-messaging solutions on the Java platform. Asynchronous messaging is an important programming concept which is one of the reasons for Java’s success in the enterprise environment. JMS specification and many quality implementations of brokers and clients led to wide adoption of messaging paradigm among Java developers.

Recent trend towards bringing asynchronous messaging closer to scripting world is very encouraging (in my opinion) as it will bring completely new programming concepts to script developers and much wider adoption of asynchronous messaging patterns.

What I primarily have in mind here is Stomp (Streaming Text Orientated Messaging Protocol), a lightweight messaging protocol, which makes it easy to implement clients for most of the scripting languages (the most of the mainstream scripting languages already have Stomp clients implemented). Currently only ActiveMQ implements native Stomp support and enables script developers to enjoy all goodness of loosely-coupled asynchronous integration of their applications. Support for virtually any JMS broker is provided through StompConnect project.

One other potential alternative to Stomp is AMQP (Advanced Message Queuing Protocol), the specification that aims to standardize messaging. Intention of AMQP is not to be simple, but to provide standard specification that will allow implementation of brokers and clients in virtually any programming language.

AMQP is young specification and currently you can find it implemented in Qpid (http://cwiki.apache.org/qpid/) project in Apache’s incubator. It currently implements brokers in Java and C++ and clients in Java, C++, C#, Python and Ruby. The other open source project that implements AMQP protocol is RabbitMQ, which is written in Erlang and provides clients in Java, JavaScript and native Erlang.

Regardless of the actual protocol and technology being used, I think that asynchronous messaging and scripting provides a lot of potential to developers and I’m sure we will hear a lot of about these two playing together in coming years.

Chris Adamson

AddThis Social Bookmark Button

What if you held a book signing and nobody came?

Jim Alateras

AddThis Social Bookmark Button

If you haven’t already checked out the restlet project then it’s definitely worth a gander. It is a lightweight framework that captures the principles of REST as outlined in Roy Fielding’s dissertation. For me the REST architectural style is the superior choice for all client facing web applications.

The restlet framework comes packaged with everything you need to develop the server and client dimensions of your web applications although in my instance i was more interested in integrating it with Spring 2.0 and the Tomcat Servlet Container.

Initial experience with the framework has been both positive and beneficial.

Tim O

AddThis Social Bookmark Button

It seems like a simple problem, you want to allow people to upload videos, and then you want to process those videos to Flash Video. (Admit it. Flash Video is the video format for the web at the moment.) Talk to the LAMP crowd (or the Rails crowd), and when you ask them the question: “How would you process media files on the web?” You’ll find two popular answers:

  1. FFMpeg for video processing
  2. ImageMagick for image processing

But, don’t we do everything in Java through the JMF and the JAI? How would one integrate these utilities into Java?

Tim O

AddThis Social Bookmark Button

There was recently a post on TheServerSide that pointed to an article on DeveloperWorks titled, “Pure servlets: Rethink the view” by Jason Van Cleve. I read it, I read some of the reaction to the TSS thread. (read on..)

Shashank Tiwari

AddThis Social Bookmark Button

The desktop transformed user experience through the last 20 years and has been the entry point for applications for a long time now. Come to think of it, even the browser is an application that resides in the desktops of users. The browser helps us access sites that run applications and that may be an aggregation itself, like a portal. The web applications, which traditionally were database centric and form, based data entry and reporting, email and ecommerce type applications are maturing into online office and collaboration applications (the offerings from Google), online gaming and online drawing applications (Gliffy). Interestingly enough though, the desktop has not changed fundamentally in its many years of existence and is still focused on file management, document creation and deletion, and local storage of documents type of functionality. Of course there has been the inclusion of web technologies into the desktops. More recently, Microsoft and Adobe (with its Adobe Apollo) may be examples of companies that are bringing the concepts and technologies of the web to the desktop. An important question then is, what is the future of the desktop and that of the web? Would the desktop be replaced by the web or would the web pervade throughout the desktop? These and related ideas were brought-up by David Temkin (www.davidtemkin.com), the co-founder and CTO of Laszlo Systems as a part of his presentation at the AjaxWorld in New York. David seemed very bullish about the web outperforming the desktop in being the center of user experience in the long run. Guess that is why, Laszlo is taking the desktop to the web with its Webtop offering and betting on it being a preferred solution going forward. Of course they are not the only ones doing it neither are they the first to do it. Laszlo Webtop is a solution that provides the infrastructure to build a web-desktop or a “webtop”. It leverages Java on the server side and is built to take advantage of the established server side java frameworks and mechanisms. (I tried the initial release of this product and maybe would talk about it sometime later or try and compare and contrast it with similar offerings from other vendors.)

Now we are not sure if the Laszlo Webtop is the winner in the long run and I am not trying to present David Temkin’s presentation verbatim here, but I think the questions he has raised and his opinion on the matter are indeed something for us to ponder about. Considering that java developers may still be struggling between old Apache Struts type web frameworks and the numerous hybrid choices that AJAX/RIA have presented to them, are they thinking about where the web-desktop convergence is going and the role they want to play in shaping this convergence’s destiny. Or is it that some of us are happy that such concepts could theoretically be partially or fully implemented as Applets even some 10 years back. Or is it that we are waiting for a JSR to be initiated for such a purpose :)

Tim O

AddThis Social Bookmark Button

Here’s a quote from an email I received yesterday from a colleague who uses Lotus Domino very heavily. Domino is one of those tools that isn’t hip, there are no groundbreaking Web 2.0 sites written in Domino, and as far as other Lotus products are concerned, people tend to have a visceral negative reaction whenever someone mentions Lotus Notes as an email platform. Regardless of your reaction to Notes, this colleague does manage to consistently produce revenue generating applications on Domino. Yesterday he sent me the following:

[Domino] has evidently entered public beta testing. Below is a link to the new features outline:

http://www-128.ibm.com/developerworks/lotus/library/notes8-new/

Interestingly, it appears that the Notes Client and Designer (the user UI and the IDE respectively) have been rebuilt from scratch as Java extensions on Eclipse. I didn’t see that coming.

Even though Lotus Notes has a reputation for being a something as an anachronism, lauching the new Lotus Notes client on the Eclipse platform is a big deal for the Eclipse platform as a foundation for end-user applications. Just when you least expected it, someone decides to ship a large client-side Java application.

From the DeveloperWorks article written by David DeJean:

The big news in Lotus Notes V8 is that the Notes V8 client encapsulates all the code that is Lotus Notes within the Eclipse environment. This move puts Lotus Notes on an open-source Java-based platform. Originally created as an integrated application development environment, its open, plug-in-based architecture has made Eclipse itself the foundation for rich client platform development. Lotus Notes V8 is built on Lotus Expeditor, IBM’s universal managed-client software, which, in turn, is built on Eclipse.

Shashank Tiwari

AddThis Social Bookmark Button

AjaxWorld (www.ajaxworld.com) is still going on at the Roosevelt Hotel in New York City but one conclusion could be drawn pretty much from the start - most presentations and expositions, with the exception of Microsoft (and maybe a few others), are and were about how Java developers could leverage the multitude of Ajax, RIA or call it Web2.0 technologies out there. In fact, the java development community was perhaps the binding or common thread among the multiple and numerous offerings. Laszlo and Adobe of the extreme rich gui camp have explicitly been talking about leveraging server side java for a while and JSF vendors (with or without ajax) are ofcourse in the business of appealing to java developers but what was interesting is that even the Javascript focused ajax folks were talking java. As an example, James Harman, in his presentation - “Creating AJAX-Powered Forms with the Dojo Toolkit” explicitly mentioned how the Javascript libraries of the dojotoolkit where so java like in their structure and usage. Looks like a lot of people like Bruce Eckel are betting on the “Hybridizing Java” story, either as firm believers or “don’t want to miss the train” participants. What do you the readers, as Java developers and architects, think? Are you folks happy about all the zillions of options? Do you think it’s all unnecessary and Java itself could get most (if not all the) the job done? Do you think “AjaxWorld” should be renamed as “AjaxWorld for Java Developers”, since that’s where all the action is?

Dejan Bosanac

AddThis Social Bookmark Button

As you all have probably heard, Velocity 1.5 was released last week. It is the first release of this project in last three years. This is certainly a long release cycle and it is not unusual that some people considered it a “dead project”.

I have some projects that use Velocity as a template engine of choice and over the time I’ve collected a “wish list” of features that I missed. Due to lack of new releases, I’ve considered switching to other template engines, such as FreeMarker and WebMacro, but actually never found time to do that.

As I go through the release note, I see that some of the wish-list features have been added to this release. Some of them would be nice to be seen in the future (road map looks promising). Here are some details:

Steve Anglin

AddThis Social Bookmark Button

Could the open source agile, lightweight Google Guice be the next Spring?

Steve Anglin

AddThis Social Bookmark Button

On Monday, news broke from EclipseCon: Red Hat JBoss announces a partnership with Exadel. Eclipse based Exadel Studio is now open source and going into JBoss.org for continued development and merging with JBoss IDE, etc. This will be called Red Hat Developer Studio IDE platform.

Chris Adamson

AddThis Social Bookmark Button

Remember how I said I had proposed a JavaOne BoF on Java Media, but didn’t expect them to approve it?

Steve Anglin

AddThis Social Bookmark Button

I was pleased to see the listing of the forthcoming O’Reilly Energy Innovation Conference, and wondered… how can Java and IT developers in general participate?

Steve Anglin

AddThis Social Bookmark Button

InfoQ.com points to the general availability release of Apache Struts 2.x and what it means, has, etc.

Dejan Bosanac

AddThis Social Bookmark Button

There has been some very interesting activity in JCP land lately, namely acceptance of new Date and Time API (JSR 310) and proposal of the JavaTM API for RESTful Web Services (JSR 311).

Usual first reactions to the JSR 310 that I saw on the web were “finally” or “too late”, but I think that “better late then never” should be applied in this case. People behind this specification are developers of Joda time and this API will be heavily based on Joda time, which has been an excellent replacement for traditional Java date/calendar API (and must-have tool in your toolbox) for years. Beside the initial goal, to provide lightweight and simple API, one of the area of interest will be interoperability with JDBC. The general attitude toward this spec is maybe best described by the Google’s voting comment:

On 2007-01-30 Google Inc. voted Yes with the following comment:
We are thrilled to see this happen!

Hopefully, this specification will be included in Java 7.

Now back to the RESTful Web Services and the specification request 311. Although it is not crucial part of the language as Date/Time API, I think that this specification deserves to pass approval process and we (Java developers) deserve to have standard API to deal with RESTfull web services.

The introductory example, from Marc Hadley (one of the spec leads) looks promising

@UriTemplate("widgets/{widgetid}")
@ConsumeMime("application/widgets+xml")
@ProduceMime("application/widgets+xml")
public class Widget {
  @HttpMethod(GET)
  public Representation getWidget(@UriParam("widgetid") String id) {
    String replyStr = getWidgetAsXml(id);
    return new StringRepresentation(replyStr,
      "application/widgets+xml");
  }
  @HttpMethod(PUT)
  public void updateWidget(@UriParam("widgetid") String id,
    Representation update) {
    updateWidgetFromXml(id, update);
  }
  @LastModified
  public Date getChangeDate(@UriParam("widgetid") String id) {
    return getLastChanged(id);
  }
}

but I’ll second usual comments found on this topic: “I hope that they don’t screw it up”.

Robert Cooper

AddThis Social Bookmark Button

So there was definitely a big response to My response to Pat on typing in Java. Some of it was fair, some people don’t know they difference between Typed and Static Typed languages, but that is to be expected.

One of the things that comes up all the time is Groovy. Someone brought it up in the context of STDs, and it always comes up in these discussions. A lot of Groovy people are (rightly so) pissed — can I use that word here? — that Sun effectively “endorsed” Ruby over Groovy. Grails *is* an …. almost… perfectly good analogue to Rails, and Groovy definitely sits better with most Java people.

Here is the problem, guys. You aren’t buzzword compliant. At this point, arguing the merits of Groovy over Ruby or Grails vs Rails doesn’t matter in the least. The “technorati” have dubbed RoR “the big thing.” Sun, having gotten their collective ass whipped by PHP and Python in the open source space are dying to retake some of that ground. The people who care about Groovy are already Java programmers. PHP and Perl people are looking at Ruby, and that is Sun’s market motivation.

Please don’t take this as an insult. Groovy is great. For my money, it stomps Python into the ground and then drops a St. Peter’s sized obelisk on its grave. However, whatever you do, you will always be the “Java” version of Boo. I don’t know what to tell you, other than implement your language in C++, with wxWidgets and Gtk# bindings, create a CGI library , and then you will be taken “seriously” by the powers that be.

Robert Cooper

AddThis Social Bookmark Button

From /. today:

An anonymous reader writes “There are 139,834 open-source projects under way on SourceForge. IWeek wonders which projects will make lasting contributions, and which will fizzle. Sure, Linux, Apache, and MySQL are winners, but what about OpenVista, FLOSSmole, and Hyperic HQ? What’s your list of open-source winners and losers?”

I know it is all kinds of fun to poke around SF.net and look at all the projects that went anywhere, or even started the trip. The thing is, a few weeks ago, I had a really interesting email exchange. Someone contacted me about the function of a class I wrote as part of a one-off two-weekend project. I walked away from a lot of that code over a year ago, and here I am getting support requests. It wasn’t even about the core functionality of the project, but a utility class I had written in it.

I was, of course, fascinated. Did you see my project? Did you care enough to look into the code? No, it was the result of a Koders search. Koders, and the less-useful Google Code Search might actually give a lot of life to those “Open Source Losers”. Even if the project never takes off, if there are useful bits of code living on the web, people will find them. It isn’t quite the grand vision of component-reuse that the Computer Scientists (capital C capital S) have wanted to see, but neither is Google the vast auto-correlated semantic web that TBL has been foretelling for a decade. Maybe, just maybe, though, it is good enough.

Robert Cooper

AddThis Social Bookmark Button

Romain is pimping the pimping of Swing apps. Of course, I have to pick at him:

It looks bad by default. You have to change it to [get] a good-looking application. Swing makes that really easy. You can override everything, the behaviors, the feel, you can change the look.

You have the powerful Java2D API [that] gives you all the drawing tools you need to create very rich user interfaces, with animation and nice effects. It’s the same technology we see in the old-style Swing applications, [and] with the same technology we can create things [that look] similar to the Vista [UI].

[snip]

When you bring up Windows, most rich clients aren’t that rich, actually. They’re just gray and dull and have a lot of buttons and text fields. We needed to find a term to talk about clients that go beyond that–rich clients with animation and 3D. The kinds of stuff you see on Vista today. We used the term filthy-rich clients to talk about those clients that tried to go beyond the existing user interfaces…

Rich-clients are getting better and better. They steal ideas from the Web, so we are now at this integration of several media. You have 3D, you have video, it goes beyond just the images we’ve had so far.

Here is the thing: I don’t want to monkey with all the stuff to make my swing app look good. If it is gray and dull that is because you aren’t providing me with a default that looks better. This is one of the reasons people respond so well to Flex apps: they look great with just the defaults. I, like most programmers, am lazy. I usually just want an app that does X as quickly as possible. Give me a toolkit that makes it look good by default.

Robert Cooper

AddThis Social Bookmark Button

Pat throws down the proverbial gauntlet with Java People Must Be Stupid. It is a couple of bodily fluid references away from being a Hani post. In short, he discounts the need for strong typing in Ruby:

How do I make Ruby safer? It’s a topic that people bring up on the mailing list every once in a while. People shouldn’t be able to open my classes. They need compile time type checking so the app doesn’t blow up. Extending system libraries is bad.

Seriously, browse through ruby-lang for threads where the starter needs Ruby to be more “safe.” A ruby hacker will cheekily ask, “Why do you need static type checking? Are you going to try to regexp match an Animal?” “Well, no, not ME of course, but somebody else might.” I don’t even know who “somebody else” is most of the time. Is it someone on your team? Is it someone from another department? Is it some random guy who downloaded your library?

Concerns like these all seem to boil down to one major theme: The people I work with are stupid.

[snip]

The more serious issue is when “someone else” refers to someone whose welfare you actually are interested in, or, god forbid, responsible for. If you need to protect someone on your team from code, there are two scenarios in play:

1. The person is stupid
2. The person is naive

Neither issue is really that difficult to handle. The first one has a very simple solution - fire them. You heard me. If you’ve determined that this person truly has no chance of learning how to judiciously use some piece of code, there’s zero chance they’ll had value to your project. Programming is a vigorous intellectual exercise, and I’ve never seen incompetence actually benefit such endeavors.

[snip]

Ruby doesn’t need to be more safe. It certainly doesn’t need static type checking. What we need is to kick the idiots out, and educate those with less understanding. Doing so improves those individuals, ourselves, and our craft as a whole. It doesn’t take much more effort than trying to keep people from shooting themselves in the foot and performing damage control when they find workarounds. The benefits are obviously way better. So what’s stopping you?

Now. Let me be clear here. Static typing isn’t an end-all-be-all of making your language safe, and certainly not foolproof. But there are some important things to consider here.

1. If you are creating an API for other people to use, typed arguments and returns make your code (closer to) self-documenting.

One of the things that kills me about the Ruby people is more than a few times when someone asks about the types going into and out of API type methods, the answer is “Write a test case.” This strikes me as the apex of lazy on the part of the API developers. You didn’t document it, and the language doesn’t give me good hints, so it is my problem to figure out how the method works by writing tests. Like I want to test someone elses code. Frankly, this kind of thing pervades Ruby as a problem. The JRuby guys are constantly bumping up against the fact that Ruby has no language spec (though the Wikified spec process has recently begun) which means they have to test and replicate every edge-case behavior in the language. You carry this forward into APIs and, idiot or not, you are making more work for other people.

Now, I am a fan of duck-typing. Indeed, support for duck-type adapters in Java is one of the reasons I have wanted Java to have Dynamic Proxy support for concrete objects for so long. I hope that language level property accessors will open up this possibility as the entire front-side of an object will be definable in interface form. However, feed( Duck ) is still easier to figure out than feed( Object ). In a dynamic language, you don’t even have to enforce it, but having it simply expressed — as you can see in ActionScript — helps a lot for people using your code.

2. Extending core classes is a security problem.

One of the powers of dynamic languages is that you can runtime alter objects. (As an aside The Crockford Lectures at Yahoo on JavaScript are great) This is powerful, and in the scope of the kind of work being done in Ruby, or even the still basic AJAX stuff in JavaScript, it is all well and good. There is a reason, however, that String and Integer are final classes in Java: because in the C++ world, the ability to replace the String implementation in a library was one of the most common vectors for Trojan/Malware code to extract things from a secure system.

When you work in a large enterprise with many teams working on many internal applications and internal APIs that those applications use with a mix of security modes for each of them, opacity is sometimes important. More important, however, is making sure you can’t inject a String that, say, emails passwords to some account, or at runtime clobber the behavior of a policy-managed class. In this case, having ENFORCED typing is actually important. While there are certainly large Ruby apps roaming around out there, I haven’t seen any discussion of multi-team/multi-project groups in an Enterprise dealing with these issues yet. Isolation via WS-* calls is an option there, but sometimes that is less than practical.

3. Static Typing makes large-scale automated refactoring possible.

As a GWT fan, one of the things that people keep looking at Java for is the tooling. While Tor seems to be making great strides in the Ruby support, automated refactoring in untyped languages is hit and miss at best, completely impossible at worst. For my money, good refactoring tools in the hands of the average developer has been one of the great leaps forward in development over the last decade, and it is a big encouragement to have better APIs and internal code. Loss of this is not something I would like to see on a large scale. When you are talking about multi-project-multi team, losing the obvious checks against code that gets a new version of an API is a problem, even if the refactoring works as advertised in the API project. Again, you are back to writing test cases against someone else’s API to see if there are obvious breakages.

All these points aside, I won’t dispute that there are a lot of bad developers out there. I am certainly not going to call Ruby people stupid, but I think there is a mismatch here. I like Ruby, and it obviously has big advantages in certain scopes, but those advantages cost it in other areas. Seeing people advertise it as the end-all-be-all language without admitting the places where it is worse than what we have in other language is a staggering level of arrogance.

Paul Browne

AddThis Social Bookmark Button

Dear Bruce,

First up, thanks for the book. Yes I’m saying thank-you about 8 years too late. ‘Thinking in Java‘ is what got me going in the language and in my mind is one of the best Java books written (sorry Tim). Giving it away free only cemented your reputation as the Bono of the Java world. OK, Bono without the Guitar, the Stetson and with a couple of overloaded constructors thrown in, but a man of stature nonetheless.

Secondly, I’ll forgive your flirtations with Python, on the basis that I’ve been having an affair myself with JRuby. I now understand the pain that you’ve been having at home, the endless repetitive arguments to get simple things done, and the temptation of a newer, younger, more flexible model.

So , I think you’re onto something here in your blogpost. I can feel the pain, the need to deliver Rich clients to users over the web. I think that Ruby / Google Web Toolkit / Struts 2 / Name your web toolkit has further to go than you may think , but eventually these ‘heroic efforts‘ (nice quote) will run out of steam. On the basis of your recommendation alone I’m willing to look at Adobe Flex, but I’m not sure if this is going to solve all the problems.

Now , a lot of us Java guys don’t like change (and as if you needed proof, just look at the comments on this O’Reilly blogpost on the Google API’s). All the same , we have a problem that gets worse every passing year. 6 Years ago we could have been sure that 90% of web sites were running Internet Explorer 4. Now we’ve got IE, Firefox, Safari (in all their different versions) as well as an explosion of mobile devices. The Windows Vista launch is only going to fragment things further with yet another platform to support.

No one web solution is going to display the same in all of these browsers. We’re not going to get a single solution from Microsoft / Sun / Adobe that everybody from a developer to my Granny is going to install. So we’re going to have to take the ‘least bad’ route - something that looks great, but degrades gracefully to standard HTML on less capable devices. Excuse my ignorance, but I don’t know (yet) if Flex does this.

Yes Hybridizing open source Java is the starting point for the solution. Unfortunately we’ve a long way to go yet, and Flex is perhaps only inspiration along the way.

Yours sincerely

Paul, Technology in Plain English

Update 1 just to be clear, I do have a lot of respect for Bruce and this blog post should be read in that light.

Update 2 The Adobe Apollo project appears to be a continuation of flex. While it has more power, I don’t know if it solves the degrade gracefully problem.

. Maybe we’ll actually use the MVC design pattern to build more than one interface - a rich client (choose your technology) and a basic one , for use by mobile and older devices.

Shashank Tiwari

AddThis Social Bookmark Button

Jeff Whatcott, Macromedia vice president of product management, is convinced a switch to a tiered licensing model will bring new developers into the Flex fold, a number that’s currently below 10,000.

“We’re very serious about getting a million developers using Flex to build RIAs on the Flash platform in the next three to five years,” he said.

Source - http://www.internetnews.com/dev-news/article.php/3554196. This statement was made back in October 2005. Similar statements have been made by Adobe in many more times in many more places.

Many would have read or heard this before.

Today we have between 3 and 4 million Java developers and we assume that this number grows to 5 to 6 million within the next three to five years. (Which itself is very optimistic, though Sun thinks they can grow the number to 10 million).

Now as per current estimates the number of Flex developers are still in thousands. Assuming that half of the 1 million developers that they claim they will have come from the set that are with Flash, ColdFusion, PHP or any other skill set, we still have half a million coming from the set of Java developers. Considering that the server side for Flex is Java, this even sounds logical. This implies that 1 in every 10 or at worst 1 in every 12 Java developers is learning Flex or already knows Flex today. What do you folks have to say about this?

Shashank Tiwari

AddThis Social Bookmark Button

There is one thing certainly real about Google Spreadsheets and that is “hype” !

Recently, a fellow blogger claimed the end of server side java was possible with the emergence of Google spreadsheets. Do Google Spreadsheets mean the end of Java?. Praises of Google Spreadsheets like everything else Google is commonplace, but this took me by surprise and makes me ask a more fundamental question - Is Google Spreadsheets even a spreadsheet that an enterprise could use? MS Excel, the most widely adopted of Spreadsheets in the enterprise today, not only provides the nifty functions and data management features (sorting and filtering type of capabilities) - some of which Google has replicated - but also provides a rich VB Macro based programming possibility and an easy integration with all the other MS Office applications. Excel spreadsheets can be easily dropped into the Outlook mail client and embedded into MS Word. Business users love MS Excel, not only because of its built-in features but the fact that plug-ins exist for functionality ranging from budgeting to exchange connectivity to software life cycle management to rules definition. Even if Google Spreadsheets API was so simple that it took a developer a couple of days to build a useful plug-in - its still a few years before it reaches anywhere close to what is available with MS Excel. How about Google letting us import the spreadsheets into Gmail for starters?

Is Google Spreadsheets an online collaboration extension to spreadsheets like MS Excel or is it anything more? (Microsoft already has an initiative to bring the spreadsheet to the web).

Remember, that I like Google and I am a Java evangelist but should that make me blind?

Robert Cooper

AddThis Social Bookmark Button

A couple days late, but I just wanted to wrap up the Sun Tech Days notes.

Really, the Tech Days presentations seemed to suffer from the same problems that the NetBeans Day presentations did: they seemed dated.

The perfect example was a session titled “Java SE Today and Tomorrow.” The thing is, the “Today” was a rehash of all the features in Tiger that most of us have already familiarized ourselves with months — if not over a year — ago. “Tomorrow” was Mustang which is, ahh, in general release. No talk of language level property accessors, XML support, the FindBugs derived annotations.

The presentation on JPA was actually not bad, but it was, again, old news. The group of people I was with were very nearly praying for death by the time it ended. While there was “that guy” in the audience who seemed to just want to get help with his code, I think most of the people there would have appreciated a much more detailed presentation on a narrower scope. The WSIT presentation by Arun Gupta was great — again. Mostly it was nice to see progress in this effort, but with WCF and .NET 3.0 being GA now it makes me wonder how much of the remaining work will be JAX-WS working around stupid Microsoft stuff rather than both groups “doing it right”.

As an aside, I have found myself frustrated with the JAX-WS RI and moving back to using XFire for a lot of things because of a mixture of annoyances in the JAX-WS clients (using JAXBElement when an element is xsd:string nillable=true minoccurs=0 for instance. Yes I understand why, but it is still annoying since most SOAP servers treat nil and absent as the same thing) and incompatibilities with NON-.NET clients in the server (Using the same element name in different namespaces for no reason makes Flash angry, and the inability to get the schema inline with the WSDL angers Pear:SOAP an others). Add to that, the fact that our external clients on the day-job can’t even get to SOAP 1.2 support, all the swankiness of the WSIT suite of WS-* specs isn’t even going to be on the table for us for a while.

Aerith showed up again in the general session. I didn’t go to the Pimp my Swing session, but I was informed it was pretty much the same thing from Java One.

The end of the day was a “NetBeans/Eclipse Shootout”. It was kind of interesting, but mostly it was just showing off the features we all know are there in the two IDEs. Personally, I wished it had been more along the lines of “Here is a couple thousand line Open Source project that people know, and here is a list of tasks to accomplish” kind of challenge. It was interesting to note that though STDs (an unfortunate acronym) was in Atlanta, the only JBoss employee to be found was on the “Eclipse” side of the shootout. What happened to making Fleury wear the goofy shirt around?

While the big features of NB are great, that day to day, hour to hour stuff is the annoying bit. Field encapsulation is a 1-keystroke operation in Eclipse, while it is a (minimum) 5 mouse click operation in NB. In a lot of ways, I find my relationship with NetBeans now is like that with an old friend: I can easily tell you everything about it that annoys me constantly, but coming up with the reasons I originally befriended it is a little harder. And yet, I “like” it better than the alternatives.

All in all, it wasn’t a really thrilling day. The “dip your toes in it” level of the presentations seemed far below the level of the room. A majority of Java Enterprise developers have been working with some, if not all, of these technologies for a while now and could really have used a bit more depth, or even just doing some free-form “ask the expert” sessions would have been good. Honestly, if I needed an “intro to technology X” session, I would rather go to an AJUG meeting. On the plus side, though, there was plenty of swag. :)

Tim O

AddThis Social Bookmark Button

Most programmers follow a similar development path. Introductory material leads to more advanced material, a new programmer might start with learning types and conditional statements, then move on to data structures and algorithms. Eventually most programmers are confronted with Design Patterns, the promise - the promise that “everything is a pattern”. And, while Patterns are important, they are not a panacea. In fact, when I sense that people are trying to over apply patterns it reminds of my 15-month old daughter learning shapes. She picks up a square peg and tries to jam it into a round hole, when this doesn’t work she gets a little frustrated, and when that doesn’t work she redoubles her effort until her attention drifts to something else (like Curious George).

Design Patterns: Powerful, Essential, (and Dangerous)

“We use patterns” is not a shibboleth for success. When a new programmer starts to get interested in patterns, I tend to have a mixed reaction. On the one hand, patterns are an important part of engineering any large system. If you are implementing anything with more than a few thousand lines of code, a working knowledge of patterns is a prerequisite; it is convenient to tell someone that this particular system uses an AbstractFactory or the Command pattern. Alternatively, I’ve also seen a number of systems that either overapplied or abused patterns by applying them when they were not appropriate, confusing one pattern with another, or just getting a pattern wrong. (…umm..someone must have read the book backwards because this is definitely not MVC.)

In my own experience, I ran for design patterns at the same time I was infatuated by UML. In 1999, patterns supplied the language I needed to take that next step to understanding larger systems, and my office walls were plastered with man-sized static structure UML diagrams. Patterns + UML made it easy to visualize and communicate, but I found that approaching problems with patterns in mind tended to affect the solution. Subconciously, I would think of some way to apply a “pattern” to the problem. (And, then, all of a sudden everything was an AbstractFactory…) Patterns appeal to the idea that one can escape the day to day frustrations of programming by capturing abstract structures which can be universally applied. All the books about patterns appeal to this ideal, and they tend to play upon Patterns as a pancea or Patterns as a common language. (Patterns as Esperanto.)

Read more…

Paul Browne

AddThis Social Bookmark Button

Or to be more accurate ‘Do Google Spreadsheets mean the end of Java as we know it’?

Update: There is a reply to the (many) comments on this blogpost here: Java and those pesky Google API’s

Think about this. Who pays your wages Mr Java-Developer-who-has-just-had-a-couple-of-years-at-the-top-of-the-pile? Clients, or if you’re in a larger organisation , the business folks (i.e.’internal’ clients). Do you think any of them care about Java? Do any of them know what Java is? All they want is to get things done, quickly , and with as few mistakes as possible.

These business people would be happy to run their organisations on Spreadsheets. Do you remember the cartoon where Dilbert convinced the pointy haired boss that he could fly the plane using Excel? There’s more than a element of truth to this. I know of at least one US Fortune 100 company that (until recently) conducted most of it’s operations on little more than Microsoft Office and duct-tape. It worked, not very well, but it worked.

Until now , the next line would be ‘Excel (or any other type of Spreadsheet) is not secure / scalable / sharable / not web friendly’. That was until Google launched their Docs and Speadsheets. It’s an online version of Office with some spreadsheet functionality. Play with it a bit and you’ll see that there’s plenty missing. But this being Google , I’m willing to put good money on

  • (a) new features rolled out (think steamroller) and
  • (b) These Spreadsheets being massivly scalable / secure / sharable.

This being Google, there is also an API (developer page here). It’s got massive holes in it (e.g. you can’t yet use it to create a new spreadsheet). But when Microsoft bring out their version of online spreadsheets (and they will) not only will they clone the Google API (to get market share), they’ll need to go one further and introduce new features / remove the usage restrictions in order to compete.

So, secure, scalable, sharble online spreadsheets are here to stay. So lets take a look at Mr. (or Ms.) Pointy haired boss thinking about their new project:

  1. Hmm, I think we need to be able to gather which health plans our employees are enrolled in.
  2. OK, I’ll throw together a spreadsheet to show people what I want
  3. Before I’ll give to our friendly Java developer and let him ‘do’ a website from it.
    Soon I’ll just share this on Google.
  4. Great , Loads of people are now using it, I’ll just the (Ruby / PHP / Insert other language here) guy to add one or two extra features.
  5. Most Excellent. Why don’t we spin this off as a Web 2 company and sell it to EBay??

There you have it, Massively scalable , Highly secure websites (see Google Authentication API), without needing to know anything about EJB, JMX , JBoss, JDBC or any of the hard won knowledge that us Enterprise Java Developers have built up over the last 7-8 years. I’m exaggerating, but not much.

What do you think? Is Enterprise Java dead, or is Web 2 just another boost and a slightly different way of doing things for us Java people?

Other Java Posts from Technology in Plain English

Some other notes:

Chris Adamson

AddThis Social Bookmark Button

Here’s a potential media application. Can Flash or one of the Java media libraries handle it?

Daniel H. Steinberg

AddThis Social Bookmark Button

I’ve been covering Java on the Mac for a little more than ten years now. Fortunately, I have other beats. If this were my only focus then I’d be really worried by a Steve Jobs quote on David Pogue’s blog.

Tim O

AddThis Social Bookmark Button

If you’ve read my previous posts, you’ll know that I’m on an unending quest for the right Java web framework. While Faces shows some promise, I’ve got this conviction that the future of the web-layer isn’t going to come from Sun. Call me pessimistic, I don’t care, i’m just not excited by the technology. …..so I thought I start another food fight by communicating some positive and negative first impressions about another Java framework - Wicket. Read more…

Robert Cooper

AddThis Social Bookmark Button

Since Josh asked:

1. I agree with Hani on the whole 5 things meme.

2. I once wrote a templating system called Rectal Gloves, featuring the Rectal Gloves Encapsulation Language, or Rectal-GEL. It became a running theme.

3. I am a complete flaming liberal, and I think nuclear power is a good idea. I think the reactionary hippies make me ill, and given suspension and pebble bed reactor technology, I think the fact that people are still so violently opposed to nuclear power is heinously short sighted. And the people around Yucca Mountain can just deal with it.

4. In one of those classic southern ways, I am related to nearly everyone in Trigg County Kentucky.

5. I don’t forward meatloaf. Ever.

Steve Anglin

AddThis Social Bookmark Button

Here are my top ten predictions for Java in 2007…

Shashank Tiwari

AddThis Social Bookmark Button

Java Server Faces (JSF) has been the right product at the wrong time for a while now. What will be its fate in 2007? Will it possibly be a leader and a technology of choice for client side development?

JSF came at a time when JSP and similar technologies were popular among web application developers. JSF tried to bring the learnings from desktop client UI development to the web. It initiated the possibility of creation of reusable widgets and controls. It provided a sophisticated event model and provided effective management of the round-trip request response cycle.

However, JSF for a while was merely a framework. As implementations and interpretations emerged, the world had moved miles ahead and AJAX had conquered the web2.0 client UI space. Then came the paradigm that AJAX with JSF was not only possible but also a best practice and a way to get the best of both worlds - AJAX and Java together. While many Java developers adopted this paradigm and the followers are growing, its current form with AJAX does appear like a strategy in hindsight and an afterthought.

Some frameworks like JBoss Seam and Apache Shale have provided the missing pieces in the JSF puzzle and commercial vendors have come up with multiple implementations and IDE support. However, the Java camp still looks a little confused about the future of the UI technology. I am positive many people would comment aggressively against this remark and many may even try and justify the contrary, but please remember that this is only my opinion and I am an ardent Java fan and I do believe what I am saying here. I would be happy to hear convincing arguments that disprove me.

So far whatever I have said it pretty much the past, but what about the future. What would JSF be like in 2007 or will there be a new J* UI technology that would replace it or will Java Applets reincarnates flourish or will we keep guessing about it all year long?

Happy New Year!

Tim O

AddThis Social Bookmark Button

In response to Paul’s last post, “Struts is the new Mini”. Paul I can see where you are coming from, but choosing tomorrow’s winners from yesterday’s successes has never been a winning strategy in immature markets. Many organizations have already abandoned Struts 1.x. The only organizations left using Struts 1.x are the slower corporations, and when these organizations finally get around to moving to a newer framework they’ll have a variety of mature technologies to choose from (and a lingering sense that they probably don’t want to repeat the mistakes of Struts 1.x). The real question people using Struts 1.x are going to be asking themselves, is, “How did I get stuck with a framework that didn’t evolve?” We’re talking about software, and unlike my 1999 Camry LE, there’s no reason why software should be discarded after 160,000 miles.

Struts 2 and Brand Continuity

The Struts community took a revolutionary approach as opposed to an evolutionary approach - they didn’t try to launch series of incremental model redesigns in an attempt to create a seamless transition to the “Struts + WebWork (aka Struts 2)”. They’ve only recently realized this and they have some brand repair to do in the next few months. Shale was the real brand opportunity, and for at least a year or two, everyone was talking about “Shale is the new Struts, should we move to Shale?”. Shale didn’t gain developer support or customer traction, and, in the end, the customer demanded an evolutionary approach. In the world of brand marketing you don’t risk a successful brand by introducing too much change all at once. The Toyota Camry is a good example.

Toyota redesigned the brand incrementally (’92, ‘97, ‘02, ‘07) and made dramatic changes to the car without changing the basic interface, but because they took small steps, they’ve preserved the brand. As a consumer, you conceptualize the Toyota Camry as a single continuous product line, but at the technical level the differences between a 1999 Camry and a 2007 Camry Hybrid are dramatic. My 1999 Camry is (almost) a completely different model than a 2004 Camry, and an entirely different car from the 2007 Camry Hybrid. (And the styling differences between standard Camrys and the newer sporty Camrys imply a purposeful brand distinction) Even with these changes, if I’ve had a good experience with my 99 Camry, I’m more likely to just buy an ‘07 Hybrid. On the other hand, the differences between Struts 1.x and Struts 2 break brand continuity, and, even though Struts 2 is a quality contender, you should consider it a new entry on the market. Struts 2 and Struts 1 might both be considered family sedans, they both might have the same odometer and steering wheel, but it’s a different drive train and don’t just assume that you are going to take it into the same mechanic. Struts is the new Mini in 2004, and the analysts are withholding judgment until we get a sense of the resale value. And, admittedly, the interface for a car is much simpler than the interface to a web application framework (steering wheel, ignition, and gas pedal vs. web.xml, struts-config.xml, and JavaBeans), so the automotive analogy shouldn’t be carried too far. read on…

Steve Anglin

AddThis Social Bookmark Button

Here are my winners and, yes, even losers for the most and least innovative and/or impacting Java technologies in 2006…

Paul Browne

AddThis Social Bookmark Button

No matter what car you drive , the chances are it was influenced by the Mini. Introduced in the UK in the 1960’s a whole generation of families was crammed into a car that popularized the notion of front wheel drive. While small , it was practical and drove so well it even starred in films such as The Italian Job. Recently, a more modern version was released with none of the parts but all of the spirit of the Original.

We’ll come back to the Mini, but if you build websites using Java, then at some point you have used Struts. The original Struts is proof that a framework / project / product doesn’t have to be the best to be the most widely accepted. It just has to be in the right place at the right time, and ‘do what is says on the tin’ - in this case a fairly useful implementation of the ‘Model-View-Controller’ design pattern.

So what’s the link? Seeing the original Mini from the outside may bring a smile to your face, but on the inside it’s cramped and unfortable. You may have happy memories of websites you built using the original Struts, but lately your thoughts have been straying to more modern frameworks, perhaps with Ajax and integration with Spring built in.

This is where Struts 2 comes in. Like the Mini, it has (almost) none of the parts , but all of the Spirit of the original. It’s based on Webwork which sounds scary, but most Struts Drivers will be able to climb in , find the Struts.xml file and get the engine running within minutes. Struts 2 is easier to drive (JavaBeans instead of Action Forms), more powerful (it can use Ajax and JSF) and comes with more optional extras (e.g. it’s integration with other frameworks like Webwork and Spring).

Best of all the Struts team have a clear migration path between the old and new Struts. You can use both side by side in your garage application, and change over the parts piece by piece. Spare parts for the original Struts will still be available for quite some time, both from the original team and the large dealer developer network that has built up around the framework.

What do you think? When Are you going to give Struts 2 a try?

More in Technology in Plain English

Robert Cooper

AddThis Social Bookmark Button

Here is something that made me want to slam someone’s head through a wall today.

If you have worked with Tomcat before, you are no doubt familiar with the context.xml file. This is where you configure container managed resources. It has one property on the <context> tag that we were using explicitly. This is from the Tomcat docs as they are today:

docBase

The Document Base (also known as the Context Root) directory for this web application, or the pathname to the web application archive file (if this web application is being executed directly from the WAR file). You may specify an absolute pathname for this directory or WAR file, or a pathname that is relative to the appBase directory of the owning Host.

The appBase is the default “webapps” folder.

Now, the ways we are using it are rather beside the point, there are a number of reasons you might want to deploy the same docBase multiple times: perhaps you want to run the same webapp with different database settings, or a different authentication system. However, there is something that is left out of here. declaring [docBase=”myApp”] for a context path of “app” will fail. Even worse, it fails with one of those stupid log messages:

WARNING: A docBase C:\apache-tomcat-5.5.20\webapps\myApp inside the host appBase has been specified, and will be ignored.

[Then it continues booting like this isn’t a big deal..]

SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\apache-tomcat-5.5.20\webapps\app does not exist or
is not a readable directory

Yeah, because you aren’t doing what I explicitly told you to do. This is software 101 here people: if you have a configuration option, what I give you as the configuration should be what you bloody well use. If stuff goes wrong from that point on, it is my fault. Defaults save me from myself, but if I want to shoot myself in the foot, let me. Sometimes there might be an alien or something on that foot and it actually is good idea.

Honestly, I was baffled. Why would someone do this? Who in their right mind would take a user-supplied explicit configuration and clobber it irrecoverably with a default value? It took me a while to think through, but I finally understood the reasoning here: a completely lazy programmer.

Lets look at another snippet of the docs:

Deploying on a running Tomcat server

autoDeploy set to “true” and a running Tomcat allows for:

  • Deployment of .WAR files copied into the Host appBase.
  • Deployment of exploded web applications which are
    copied into the Host appBase.
  • Re-deployment of a web application which has already been deployed from
    a .WAR when the new .WAR is provided. In this case the exploded
    web application is removed, and the .WAR is expanded again.
    Note that the explosion will not occur if the Host is configured
    so that .WARs are not exploded with a unpackWARs
    attribute set to “false”, in which case the web application
    will be simply redeployed as a compressed archive.
  • Re-deployment of a web application if the /WEB-INF/web.xml file (or any
    other resource defined as a WatchedResource) is updated.
  • Re-deployment of a web application if the Context Descriptor file from which
    the web application has been deployed is updated.
  • Re-deployment of a web application if a Context Descriptor file (with a
    filename corresponding to the Context path of the previously deployed
    web application) is added to the
    $CATALINA_HOME/conf/[enginename]/[hostname]/
    directory.
  • Undeployment of a web application if its document base (docBase)
    is deleted.
    Note that on Windows, this assumes that anti-locking
    features (see Context configuration) are enabled, otherwise it is not
    possible to delete the resources of a running web application.

[ed: emphasis mine]

And:

Undeploy an Existing Application

WARNING - This command will delete any web application artifacts that exist within appBase directory (typically “webapps”) for this virtual host. This will delete the the application .WAR, if present, the application directory resulting either from a deploy in unpacked form or from .WAR expansion as well as the XML Context definition from $CATALINA_HOME/conf/[enginename]/[hostname]/ directory. If you simply want to take an application out of service, you should use the /stop command instead.

(Note, WARNING is red and bold here in the original)

You see, rather than confirm in the deployer that the docBase was not in use by another context before deletion, it simply short circuits this by taking away flexibility. Now, frankly, knowing the risks associated with this, I am perfectly happy to continue along setting my docBases to shared folders. However, I no longer even get the option.

There is an alien on my foot, and Tomcat is going to let it eat me.

Paul Browne

AddThis Social Bookmark Button

Dear Open Source Santa,

Now that you have Java in your open source toy bag, can I have Duck Typing please ? It shouldn’t be too hard to do, since the elves in Ruby-Wonder-Land have been making toys with Duck Typing for years. I’ve been a good boy all year and promise to play nicely with the .Net kids next door.

You don’t know what Duck Typing is? Sorry, I forgot that you’re more than 1000 years old. Little Jamie next door got Ruby last year and he says that ‘if it looks like a duck, and walks like a duck , then it is a duck’. He says making the computer do more work makes it a lot easier to write programs.

My Teacher says not to be greedy, and that you’re very busy making Toy Trains. She says just ask for getters and setters. You know, the boring code like ‘getSomeValue()’ and setSomeValue(). She says the Apache imps have been very good with Dynaforms but that writing a Java web application is still just too slow.

Rudolph will tell you that writing get(”someValue”) is about as cool as having a bright red nose. He would also want to put ’someValue’ in one place only (the web page). Having to write config files and javabeans feels too much like homework.

Santa, I know there are other children that need changes to the core Java code more than I do, so maybe you know of an open source project that already has this.

Paul , Technology in Plain English

P.S. :I still want to keep compile time type checking to make sure I don’t make any mistakes.

Dejan Bosanac

AddThis Social Bookmark Button

I have this project that started years ago and still uses old Apache 1.1 version of the XML-RPC library. A few days ago I needed to add an extra functionality to the services it exposes. The underlying API for the new service works a lot with array of objects which is not friendly with that version of XML-RPC library.
The thing is that up until version 3.x of Apache library, Vector and Hashtable were only Java classes that could be used for transferring collections (<array> and <struct> XML-RPC types respectively). So naturally, I thought this was an ideal opportunity to upgrade to 3.x version, which is much better in handling various Java constructs (Object[] among them) as XML-RPC types. This is where surprises started to pop up.

Robert Cooper

AddThis Social Bookmark Button

Just a thought here, but out of all these Web 2.0 sites that have user pages… for instance out of my personal collection:

http://www.last.fm/user/kebernet
http://flickr.com/photos/kebernet
http://allconsuming.net/person/kebernet/
http://del.icio.us/kebernet
http://wiki.java.net/bin/view/People/RobertCooper

Why don’t we go back to the way-back days of using http://host.tld/~username? It worked so well for a long time and while the ~ key might be a mystery to “mom”, at least it was a convention. For all the talk about pretty and intuitive URLs, this seems like an easy one that time has forgotten.

Paul Browne

AddThis Social Bookmark Button

Now that the dust is beginning to settle on Sun’s Decision to open source Java , what does it actually mean for you? That’s you as in a Business user, you as in a Java Developer , and you as a member of the wider IT Community?

  • In the short run (i.e. next 6 months), once the buzz dies down , not much. Remember that it took several years after the Netscape code was open source for Firefox to emerge and change the dynamic of the browser market.
  • In the medium term (between 6 and 24 months) expect some interesting packagings of Java to emerge, similar to the way the various Linux Distros work today. Consider these ‘green shoots’ or prototypes with interesting ideas. A ’small footprint’ version of Java targeted at Applet developers seems to be one popular opinion of what might emerge. However, unless you are ‘bleeding edge’ or in a niche area the chances are you won’t notice them at this stage.

It is in the longer term (2 years plus) that open source java really makes it’s mark. Some predictions that you can quote back to me later:

- In the same way as JBoss and Geronimo have commoditised the app server market programming languages and runtimes will become a commodity. Expect the .Net platform to be opened (not just standardized) in some limited form.

- Java will become more like .Net with multiple languages running in the standard JVM. We have JRuby and Groovy. It wouldn’t be too hard to add C# to this list. Visual Basic in the JVM (the Sun Semplice Project) is already on it’s way.

- Oracle , IBM , SAP and others already committed to the Java market will become focussed on Java as an even bigger part of the core strategy. Just like the app server market, each will seek to differentiate themselves, perhaps by Service (IBM), by a core database (Oracle) or by leading a niche (SAP). Expect tension between the desire to differentiate (and fragment) and the GPL which seeks to ‘bind them all’.

- Apache Harmony , a clean room implementation of Java will continue to gain momentum. It will get picked up by a major vendor in a similar manner to Apple using BSD code.

- Microsoft .Net will end up in a ‘death march’ with Java trying to gain a lead in a feature set. Open source is very good a mimicing existing products (as it makes an easy spec for dispersed developers to write on - just look at Open Office), so (unless software patents get thrown into the mix), it’s hard to see .Net getting a fundamental and lasting edge over the Java Ecosystem.

More in Technology in Plain English

Update: I’m not saying that .Net is going to go away (nor should it), just that both it and Java are going to be around for a long time to come. Joe and John also have more commentary.

Robert Cooper

AddThis Social Bookmark Button

This isn’t much of anything, really. More the beginings of ideas, but I was chatting with Josh Marinacci earlier about databinding in Swing, and frankly, how completely unimpressed I am by what I have seen of JSR-295. Honestly, I implemented all of the functionality I have seen there in about a week on my own. Having a whole spec that does, frankly, that little work for me doesn’t get me all hot and bothered.

I made some notes about what I consider — off the top of my head — the ultimate Swing binding framework. I don’t pretend that all the issues have been worked out, but I think it is a good starting place to think about it.

More after the bump.

Tim O

AddThis Social Bookmark Button

…in response to Dejan’s previous blog post “Playing with XFire”. Dejan, Xfire is great, it runs Axis out of town from a performance perspective. from my own experience, Apache Axis (both 1 and 2) has a codebase that will make you never want to use it again. Seriously, check for yourself. If you really want a compelling reason to use XFire, google “JSR 181 XFire” and the “Spring Proxy XFire”. XFire is fast as lightning, and, at least, for the work i’ve been doing lately, you can get something exposed as a SOAP service simply by using the JSR 181 Annotations. plus, it has support for different transports like JMS. Couple something like XFire as a messaging library with ActiveMQ as a JMS provider and ServiceMix and you’ve got some really interesting tools.

In short, to anyone looking to produce or consume a web service in Java, Use XFire. Couple it with the Spring Framework and you’ll be disappointed by how easy it is.

Dejan Bosanac

AddThis Social Bookmark Button

Every once in a while I get some WSDL file and a task to create a Java client (and a service for testing purposes) that will use a defined service. I’ve tried XFire a couple of times before (version was 1.1 in those days). But it never actually managed to create stub client and servers classes from “my” WSDL files. So, without much time left to investigate I usually decided to give it a bit more time and fallback to good old Axis.
But, a few weeks ago everything changed. I got a definition file and decided to try XFire again. This time I found an Eclipse plugin for it, which does exactly what I needed to do. It needs Java 5 and Eclipse 3.2 … checked and checked … I ran the wizard that plugin provides, entered some basic facts (location of the file, package and the location for the generated sources) and that was all. I was up and running in under five minutes. Excellent.
But that is not the end of the story. The real surprise came when I browsed the generated code. It was much more “elegant” (readable) then equivalent Axis stub. With a heavy use of annotations it will be much easier to maintain in the coming years. Also, support for XBeans and Spring definitely makes my life much easier with XFire. I didn’t have time to verify whether it is as efficient as people say, but it doesn’t matter for me at this moment. And with all good coding that has been put into that project, I don’t see how it could be any different.
So with all modern features, elegant stub classes and “probably” good performance, I think that I will stick to the XFire for my future SOAP coding.

Robert Cooper

AddThis Social Bookmark Button

is it…. GPL?

Bray gives an interview with Artima and there are at least a couple of WTF moments in there.

Frank Sommers: Why is the GPL a better choice for Java than Apache, Mozilla or some other open-source license?

Tim Bray: You are never going to get a consensus on that. There was a huge amount of argument on that [issue]. I see IBM issued a statement today, wishing that we had done Apache. You can name many reasons for choosing Apache.

I personally think that the GPL is a better choice, simply because Java has been given away for free for so long by us that the world owes Java something back. When people make improvements [to] Java these days, they should very well turn around and give that back to the community. So I’m really comfortable with GPL.

He’s the thing, Tim. That is all well and good, except you maintain the dual licensing model. Unless *Sun* wants to fork Java — an all internal version, and an all GPL version — that is just not going to happen. All those improvements that might float around on the internet can’t just be culled by Sun. The author has to hack through the red tape of your contributor agreement, feel comfortable with Sun selling her code to binary only distributors completely out her control — something which I suspect is going to go over like a fart in church with the exact people you are trying to woo with this — and THEN Sun will put it “in Java.”

Frank Sommers: The new project on java.net is called OpenJDK. It’s not called Java. How does the licensing change impact the use of the Java name?

Tim Bray: That’s a very good question. The source code is open-sourced under the GPL. Anybody can take the code, anybody can change the code, anybody can compile their changed version and ship it, or sell it even.

What they can’t do is call it Java. You can’t call it Java unless it passes the TCK and goes through all the usual TCK and copyright processes you have to go through to call something Java.

That’s how we’re keeping the compatibility promise to the world. We’re not doing it through engineering means, we’re doing it through business and legal means. If something is called Java, and has the Coffee Cup logo on it, that means that it has passed the TCK and it is, in fact, fully compatible Java.

In the past, there have been incidents of people trying to skate around that, to call something Java that really isn’t. In the past, when that happened, we have taken them to court. Let’s be totally clear on that: If somebody’s trying to do that, they’ll find themselves in court right away. We will be very aggressive about that.

For the business user who doesn’t want to be fooling around with experimental open-source, all they need to do is look for the Java name and the brand [image], and they’ll have real Java. Whether it’s called Java in the administration panel, or the command line you type to run it, or however you normally access it, if it appears under the name Java, then it had better be Java, or that distribution is going to end up in court. [ed: emphasis mine]

Seriously, that is (a) not or only marginally enforced right now, and (b) pretty stupid. If Sun wants to get its panties in a wad every time the word “java” is used then the courts should already be awash in suits. Fedora today ships with a “java” command that isn’t Java™. Does GWT need to get sued because they hava a java.lang.String class that isn’t TCK compliant? Why aren’t you suing Classpath from the get go, since they don’t pass the TCK?

I understand having Java™ certification, but this statement implies a level of legal wankery on Sun’s part that is well past what we have been accustomed to and beyond that proverbial pale. Out side of that, is it good for Sun OR Java to have the Iceweasel issue here?

Sam Griffith

AddThis Social Bookmark Button


Paul Browne

AddThis Social Bookmark Button

Back in the dark days when World War III threatened us with imminent nuclear oblivion, we were told that cockroaches and other insects were the highest form of life that would survive. I’ve recently come to the conclusion that SQL programs, like cockroaches, will surive anything that the IT world can throw at them.

Oracle Ireland Logo

SQL is a way of getting useful information from databases ,like ‘get me all Bank Customers with an account balances greater than 10,000 Euro’. It’s been around since the stone age and it is strongly suspected that the ancient Egyptians were familar with it’s earlier forms. Given that at least part of most systems talk to a database, it is probably the most widely used programming language in the world. It’s the most widely used because it’s the most useful : do one thing and do one thing well.

However, you get into trouble when you use SQL in ways nature never intended. Once you step beyond the ‘get me this’ or ‘update that’ you’re in trouble. Like a 12m high cockroach from a 1950’s Horror Movie, your code is out of control. Even Oracle are migrating to a Java stack to implement business logic outside of the core database engine.

More in Technology in Plain English

Robert Cooper

AddThis Social Bookmark Button

Just a short rant here…

I was looking at This post at j.n about JSR-262 and exposing MBeans as ws-Management SOAP services. All in all, it is a good idea, and seems like a dunk in the water a no-brainer that people would want this functionality, and it follows well with the trend of mapping Java APIs (javax.transaction) to their ws-* equivalents (ws-AtomicTransaction). Bully on!

What stood out in my mind was the URI scheme used:

service:jmx:ws://blah:8888/blah

for SOAP vs

service:jmx:rmi://blah:1099/blah

for RMI.

What am I getting at? “service:jmx:ws:” is stupid. While service:jmx:http: might seem a little non-specific, why not service:jmx:ws:http:? Specifying an on-top-of-something-else application definition in a URI is all well and good, but “ws” is (a) a bad designator, “soap” would be better, and (b) doesn’t offer any alternative protocols. You can run SOAP over any old thing, and people do. While service:jmx:ws:mailto: might seem like overkill for this particular application, what about service:jmx:ws:https? Seems like that is a pretty common thing people might want to do, don’t cha know.

This isn’t the first time I have seen stuff like this. It started with people using feed:// as a schema space for RSS/Atom feed, replacing http:// so they could map URIs out to the browser. Fortunately, later evolutions of this came to use feed:// and feed:http:// interchangeably. Apple gave us the “pcast://” and “.pcast” duopoly for podcasts into iTunes. The interesting thing here, is the .pcast file on Windows is better than what they offer (well supported anyway) with the pcast:// URLs on the Mac, since I can put a .pcast file on an https:// server, and embed a link to an https:// server in the file. There is no pcasts:// protocol definition. Simply using pcast:https:// would have worked just fine, but nobody seemed to want to stop and think about that.

It is not as though people in the Java world are unaccustomed to long URI schemes. I can’t count the number of times I have put jdbc:oracle:thin: into a text file, but hey, unlike jdbc:mysql: oracle has 2 underlying access methods, so they add another layer. Just seems like using ..ws: as the last part of that URI is like restricting jdbc: to one sub-schema. In the best of all possible worlds, shouldn’t it just be specific enough to indicate that “I pass the rest of this to JAX-WS” and move forward, letting JAX-WS take care of the next protocol level with whatever it’s native or available support method is?

Paul Browne

AddThis Social Bookmark Button

The best thing about doing presentations is the questions you get asked at the end. Apart from the stomach churning moment of ‘will I be able to answer this one?’ they give you a new angle on things that you may have always assumed, but force you to think of in a different way.

Take one of the questions after yesterday’s Enterprise java presentation at DCU. One of the topics mentioned in the final ‘putting it all together’ was the Agile and RUP (or other upfront design) methodologies. The question , coming from an attendee that was keen on using Agile , was ‘How do you do Architecture in an Agile project?’

DCU Logo

On the face of it this seems a contradiction. Agile in it’s most extreme form is ‘make up just enough design as you go along’, with automated tests to make sure changing things later is a relatively low cost and pain free process. In real life most projects are a balance between Agile and need some element of a more formal process (often trying to answer the question ‘how mucn is this going to cost?)’

So , how do you merge Agile with an upfront design process? It’s easier than you think.

Most systems built the ‘traditional way’ do not get all their design done in one go. They might start out with the best of intentions for phase 1 with a clean sheet but over the months / years people come and go, business requirements change and different phases try to deliver different things. Over time the original clean design twists and turns and you work hard to try and make it work out ok. Some of features you thought were key may end up getting thrown out as too complicated.

Now Agile architecture is a similar situation. Each weekly / monthly iteration is like phases on the larger project , with twists and turns that may be unexpected. The difference now is that you have a safety net comprised of your (J)Unit tests, to allow you to make radical changes if your blueprint ends up in a cul-de sac.

Yes, it is ok to have an idea the bigger picture and where you like to go with the design. Yes, a good architect will find reasons in the current release to build towards that design. And yes, a good architect may admit that some of the design features he / she thought were required weren’t actually needed. The difference between Agile and Upfront architecture is in when you find your ‘Don’t really need it’ point. With Agile , you find it just before you build it. With upfront design / architecture you find it when it’s already too late.

More in Technology in Plain English

Dejan Bosanac

AddThis Social Bookmark Button

Reading this interview with Jean Elliott, director of product marketing for the Java SE platform at Sun Microsystems, got me into thinking about adoption of Java platform editions among developers (and plain users). I think that 1.4 is still very widely deployed runtime environment out there and that it is the main reason why many developers still hesitate to use Java 5 syntax and features in their projects.

There are three kinds of projects that we can differentiate:

  • applications developed for the managed environments
  • applications developed for unknown (potentially large) customer base
  • and libraries developed to be used in other Java applications

In the first case there is no restriction for the development team and their management to make an appropriate case study and upgrade their development and runtime environments. This is well documented in Wall-Mart’s case (mentioned even in Jean’s interview).

In other two cases, this issue becomes even more important because you don’t want to restrict yourself by limiting number of hosts (projects) your code is compatible with.
But existence of Retrotranslator (and Retroweaver) project makes this excuse obsolete.

Retrotranlator is a

Java bytecode transformer that translates Java classes compiled with JDK 5.0 into classes that can be run on JVM 1.4

which basically means that you can very easily make all of your Java 5 code compatible with JVM 1.4. Retrotranslator even offers Ant and Maven tasks that are very easy to use. So there is no reason why you shouldn’t modify your build process to create distributions for both platform editions. Of course, there are some limitations introduced in this process, so additional testing is required.

I think that this is very important topic for wide range of Java projects and that would be great to see Sun back a project like this one.

Don Brown

AddThis Social Bookmark Button

Since arriving on the scene in 2000, Apache Struts has enjoyed a very successful run, by most any standard, helping to build many, if not most, of the Java-based web applications deployed today. Its history tells of how Struts provided a solid framework to organize the mess of JSP and Servlets to make developing applications, which used mostly server-generated HTML with a touch Javascript for client-side validation, easier to develop and maintain. As time moved forward, and customer demands of web applications grew and grew, Struts 1 pretty much stayed the same, leaving more and more plumbing to the web developer.

At JavaOne 2005, several of the Struts developers (Martin Cooper, Don Brown) sat down with Rich Feit (Apache Beehive) and a few Struts users to discuss the future of Struts. We came up with the Struts Ti proposal, which described a framework that brought together a lot of good things that were developing in the web framework community. The problem is that the Struts 1 code base didn’t lend itself to drastic improvements, and its feature set was rather limited, particularly lacking in features such as Ajax, rapid development, and extensibility.

At the same JavaOne, I sat down with Jason Carreira of the OpenSymphony WebWork 2 project to discuss how we could better work together. I was interested in building on XWork, the core of their command pattern implementation, but he suggested building on WebWork 2 directly. As Rich and I worked on the first few versions of Struts Ti, we decided to take Jason’s advice. We thought it was time for a framework to address higher level application needs, and by building on the proven WebWork 2 framework, we could spend our precious spare time where we felt it would make a difference. From then on, Rich and I worked mostly with Patrick Lightbody, also a core WebWork 2 developer, and found ourselves constantly “stealing” each others ideas for our respective code bases.

Around this time, Patrick and Keith Donald of the Spring WebFlow project were kicking around an idea of a web framework to bind them all, Clarity. Clarity brought together Spring WebFlow (Keith), Struts (Ted Husted and myself), WebWork (Patrick and Jason), and Beehive (Rich) to talk about the possibility of combining efforts into one framework. Unfortunately, the devil is in the details as soon as Beehive and WebFlow were unable to make progress on merging their wizard/conversion scope features, and questions about project ownership, brand, and identity soon broke up the party.

Amir Shevat

AddThis Social Bookmark Button

Wouldn’t it be cool to take java’s slogan “write once, run everywhere” and implement it on other things? For example, we can create an Ajax API that decouples the server functionality from its implementation. One would be able to replace the server implementation (lets say from PHP to JAVA) and evaluate performance, stability and scalability variations without changing the web application front-end code itself. Creating such standard API will result in several server-side implementations (hopefully, some of them open source) competing over the web developer community, this competition will mean better products.

We have tested this concept with our latest open source project AJAXDO. Ajaxdo enables runtime loading, saving, deleting, and listing of JavaScript objects stored on a server-side database. Because it has a JavaScript API with multiple server side implementations, using Ajaxdo can reduce server side code and make a Web 2.0 application port easily from one server-side programming language to another. Initially, we’ve implemented the server-side in PHP and have just finished the Java server-side version. It was really nice to see the same front-end application code work with different server side implementation with no code change.

AJAXDO is an example of front-end and server-side decoupling. A full blown standard should include, among other things: security, object passing/storing, some sort of server-side business logic invocation, and even transactions. Now with rise of activity around web 2.0 applications and software-as-a-service concepts it might be a good time to start working on such standards.

What should this front-end and server-side decoupling standard contain?

Steve Anglin

AddThis Social Bookmark Button

On InfoQ.com, an opinion piece has just posted: Use an Eclipse-style governance model for open source Java?

Steve Anglin

AddThis Social Bookmark Button

Java.net: Chet Haase blogs on Java on Vista: Yes, it Works.

Steve Anglin

AddThis Social Bookmark Button

TheServerSide.com is pointing to this SDTimes column by IT expert and author Allen Holub: Just Say No to XML.

Shashank Tiwari

AddThis Social Bookmark Button

An open source project called Restlet is creating what is called a Restlet API as an alternative to the Servlet API to adopt REST (Representational State Transfer) with Java. The belief is that the Servlet API does not have a clear separation of concerns between the transport protocol and the application. The Servlet API is an object-oriented view on top of the Http request/response model. On the other hand, the REST perspective has a resource-oriented view. What this means is that domain concepts are resources which can be referenced with a URI and which can be manipulated by components. The representational state of resources, and not resources themselves, is what is exchanged and connectors provide a means for communication of these representations between components. This also alludes to the redundancy in separation of web components as clients and servers. They could simultaneously be both.

1060 NetKernel is another interesting REST and Java project. It is a REST based microkernel and application server.

Looking at these initiatives, the questions then are:
Is the object-oriented view non-optimal for the web?
Does Java need new definitions for REST?

If you are not already familiar with REST, then read Roy Thomas Fielding’s dissertation at http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm

Tim O

AddThis Social Bookmark Button

Charles Nutter responded to the responses in my last blog entry. Looks like he has answered my primary concern - that he’s being hired into the NetBeans team to work on NetBeans at the expense of JRuby, the first section, clears that up 100%:

CHARLES:Looks like I’m coming into this one a little late…but I’ll bite.

1. JRuby is secondary to NetBeans

Totally false. The principals at Sun…ALL the principals…have made it clear that our full-time responsibility is a solid JRuby 1.0 that can run the big popular Ruby apps (i.e. Rails, which necessitates Rake, IRB, RubyGems, Mongrel, and others). I’ve even gone as far as to say “I’d love to also help out language X” or “I’d also like to devote some cycles to working on C Ruby” and been told that JRuby should be my top priority. Time and time again, Sun folks are telling us and the general public that we’re being hired to work on JRuby first. Trust me, if it weren’t so, I’d tell you. I didn’t leave one fulltime job that took away from JRuby to join another.

more response below the fold…

Robert Cooper

AddThis Social Bookmark Button

Artima today has some discussion about Ethan Nicholas’s mission to reduce the size of the JRE for Applet use.

Let me be frank. I don’t care. Really. Download size is not the thing that keeps people from using Applets instead of Flash.

Just some perspective here:

JRE 1.5.0 Windows offline installation: 16.00 MB
Adobe Acrobat 7.0.8: 27.7 MB
Real Player 10.5: 13.5 MB
.NET 1.1: 23.1 MB

Obviously size is not the limiting factor here for adoption. *Acrobat* is nearly twice the download, but nobody is going “hmmm, maybe we should rethink using PDFs.” The reason I, and I think most, don’t use applets is the user experience is generally bad. The Java plug in is sketchy about working at all — on fully half of my machines, applets simply won’t start up in Firefox at all. It takes way to long to start up, and unlike Flash, you don’t get the option of having a nice wait screen while stuff downloads and spins up. Media support is nil, and lets face it, a lot of the time on the interwebs these days, you want to use some kind of media. Until 1.6, there is still no support for SOAP. Romain’s evangelism to the contrary, it is seriously hard to make a nice looking Java application.

I am not opposed to a general use library manager and a slimmed down set of core libraries that can be grabbed at runtime — how many times has that wheel been invented? Maven, WebStart, etc — but I think it is a bit of delusion to think that solving that problem will in any way affect the penetration Applets see in the RIA space.

Amir Shevat

AddThis Social Bookmark Button

Hosting a website is a cheap matter these days. One could get a fairly good shared hosting package for around 1.5-6$ per month. These hosting packages offer a wide variety of features including support for PHP, PERL on LINUX or ASP (or ASP.NET) on Windows and MySQL DB. The problem is that prices soar when you want JSP/Servlet support.

I think Java should be as affordable as PHP and .NET or else it will loss a lot of private developers to the competitors. Expensive Java hosting is a problem when you want to deploy a privately-held/budget-aware website.

I like Java and wanted my open-source website to be written in Java. At the end I had to settle for PHP (which is cool too).

Why should ASP/PHP enabled hosting cost 1.5-10$ per month and Java enabled hosting cost 12-30$ per month?

Robert Cooper

AddThis Social Bookmark Button

Artima has part 1 of an interview with Tim about the future of NetBeans. Now, I am a NetBeans user. I like it. Really. I still find myself hating every time I hear people talk about NB. The spin is just unbelievable.

Sam Griffith

AddThis Social Bookmark Button

Today while reading on the net I came across this blog posting: Personality_Traits_of_the_Best_Software_Developers and I had to comment.

While I think all those traits mention are good and do tend to yield developers who have attention to detail, control their distractions, etc., it is my opinion they do not necessarily equal the “best” developers! They are however some of the kind you want, but not necessarily the only kind of developer you need!

I have worked with many developers over the years who’ve come up with and coded great solutions to very complex problems, but they were not all detail oriented people. They did have bugs, their code sometimes needed re-factoring, etc. but quite often their ideas and solutions tended to be better than others; more out of the box. That made them “great”. We had plenty of other developers; we’ll call them “BTA - better than average”; all exhibiting the traits you say are “best” but they did not and probably would not have come up with solutions like the “great” developers. For example, the “great” developers tended to be more widely read in software engineering than any other team member, thus contributing a pointer to a solution or algorithm that no one else knew about. The “great” developers contributed things that the traits you mention don’t and can’t account for!

Now before you write me off, lets consider other great people in history that changed things but whom had some issues like: personal lives in shambles or a least distressed in areas, personal appearance was less than ideal (putting it mildly), little savings or planning for the future, not being able get through life without other support systems to cover and deal with what they were not good at! It is generally reported that Thomas Edison, Einstein and Richard Greenblatt all had an issue with personal hygiene and clothing that was constantly disheveled. Einstein was turned down and actively undermined over and over again when trying to get a position teaching in a university, this, even though he had a teaching degree and shortly later was granted his PhD in Physics and along with having written Noble Prize worthy papers. Why? He was considered brash and not accepted into the establishment.

Great People with Issues
1) Einstein
2) Vincent van Gogh
3) Robert Oppenheimer
4) Richard Stallman
5) Pablo Picasso
6) Edward Teller
7) John Draper aka Captain Crunch
8) many a UNIX hacker
9) Nikola Tesla
10) Richard Greenblatt
11) von Neumann
12) Salvador Dali
13) Thomas Edison

Many of these people would be categorized today as ADD, ADHD or mildly mentally ill! But they each helped change the world!

So should we write off people or developers who are disorganized, socially awkward, don’t plan ahead, are sloppy in other parts of there lives, etc? I think if we do it’s our loss! And I think it’s great one at that!

Einstein, Thomas Edison, Von Newmann, Richard Greenblatt and other great UNIX hackers wouldn’t be considered great according to the criteria espoused, but yet they were! The effect of the contributions they’ve made is immeasurable. How would we account for that loss? Could we?

The thing to remember is that many people considered as “great” have let other areas of their lives go to pot whilst they put all they have into what they are doing! Excuse? No, just a fact!

I think the real question is “How do you recognize that greatness and help it along?” Do you do that by allowing those people to focus on the passion(s) they have by experimenting, making mistakes and repeating, and then come back to clean-up, re-factor, re-organize, etc. later? In our world of open-source development and discussions through blogs, forums, etc. we want to be careful not to flame the messenger or inventor. This includes in corporate development departments as well where managers and team leads have to weight these kinds of issues as well.

Most of all, you can’t judge a book by it’s cover! Sometimes you might even find that a person who delivers only 10% of the system might be your most crucial person, because it’s not the amount they deliver but what they deliver! And sometimes that isn’t code at all, but leadership, insulation from political ho-ha, brilliant ideas or maybe just a good pep-talk at the right times. Your “best” team member might be your least recognized… Think about that… and then find someone to view in a different way!

Interesting links:
New Hacker’s Dictionary
A Portrait of J. Random Hacker
Any Wikipedia article about the above mentioned people

Till next time..

Sam Griffith Jr

Hari K. Gottipati

AddThis Social Bookmark Button

NetBeans Program Transformation tool Jackpot is a extendable refactoring/reengineering module developed based on Sun Laboratories research project where James Gosling involved. More than a traditional refactoring tool, its a platform library for easily finding and correcting patterns in Java source code using static analysis. From the project description:

Jackpot is a NetBeans IDE module for modeling, querying and transforming Java source files. Although the Jackpot engine can be used for bug detection or refactoring, the initial focus of this module is to add program transformation capabilities for NetBeans users.

Isn’t it same as Refactoring?
In Jackpot context, Program Transformation is a script or Java class which queries sources in Java projects for patterns and changes them. This sounds a lot like a refactoring, but from project description:

Robert Cooper

AddThis Social Bookmark Button

This story was bubbling around the j.n forums yesterday, and there has been some discussion about what the license for use with the FLOSS Java will be.

While the question of what does the GPL mean if you extends Object.class which may be GPL it seems there is another case to be made here:

What if the core java.* and javax.* classes became LGPL and the runtime became GPL? I think this is an interesting thing to discuss for several reasons:

First, the GPL for the core runtime would in some ways “protect” Sun’s investment in their JRE. Unlike less contagious licenses, it would guarantee that nobody takes the JRE, enhances it and packages it as a product outside of Sun’s domain. If Sun is committed to open source Java, then the re-rolling of external contributions into the runtime won’t affect them in the future. Additionally, the LGPL on the core library means that external optimizations and bug fixes will be available to merge back into the core.

I know the GPL is seen as a “political” license, but it seems to me the best way for Sun to ensure that they don’t see, say, Redmond, lift the JRE code and run with it in a radical new direction is to adopt a contagious license. LGPL of the rt.jar doesn’t affect the state of ISVs and developers who just write Java apps, any more than glibc does people who write Linux apps. The primary question here, however, is how many customers does Sun have that include the core runtime tightly bound into their products on a License from Sun for whom this would be a problem. My guess is there are likely one or two who might take issue with this approach.

Robert Cooper

AddThis Social Bookmark Button

Chris has a minirant in the j.n Editor’s blog today:

But I did remember a while back when Google rolled out Google Maps as a Java ME application, Google Maps Mobile, and I got excited. “Hey! Useful Java ME application! I should go check this out!”

Well, after trying all morning, I can’t say I’ve gotten it to work. The page identified my Motorola V300 and the jar downloaded and installed (albeit with a warning about potentially limited functionality), but it can’t seem to load the terms and conditions, which might mean that it has no network access, which kind of makes the whole exercise pointless.

So, my whole enthusiasm about ME from two paragraphs ago? Back in the “good ideas gone wrong” drawer. Thanks for playing.

He is totally right here, but I think the fault lies not within ourselves, but within our carriers.

If you buy a V300 or RAZR or whatever from any major carrier, it comes crippled. They only want you to use ringtones, wallpaper and –god forbid– applications that they sell you. Lots of phones in the carrier specific versions are crippled beyond belief. I don’t think the fault is J2ME’s so much as the way we use cell phone networks.

I hate to bring the whole political aspect into this, but this is directly on point with the network neutrality debate and the Trusted Computing/Paladium issue: the hardware and the network should be there for what you want to use them for, not some highly managed, highly structured regime. One of the reasons I, personally, consider the NetNeutral intitiative important is I don’t want my Cable Modem service to end up looking like the cell phone networks.

That said, and to respond to the poll, Yes, I have used non-game apps — in fact, I almost never play J2ME games. But since I got my grubbies on the new Savaje phone from JavaOne, I am excited again. Once you have a phone that actually belongs to you, not that is on a “permanent license” from your carrier, the freedom it grants feels amazing.

Steve Anglin

AddThis Social Bookmark Button

In light of some criticism and even attacks (justified or not) that are out there, here are the ten most common misconceptions about Spring from SpringFramework.org.

Robert Cooper

AddThis Social Bookmark Button

Chris ran down the Top 10 RFEs pointing out some silliness there, and there was some discussion on the JavaPosse about the post.

One of the things that came up was adding Ogg V/T support to Java/JMF. I had a similar initial response to this: why bother, really. I am a Linux user myself, and I don’t use Ogg. Don’t get me wrong, it is a fine codec, but its limited adoption outside of the open source world (read: My iPod) makes it inconvenient to use for personal media. Joe didn’t even know what it was. That is how big a splash it has really made.

However, I began thinking back to the conversation on Romain’s blog about Java Media and iondb. Now, because Nathan has been an active part of the ROME community in the development of the iondb code, I have seen this project go through many… not quite ready for prime time releases now. They have done a great job at abstracting players for Linux, and adding Ogg support wouldn’t really change the nature of their project. However, when discussing what “media support” in Java actually means, he made this comment:

So, what is necessary then for Java to be able to truly “do media”? Something like Flash’s support for MP3 and its own proprietary Flash Video format? Does the format/codec/engine have to be pure Java code or just part of the platform?

As much as I love the idea, I don’t think platform-wide support for OGG Vorbis/Theora is the answer, unless Sun is willing to make a big investment in media tools for developers. I’ve also not been too impressed with pure Java Theora decoding, even with small files. Built-in MP3 and MPEG-4 support would be welcome. IBM has a nice MPEG-4 codec that supports JMF.

Perhaps partnering with DIVX is a possible solution, since they could offer up developer support, desktop and server tools, much in the same way ON2 does for Flash with their Flix product line.

Now, while I certainly like DivX too, I think there is something to be said for Flash/Flix/FLV. The thing is, Ogg V/T would be perfectly suitable as a “This is Java video” analogue to Flash video. While this doesn’t even begin to address Chris’s issues with JMF from an editing/production standpoint, it would at least offer some of that missing functionality in Java and provide an alternative to QT4J for the handful of consumer products in Java on the market.

Chris Adamson

AddThis Social Bookmark Button

Dolphin is coming… do you think they’ll listen to us? From the looks of the most popular RFE’s, I’m kind of hoping they don’t.

Steve Anglin

AddThis Social Bookmark Button

What do you think of this on Windows DevCenter: The Beginning of the End for Java Starts(Date.Time.NOW());?

Robert Cooper

AddThis Social Bookmark Button

IBM has a big article up today about working with Microformats. I know this is one of those “buzz heavy” items on the interwebs 2.0 these says. Ray Ozzie gives it a lot of play with the new Live Clipboard stuff coming out of MS — which I admit is a hella cool idea. Pat thinks they are really cool, and Calvin has grown Tails into a whole big deal now.

The problem is, however, they are stupid. They are a hack to get around a problem that is going away VERY shortly.

Hari K. Gottipati

AddThis Social Bookmark Button

Genuitec, the creator of MyEclipse integrates Matisse(well-known WYSIWYG Swing user-interface designer of NetBeans) functionality into MyEclipse Enterprise Workbench to enable the easy creation of Java rich client applications within the MyEclipse environment. Built on top of the Eclipse software development kit, MyEclipse 5.0 will have the Matisse4MyEclipse, an interface builder based on the NetBeans Matisse technology.

Its good to see the best-of-breed components under one roof. Whenever I switch my Java IDE, I tend to compare the IDE with other IDEs and I always feel that its missing some of the features. May be not any more, as MyEclipse proves the integration of the different components/features together in one IDE, I am sure soon we will see the IDE which is made out of the best components from different IDEs.

Apart from NetBeans Matisse, do you think any other best components that should be under one roof? I would like to see the IntelliJ IDEA’s refactoring tool in Eclipse or NetBeans? Unfortunately IntelliJ IDEA is not a open source product to integrate with Eclipse/NetBeans, but IntelliJ can integrate the best components from Eclipse/NetBeans into their product. Being a commercial company I don’t think they will integrate the open source components into their product. Don’t you think so?

Steve Anglin

AddThis Social Bookmark Button

Internetnews.com asks: Is Java EE’s Complexity Its Worst Enemy? And given other, perhaps more, lightweight alternatives like Spring and Ruby on Rails, what do you think?

Steve Anglin

AddThis Social Bookmark Button

InfoQ.com reports: JRuby 0.9 Released; Runs WEBrick, Rails, RubyGems, and Rake.

Steve Anglin

AddThis Social Bookmark Button

From JavaWorld.com, I saw this “Sun says open-source Java possible in ‘months’: Logistics such as maintaining compatibility still being worked out.”

Steve Anglin

AddThis Social Bookmark Button

This is a recap of sessions attended at JBoss World 2006, held recently:

Tim O

AddThis Social Bookmark Button

Not excited about any Java web application framework these days? Join the club. The reality few want to acknowledge is that many “enterprises” are running along with Struts 1.x applications and they haven’t really started to contemplate what comes next. Or, they’ve thought about what comes next, and the answer hasn’t revealed itself yet. JavaOne might have had the highest attendence on record, but the community is fractured and the energy is unfocused. The answer to “what web framework should we use” is far from clear. Read on, if you are interested in exploring this confusion…

Steve Anglin

AddThis Social Bookmark Button

This is a conference report of JBoss World 2006, held in Las Vegas, NV. This one focuses on the news highlights from the show. More coverage next week.

Paul Browne

AddThis Social Bookmark Button

Most systems until now have been centralised : A bit like the old Soviet Union, everything is centrally planned. The trouble is real-life isn’t like that - it’s a market economy with no central control. There’s a story about a Russian Diplomat posted to New York in the 60’s. On a visit to a bakery he asked - who decides how many loaves are baked in the city? The answer is no-one - each baker individually decides how many to bake based on how many he sold the day before. Somehow (almost) everybody gets fed.

Current OO systems are like the Russian’s view: everything is centrally controlled. Agents are more like New-York (or Dublin) city today - a place full of people (agents) acting in their own self interest. Somehow everything works ok. Economists have a theory that backs this up ; in general a set of people acting in their own self interest gives the best solution at a global level. Or, if you prefer it’s a bit like Ants. Individual Ants are stupid, but together they are clever enough to mark a trail to food and carry it back to the Anthill. It’s called Emergent Behaviour - simple programs combining to give the answers to complex problems.

How does Web 2.0 give a push to Agents? Before, Systems were standalone , and everything planned in advance. With Web 2.0 everything is connected and too complex to manage by one person. We need to look at what works successfully in real life. Just as Market economies overcame the ‘Command and control’ of communism, so Agents will overcome the Command and control of Objects. It may not be perfect, but it will be (slightly) better.

Will agents replace Java and .Net ? A sign that ‘the future is already here’ is that when you read the list ‘what makes an agent’ , you may go ‘but we’re doing that now’. Java and .Net have been around for so long now that it’s easy to forget the Object Orientated Programming (OOP) was once a radical new departure. It’s also easy to forget that languages such as C++, Visual Basic 6 and Powerbuilder were once ‘king of the hill’ and commanded respect from your colleagues when you mentioned your latest project was using them.

So what are agents? Compared to Objects :

  • Agents act in their own self interest , they may decline a request if they think it makes them better off.Objects always respond to a request.
  • Agents have their own thread of control , 1 for each agent. Objects may have their own thread, but most objects don’t. - Agents are pro-active, and seek to improve their lot , according to pre-defined goals.
  • Agents are ‘Coarse Grained’ that is, a system will probably have a few agents will a lot of normal , dependent , objects. It’s similar to the way Enterprise Java Beans are used : not everything is an EJB , and there a still lots of Plain Old java Objects.
  • Objects are designed from the start to work together. Agents can be written by different people , perhaps with widely different goals in mind.

Just like C++ was a procedural language with object orientated ‘bits’ attached, Agents are currently implmented in languages like Java , with agent-y bits attached. Probably the most useful set of bits is Cougaar. Cougaar is an open source project with a live community at Cougaarforge and an Eclipse based IDE. Cougaar gives you the basic infrastructure for creating and managing agents.

Of course , there’s nothing to stop you building your own agents. According to the above definition, most systems that have workflow tieing together entities making decisions according to their own business rules are not far off being agents. Especially when they have a scheduler (i.e. their own ‘thread of control’).

What do you think? Leave a comment below.

Paul also blogs on ‘Technology in Plain English’

Chris Adamson

AddThis Social Bookmark Button

In an xml.com blog, Rick Jelliffe argues that the sorry state of desktop Java should prompt Sun to open-source Swing

Dejan Bosanac

AddThis Social Bookmark Button

It is common to use final static fields to define constants in your Java applications. For example, you will often find the code similar to this in various Java APIs

public class Example {
  public static int one = 1;
}

which is used in the following manner

System.out.println(Example.one);

Of course, Java supports more complex initialization of static properties through static initializer blocks. One of the most common usages for these blocks is initialization of static collections with known values.

Take a look at the following code for example:

public class Example {
       public final static HashMap constants = new HashMap();
       static {
		constants.put("1", "First");
		constants.put("2", "Second");
		constants.put("3", "Third");
	}
}

and the usage of such static collection:

System.out.println(Example.constants.get("1"));

Wouldn’t you prefer to have more “native” support in Java for dealing with collections? For example, with the syntax that is found in most “dynamic” languages today, the previous example could be replaced with something like this:

public final static HashMap constants = new HashMap() {
      "1" : "First",
      "2" : "Second",
      "3" : "Third"
    }

Collections are one of the crucial aspects of programming languages and would it be normal to see them embedded in the language syntax? Would this “dynamic” syntax, used in Ruby, Groovy and other dynamic languages, make Java applications easier to write (and read)?

Do you have other syntax enchacements that you would like to see in the following editions of Java?

Steve Anglin

AddThis Social Bookmark Button

In response to Neil Chaudhuri on TheServerSide.com: “I would love to hear your thoughts on this topic. How can I convince my management not to abandon Java?” Well, here are my thoughts.

Robert Cooper

AddThis Social Bookmark Button

Tim says:

O’Reilly also values its trademarks — as do other companies and individuals aligned with the values of openness and sharing. (I’ll note that Linux is a trademark of Linus Torvalds, that Apache is a trademark of the Apache Software Foundation, Mozilla and Firefox are trademarks of the Mozilla Foundation, Wikipedia is a trademark of the Wikimedia Foundation, and so on.

and

I don’t believe that the arguments about prior use of the term, or about “genericization” have a legal — or even a moral — basis. No one was using the term “Web 2.0″ with its current meaning before we launched the Web 2.0 conference in October 2004, and the subsequent widespread use of the term Web 2.0 to describe the phenomenon itself is outside the scope of the trademark.

I feed compelled to point out, that in the US Microsoft’s use of the word “Windows” failed to stand up to the “Generic use” in the 9th Circuit court. He would be hard pressed to convince me that “Web 2.0″ or for that matter “Water 2.0″ or “Human 6.1″ could hold much more sway than Windows. I am no lawyer, but I think that it is safe to say that “Web” for the “World Wide Web” and the standard software version number are definitely MORE generic than the use of Windows to describe GUI elements, and even the latter couldn’t stand up in court when Lindows came around. I also think, out of the examples provided, only Apache really represents a generic word. Indeed, if they had stuck with Apatchy they would have a very clear cut case, but I highly doubt they would find it easy to get a court to uphold their exclusive use of the term for much at all, if anything.

For the sake of getting the lawyers off our backs, though, I would like to offer up “W3 2.0″ or “W3 R2″ as Creative Commons Attribution 2.0 licensed terms. :)

Steve Anglin

AddThis Social Bookmark Button

The SpringOne 2006 conference is soon, from June 15 to June 16 at the Metropolis in Antwerp, Belgium.

Amir Shevat

AddThis Social Bookmark Button

One of the big things presented in JavaOne was .NET-Java interoperability. The notion of language interoperability can be understood and implemented in several different ways.

Dejan Bosanac

AddThis Social Bookmark Button

There is an interesting Ajax-related proposal in Apache incubator, named XAP (eXtensible Ajax Platform). It is a project donated by Nexaweb Technologies Inc and represents XML-based declarative framework for building rich internet applications based on Ajax. You can find more information about this project on Nexaweb site

In the proposal there is the following paragraph:

Although these toolkits ease development of Ajax-powered web applications, there are still significant development and maintenance challenges, mainly associated with writing, debugging and maintaining JavaScript code. In particular, some developers would prefer not to use JavaScript.

I’m not sure whether XML is easier to debug and maintain than JavaScript and also whether any XML-declarative framework can have the same flexibility for writing GUIs as scripting language? Also, why we need another XML dialect when there is XUL which is mature and proven in practice. Do you think that JavaScript is the weak point of Ajax and how would you overcome it?

Paul Browne

AddThis Social Bookmark Button

As an Irish O’Reilly Blogger , I have mixed feelings around the controversy on the Web 2.0 name. The original story is here, about a Web 2.0 conference organised by friends of mine in Cork , Ireland.

The O’Reilly response is here. What is remarkable is the polarisation of opinion between the ‘O’Reilly is a big bad corporation’ and ‘O’Reilly is ok guy , just an honest mistake’.

My view probably leans towards the latter - while I’m no fan of lawyers, the fact that I’m here on the O’Reilly site, blogging about the controversy means that O’Reilly is still far from your average faceless corporate monolith.

Update (1): Latest from Cork here.

More on Technology in Plain English

Steve Anglin

AddThis Social Bookmark Button

Despite the news that Red Hat has acquired JBoss, the annual JBoss World conference will still be held from June 12 - 15 at the Rio Hotel and Casino, in Las Vegas NV.

This will be my first time attending JBoss World, and am looking forward to it. There’s so much to take-in. If you are planning to attend or want to know some of what JBoss World will be offering, check out the agenda of sessions and keynotes page.

JBoss is one of the leading companies out there that has revolutionized professional open source, in my opinion. Anyway, I hope to see you there.

Robert Cooper

AddThis Social Bookmark Button

Thoughts on Thursday’s JavaOne events…

Jim Farley

AddThis Social Bookmark Button

Is Eclipse relearning the painful lessons of the past?

Norbert Ehreke

AddThis Social Bookmark Button

Looking at JSR 296 I have the impression that it should focus on data-centric applications and that the target audience should be the newcomer rather than the programming expert.

JSR 296 is a specification request for a Java framework supporting rich client development with Swing. It is discussed, for instance, here and here.

If it’s possible to really simplify development with Swing, e.g having developers not worry about all those threading issues, hiding the complexity of MVC programming (at least for beginners), more people would be attracted to Java.

Let them easily access databases, provide decent data binding & validation, provide forms communication support, provide application state handling, provide launching support, action management support (menus, toolbars and popups). Personally, I’d like to assume that the data, which is manipulated by and large, are Java Beans and collections thereof. Therefore a set of enhanced, easy-to-use JLists, JTables and JTrees should be part of the reference implementation. Oh, and let’s not forget to make it pretty by default. (Some of the points I made have been already mentioned in the discussions I referred to above.)

Paul Browne

AddThis Social Bookmark Button

For those of you living outside of the Emerald Isle, Enterprise Ireland is one of the reasons why Ireland is the biggest exporter of software in the world. OK , you can argue with that last statistic , but when these guys organise a Web 2 conference , you can be sure that the mainstream is beginning to recognise Web 2.0 as going to be big , very big.

Having said that , my view is Web 2.0 is almost , but not quite , going mainstream (in Ireland at least). Judging by the people I met and the dress standards I would judge the audience as 1/3rd Business-VC (suit and tie) 1/3rd Techie (Jeans and T-Shirt) and 1/3rd Professional Technologist (Suit but no tie). This contrasts with the last Web 2.0 event , where the audience was almost exclusively techie, despite dual business and technology marketing.
(Photo of Marc Canter Speaking , by Dermod).

You can judge for yourself from the agenda at the Web2Ireland site, and see if Enterprise Ireland got the balance of speakers right. Aside from Marc Canter (who managed to successfuly quote Joyce in a techie presentation!) the main speakers - Judy Gibbons from Accel and Jeff Clavier (Software Only) - were either VC or Angel investors. That’s not to say that they didn’t have a lot of good, interesting and relevant things to say, it just meant that you had to bear in mind their angle on things (we want to lend you money). Given the success of all the people speaking, I think they are well worth listening to. Adam Green , who despite being on a blogging break, hosted a very good lunchtime session (summary: ‘everything is XML’).

Want to know more about the Web 2 Ireland event? - further information here.

Norbert Ehreke

AddThis Social Bookmark Button

On the last two projects I have worked on, some people have attributed my contributions with “too complex”, “too difficult” and “not straightforward”. Since then I have been trying to determine whether or not that is true and how to tell the difference. After reading Kurt Cagles Thoughts on Complexity I did some researching and found that commonly people think about complexity and how to manage it best. However, if simplicity is the conceptual inverse of complexity, shouldn’t we be concerned about designing simple solutions rather than managing complexity? The problem is, as Kurt pointed out, someone has to pay the price, since it is impossible to eliminate complexity — it is just moved within the system. Hence, abstraction is often the most popular way of hiding complexity.

In many cases that’s fine. Design Patterns provide us with many powerful ways to overcome complex solutions, however they also require a necessary level of understanding that is needed to really grasp what is going on. How many managers consider an implementation of Design Patterns simple?

So, I came up with the following list of criteria for simple solutions.

  • Comprehensibility
  • Ease of implementation
  • Extensibility
  • Usability
  • Maintainability
  • Transparency
Tim O

AddThis Social Bookmark Button

House Subcommittee hearing on Network Neutrality on C-SPAN 3. I’m listening to it in the background. Really important subject for everybody who uses the Internet, some great comments by Amazon’s Misener and Comptel’s Earl Comstock. The Internet is a part of the fabric of our society, if Congress messes around with network neutrality, I think we can kiss the Internet as we know it goodbye. Timothy Wu, Columbia Law Professor, makes the point that the Internet is an almost perfect free market, someone talented with a good blog can get more readers than the New York Times tomorrow, someone with a great idea and a website can become a huge jobs creator and billion dollar company.

If you don’t have time now, I’ll post the archive link when it becomes available.

UPDATE: Walter McCormick, U.S. Telecom Association, President & CEO, makes an absolutely misplaced analogy between network neutrality and featured vendors on Amazon.com. At first, McCormick’s comments sound harmless: “We will not block, impair, or degrade content or services.” “The functionality you have today you will have tomorrow.” …..but, he goes on to mention that carriers should be allowed to differentiate service in the same way a website like Amazon.com features selected vendors. Big difference, carriers are infrastructure, Amazon.com and Google are services.

UPDATE: Points to Zoe Lofgren (D-CA) she’s a representative well informed about the internet - refers to Google founders by first name. Her questions point to the fact that some carriers have threatened to build a separate “controlled” network. Timothy Wu, responds, “this neutral internet has been good for everybody”

UPDATE: Rep. Sheila Jackson Lee (D-TX) frames the question by making an analogy to a “private road”. McCormick then takes this analogy and makes another wild (mis)statement about the Internet as a single-lane public road. Here’s his line of reasoning: “The Internet is like a single lane road. If someone wants to expand capacity of that single lane highway, if they want to ship goods with a numer of large 18-wheelers, who should pay for the expansion of the road? McCormick thinks that Amazon.com should pay for the privilege of shipping those goods with “18-wheelers”?” It sounds crazy, because it is crazy. Amazon.com isn’t shipping traffic to me, I am specifically asking them to send me packets. Word games.

UPDATE: Comstock talks of Verizon’s FIOS home service. The line they install in your house has a capacity of 1 GB/s (his words), they reserve the bulk of that capacity for cable TV service and reserve a tiny fraction of that service for your “broadband”. Timothy Wu talks about the nightmare scenario for cable companies, where the bandwidth of these lines is free and the consumer can by video content directly from a provider over the internet at as high a quality as a cable service.

UPDATE: McCormick again brings up Google sponsored links as some sort of preferential treatment. It looks like McCormick is trying to justify tiered discriminatory sservice by pointing to content providers. Timothy Wu responds, the carriers are moving to a discriminatory approach/tiered services, this might be marginally more profitable, but “the neutral internet has floated all boats”. Timothy Wu: Google runs a neutral search, they have advertisements which Mccormick calls a “priority lane”. Wu says that McCormick is trying to confuse the issue, search engine market is incredibly competitive. Wu thinks McCormick is trying to confuse the issue, possibly captializing on Google’s recent China publicity. Wu suggests that even discussing this is a waste of the committee’s time.

UPDATE: Paul Misener of Amazon, foreign carriers specifically DT, already on the record saying that they will try to extract fees for access from Google, EBay, Amazon.

UPDATE: Timothy Wu: if we move toward a discriminatory network, the products consumers prefer may not be the applications that work as well on the network this is the short-term threat. Long-term threat, when competition becomes a question of who has the best connection with the gatekeepers you will no longer have the level of innovation we currently have. Mentions innovation like A9, new innovations to the internet space. That’s the trade off of allowing carriers to discriminate

UPDATE: Because this issue is under the jurisdiction of the FCC, these questions are usually viewed as geeky distractions or as a fight at a “star trek” convention. Issues like this are national macroeconomic issues, not just technology.

Adjourned. Sorry for the non-Java distraction, this issue affects every technologist no matter what language they use.

Steve Anglin

AddThis Social Bookmark Button

Here’s a very interesting eWeek.com article covering the keynote panel from last month’s TheServerSide Java Symposium in Las Vegas, NV consisting of luminaries such as Rod Johnson, Bruce Tate, Floyd Marinescu, and more as they discussed the future of Java, the role scripting/dynamic languages may play, Spring, EJB 3/Java Persistence API, open source innovations vs. standards, and more.

There’s clearly pressure being put on the Java community. But of late, it’s not primarily from Microsoft and .NET. Instead, it’s from Ruby on Rails and to some extent PHP, both attacking Java’s “underbelly”: The Web-tier.

The Java Web-tier is seemingly weak as many even in Java have turned to Ruby on Rails for a simpler solution than what Struts and other Java Web Frameworks apparently offer. And the evolution of Java-based scripting/dynamic languages such as Groovy and JRuby have been slow in coming. Long-term, Rod predicts that Java Web Frameworks will be dead in 3-5 years (also mentioned in this keynote panel, but missing in this article). He probably believes that these could be replaced by Ruby on Rails, but also JRuby (with Rails integration) and other Java-based scripting/framework solutions for the Web-tier such as Groovy, BeanShell, Rhino, Jython, etc.

If Java is to indeed endure, it must continue to evolve, especially in its weakest or perceived weakest area, the Web-tier. And the evolution of Java-based dynamic/scripting languages and accompanying frameworks appears to be key. We’ll see what happens. The Spring Framework, for example, is already making inroads to support and integrate future Java-based scripting solutions. Etc.

Tim O

AddThis Social Bookmark Button

I’m perplexed by Ellison’s FT interview re: open source. I only half believe him when he says that Red Hat doesn’t own anything. Ellison is trying to cast a shadow on the Red Hat deal from two weeks ago, and, to me, it speaks volumes that he’s so prepared to answer questions about the JBoss deal. Here’s an illuminating (and perplexing) quote:

“… Why didn’t we buy JBoss? Because we don’t have to - if it ever got good enough we’d just take the intellectual property - just like Apache - embed it in our fusion middleware suite, and we’re done. We always have that option available to us - IBM always has that option available to them.”

Nonsense. Not buying JBoss was a mistake. Red Hat now owns the JBoss brand, owns a lucrative services operation, and employs a set of very talented and loyal developers. Ignoring the licensing differences for the moment, you won’t just embed JBoss “and we’re done”…”just like Apache”, in fact, i’m pretty sure you are going to be cursing the fact that you didn’t pay that premium you so swiftly dismiss in your interview. You see, once you are forced to “take the intellectual property” (which you can’t anyway), your customers are going to start to wondering why they are paying Oracle so much for your “fusion middleware suite” when they could just get an fully integrated solution from Red Hat. And, if Red Hat were to purchase MySQL AB, you’d have a single corporation providing a fully integrated open-source solution for both LAMP and Enterprise Java. Ellison - two big ships on the horizon Red Hat and MySQL (which is growing up faster than you can say “solid enterprise class database”). Sleepycat and InnoDB acquisitions notwithstanding, this is still an interesting game of chess.

This interview puts Ellison’s strategy on the table: he’s making the argument that companies like Red Hat don’t “own anything” and that open source isn’t “good enough” yet. Plus, there’s been some nefarious speculation about Red Hat being the next SCO courtesy of a perfectly timed opinion piece at Eweek masquerading as “news”. Oracle passed on the JBoss deal, and now they want us to think that there are “IP ownership” issues with JBoss code. Don’t believe the hype.

Tim O

AddThis Social Bookmark Button

You can buy software, but you can’t buy “community”.

When IBM bought Gluecode, they didn’t buy Geronimo. It is a common misperception to think that IBM bought Geronimo, the application server, and that the Geronimo project is now synonymous with IBM. To the contrary, because of the Apache license, no one will ever be able to “buy” the Geronimo code. If anything, the IBM purchase of Gluecode was an investment in an open community, and an open commercial eco-system that continues to expand. Red Hat’s purchase of JBoss is a completely different story. Why? The supposedly “free” GPL, actually encourages consolidation of corporate influence over a codebase. By purchasing JBoss, Red Hat has effectively become the original copyright owner of a codebase licensed under a reciprocal license. Because of this license, Red Hat can, indeed, “buy” the JBoss project’s source code and community all in one perfect corporate transaction. While I’m happy for the few JBoss employees I know, I’m not exactly celebrating the consolidation of corporate power over open source software…read on…

Steve Anglin

AddThis Social Bookmark Button

Here is my coverage of TheServerSide Java Symposium, held in Las Vegas, NV from Mar 23 thru Mar 25:

Thu Mar 23 Sessions Attended

Advanced Testing Techniques with TestNG: TestNG is a recent open source lightweight testing framework built on annotations that offers advanced testing functionalities such as test groups, method parameters, dependent methods and time-outs. This presentation offered a short introduction to TestNG as well as examined some testing scenarios typically encountered by programmers in various software areas and how TestNG does seemingly help create elegant and simple testing designs and serves as a viable testing alternative to unit testing.

RAD That Ain’t Bad: Domain Driven Development with Trails: The open source lightweight Trails framework aims to take a new approach to Rapid Application Development in Java using proven frameworks like Spring, Tapestry, and Hibernate. By eliminating redundant steps in the development process and stressing convention over configuration, Trails can greatly accelerate development of RDBMS persistent web applications. In this session, the speaker gave a real Trails application in a few minutes, and then dived into the details of how Trails works. While Trails seems quite powerful, it’s still nascent as it relies only on heavy integration and use of Tapestry along with Spring. You can’t use other Web frameworks like Spring MVC, Struts, etc. If you’re already using Spring, I think Trails becomes superfluous, imo. While configuration with Spring may take longer initially, it should be smooth sailing with Spring, which also caters naturally to Domain Driven Development anyway. Trails currently is an extra layer, but long-term may be different. We’ll see. Trails is an open source project on Java.net.

Spring Update: What’s New and Cool in Spring 2: Spring 2 is a major release that makes the open source lightweight Spring Framework both more powerful and easier to use. In this presentation, Rod Johnson surveyed the new features of Spring 2, before focusing on two of the most important: the introduction of extensible XML configuration, and significant enhancements to Spring AOP. Spring 2 allows Spring configuration to be enhanced with custom XML tags, which can provide valuable abstraction for repeated or complex configuration tasks. Rod showed how to define new tags, and how this capability would benefit all Spring users. Spring 2 makes Spring AOP both simpler and far more powerful, and marks a major milestone for AOP in general. In conjunction with AspectJ 5, Spring 2 provides a complete roadmap for AOP usage, from dynamic proxies up to full use of AspectJ weaving, using the same programming model. It becomes possible to use the powerful AspectJ pointcut expression language in Spring AOP, as in AspectJ. Spring AOP can even run AspectJ annotation-style aspects within its proxy based runtime, with the same low cost of adoption as Spring AOP. For more, visit SpringFramework.org.

Fri Mar 24 Sessions Attended

Introduction to JBoss Seam: JBoss’ Gavin King talks about EJB 3 and JSF as they are perhaps the most exciting new developments in the Java EE 5 platform. Seam is an innovative new open source lightweight enterprise Java EE 5 application framework that integrates the EJB 3.0 component model with JSF as a presentation tier. Seam builds upon the standard extension points provided by both specifications and provides a set of Java Annotations that extends the standard annotations defined by the EJB specification. In addition, Seam introduces several innovative new ideas: managed conversations, declarative and contextual application state management, bijection - a generalization of the notion of inversion of control and integrated business process management. As King illustrated, JBoss Seam seemingly tackles all these problems, and provides a uniform model for stateful components in Java EE 5. For more, check out JBoss.org.

Apache Geronimo Prime-time: the open source, and now becoming lightweight, Apache Geronimo is the latest open source application server to achieve J2EE 1.4 certification, making it ready for prime time in the Enterprise. It is now a real contender in the open source application server market and offers a unique architecture making different open-source projects pluggable and capable of building customized stacks. This session by author Jeff Genender presented an overview of Apache Geronimo, its architecture, its major open source components, how it works, and how to configure and use the application server. This covered Geronimo’s different concepts such as the kernel, GBeans, deployment and different configurations, and running the application server. Apache Geronimo 2 is also in the early works, which will allow Java EE 5 deployment once Geronimo is Java EE 5 certified. Lastly, Apache Geronimo is IoC compliant, and can currently deploy Spring-based developed applications. For more, go to the Geronimo.Apache.org site.

Sat Mar 25 Keynote and Sessions Attended

Keynote Panel: Enterprise Java Trends with Rod Johnson, Bruce Tate, Floyd Marinescu, and more…

“The Web-tier is broken… In 3 years, (Java-based) Web frameworks will be obsolete.” — Rod Johnson
“Java is in trouble on the low end.” — Bruce Tate

These quotes were an admission that Java is not best for all things. It’s best for the core domain model, but in terms of the Web-tier, Java just does not offer enough of a lightweight solution or flexibility as PHP and Ruby (on Rails) offers, currently. That’s why we are starting to see Spring lead the way with integration offerings to Java-based scripting languages. The need for Java-based scripting is clearly growing in demand according to the keynote panel. Rod represented the moderate view. Bruce Tate tood the more extreme view that Java is just not right at all now and that’s why Java developers should move to Ruby on Rails. And Floyd Marinescu represented the other side and most likely the JBoss view that Java isn’t broken in the Web-tier as much as Rod and Bruce may make of it.

And the sessions started up again with Persistence with iBATIS - Hands On: In this session, iBATIS lead Clinton Begin actually used only a Java IDE and real-world examples to demonstrate how iBATIS is used to create an effective persistence layer for your application. There were no code snippets here, the persistence layer was seemingly coded and tested from scratch. Seemingly, iBATIS is easy to learn and use. It’s one to watch, but Hibernate is still the leading adopted persistence framework, followed by the big potential that the Java Persistence API (JPA) in EJB 3 offers. However, Spring does use and integrate iBATIS along with Hibernate.

Building Quality Applications with Ajax Frameworks: According to Dion Almaer and Justin Gehtland, Ajax techniques can lend tremendous richness to your Web UIs. But Ajax can be tedious and difficult to implement from scratch. Fortunately, there are a number of powerful frameworks that can make it much easier to do Ajax, including some that integrate with Java-based Web frameworks. This session demonstrated (through live coding): The popular Prototype, Dojo, MochiKit, DWR and Scriptaculous Ajax frameworks, each of which offers unique abilities to enhance your applications. These frameworks can be used with any server-side framework and their use with Struts and JavaServer Faces applications. This talk also discussed the state of Ajax support for JavaServer Faces via third-party JSF components and JSF-specific frameworks. Lastly, they showed how to easily add amazing Ajax effects to Java-based Web application.

Java Persistence API: One of the key results of the work on EJB 3.0 has been the introduction of a new, standard API for Java persistence and object/relational mapping. This work initially began as part of the EJB 3.0 and, in response to the urging of the Java community, has been expanded to include use in Java SE environments (”outside the Java EE container”). The talk covered key aspects of the Java Persistence API, including use of the EntityManager API, persistence units and persistence contexts, object/relational mapping using Java metadata annotations, extensions to EJB QL, and use of Java Persistence in Java SE environments. Also, from the show in general, we learned that an open source JPA effort, OpenJPA, is perhaps being accepted as a proposal into the Apache Software Foundation, and will go into the Apache incubator. IBM, Spring, BEA and others are apparently planning on backing this open source effort.

And I ended the show by perusing XQuery for Java Geeks by Jason Hunter and Bruce Tate’s Beyond Java session, which focused more or less on Ruby on Rails. All in all, it was a good show. If you missed it, you have another chance as TSS Java Symposium goes overseas to Barcelona, Spain. For more, visit TheServerSide.com and/or TechTarget.com.

Tim O

AddThis Social Bookmark Button

Most programmers develop in cycles. Code, Compile, Test, Repeat. Depending on your process, you might add stages like Test, Code, Compile, Document, Deploy, Verify, Commit, but, as a rule of thumb, the programs of highest quality are usually those that are not a chore to develop. The ability to execute code immediately creates an efficient feedback mechanism that increases quality. If your cycle is quick, you’ll be able to debug and correct bugs faster than if you are constantly having to wait minutes to see if your current set of changes works. A long development cycle is similar to the experience one has trying to use a command line editor over a 300 baud modem - the time lag between typing and reading what you’ve typed causes speed and quality issues.

Ruby, Perl, Python…scripting languages are technologies with very quick development cycles. In a scripting language, you can make a change to your code and run it immediately. Compiled languages such as C, C#, and Java have slightly slower development cycles because they require compilation, but if you make the right choices you can attain a quick development cycle in Java. For example, the Sysdeo Tomcat plugin uses a custom classloader that allows you to modify your servlet code on the fly without having to restart your servlet container, and there are various approaches to speeding up Java development cycles using swappable ClassLoaders and the like. But, don’t let anyone tell you that a speedy development cycle is impossible with Java, it is possible, but usually not the norm.

There are times when one bad product selection or one misconfigured framework can ruin everything by introducing a huge span of dead time into your development cycle. Read more for a discussion of Development Cycle “Dead Time”, and how it can affect your approach to development.

Robert Cooper

AddThis Social Bookmark Button

I kind of want to do something different today. When I write I tend to write, in cliche blog form, in two modes: “Hey, look at this!” or “I’m going to be snarky and rant about this!” Today, I would kind of like to have a narrow conversation.

The advent of the invokedynamic JSR, as well as the continuing RoR vs whatever hype and framework proliferation in Java has brought a question to the forefront: where is Java going? I have some ideas that I would like to express. This isn’t necessarily a highly structured treatise, but more of a braindump.

However, I would like to hear what other people would like to see. I don’t mean this as an exploration of other programming models or an academic conversation in language design. Rather I would like people to look at (a) what tools are they using all the time that should just be there, and (b) what would really make your day to day life better, both of these taken in terms of the JSE — lets leave the web framework wars out of this for a little while.

Bill Siggelkow

AddThis Social Bookmark Button

I love programming. But I have reached the point in my life where the demands on my time, from my day job as a team lead to my night job as a team Dad, reduce my discretionary programming time to little snippets that I can seem to just grasp for 5 or 10 minutes here or there.

I have always loved research, too. And I have recently spent some quality time with two software tools that I enjoy — Maven2 and StatCVS.

If you like what Ant can do, than Maven can take you to another level. Granted is not without its own set of challenges, but I have come to believe that its benefits outweigh the costs. With Maven I frequently find myself saying “Wow! I didn’t know it could do that!”.

Tim O

AddThis Social Bookmark Button

The Word of the Day today from Dictionary.com is “Contradistinction”. It means “Distinction by contrast”. Sample sentence: “Maven provides a comprehensive approach to software projects. It provides a declarative model that decouples build logic from a specific project. Maven encourages universal reuse of build logic across all projects — in contradistinction to Ant, which tends to be used as toolbox for scripting builds.

Tim O

AddThis Social Bookmark Button

Related link: http://www.alistapart.com/articles/web3point0

Zeldman wants us to believe that the ever nebulous Web 2.0 is a bubble defined only by AJAX and Ruby on Rails. His argument rests on whim and an encounter with some loud suit who attended Web 2.0. To Zeldman, one pontificating audience member at a Google debate in New York is enough to prove that Web 2.0 is nothing more than a puff of fad to be disposed with. The sentiment is common.

Needless to say, I disagree with most of his ideas. To say that Web 2.0 is defined by any one technology is to miss the point entirely. Web 2.0 isn’t about LAMP or even open source. It is a general approach to interaction, application design, ideas of community and participation; such ideas can be implemented on any platform be it Java, Ruby of Rails, or .NET. I also get the sense that the media’s mistranslation of words like “blogger” are an affront to his superior technical sensibilities. After reading this piece, you get the sense that “Web 2.0″ is like an underground punk band gone from small, bohemian stages to solid gold, and “the uninformed” are ruining everything just like they did with “Web 1.0″.

What? too hip for “Web 2.0″?

Are you too hip for “Web 2.0″?

Tim O

AddThis Social Bookmark Button

Related link: http://www.medicare.gov/

Maybe you sat down to help grandma sign up for the new Medicare Prescription Drug plan this year? If you and gramps ended up staring at a HTTP 500 response code, you weren’t alone. The Medicare website, a mishmash of Microsoft ASP and ASP.NET pages, has been overwhelmed by activity, and, from most reports, is suffering from frequent outages. Read on…

Stories? Please share.

Tim O

AddThis Social Bookmark Button

Related link: http://del.icio.us

If you haven’t heard, del.icio.us has been toast for multiple days. Looks likes a confluence of events (and this is a guess based on the blog post): power failure caused RAID to corrupt some files, that corrupted data happened to be a replicated master database, and the slave databases faithfully copied said corruption. Can’t fault them for that, but I’m sure they will mark it up as a lesson learned. When you are using RAID, make sure to invest in redundant power supplies and have sufficient battery backup to power down in a controlled fashion. If anyone from del.icio.us is reading this, a detailed forensic failure analysis would be very helpful to the community. Read on for more about my own del.icio.us withdrawl…

Anyone else suffering from del.icio.us withdrawl?

Tim O

AddThis Social Bookmark Button

How much does it cost to write a book? A good pair of eyes, a gaggle of late nights, and a little bit of sanity. Most importantly, proof-reading tiny text on a 17″ eMachine Monitor did some serious damage. I had my first eye exam since last year, and my optometrist sends me away with “Computer Glasses”. For those of you not familiar with “Computer Glasses”, let me translate. “Computer Glasses” translates roughly to “Glasses for 29 year olds who use the computer way too much and who can’t imagine wearing bifocals for at least another 15 years”.

When I remember to use them, I find myself constantly switching between my “Computer Glasses” and my regular glasses. I program for an hour, something beyond a 5 foot radius interrupts me, and I get annoyed with all the optical context switching.

Enough with optical interfaces. I’m ready for a direct brain to USB interface.

Tim O

AddThis Social Bookmark Button

Ever deal with an online merchant and have a bad experience? You call customer service only to find yourself on the phone with someone who clearly doesn’t want to be bothered with actually sending you the merchandise you just ordered. The customer service representative representative has a heavy New York accent, and you try to visualize the surroundings. Well, good news, someone has done the dirty work for you. Don Wiss looked up the addresses of a bunch of camera dealers in Brooklyn and took some pictures. It’s interesting to see some of these “businesses”. I’ve had a encounters with shifty camera dealers in New York. Read on…

Anyone have any online retailer horror stories?

Advertisement