2007-09-26

If technology is key to your strategy...

... if technology is key to your strategy, then, when you plan your strategy include a practicing technologist. People who have dedicated their careers to studying technology will typically understand it. Those people can advise you on how technology can interact with your plans.

2007-09-19

Sipping Googleccinos

But then, while you’re sitting on your googlechair in the googleplex sipping googleccinos and feeling smuggy smug smug smug, new versions of the browsers come out that support cached, compiled JavaScript. And suddenly NewSDK is really fast. And Paul Graham gives them another 6000 boxes of instant noodles to eat, so they stay in business another three years perfecting things.
- Joel On Software

Okay, that's about the funniest thing I've read in a month. Kudos Joel.

2007-09-18

TriJUG: Java FX

A term I shall coin today is YAJAPPL (Yet Another JAva Platform Programming Language.) and I'll use it to refer to Groovy, JRuby, and Java FX. Last night's TriJUG meeting was a double header on Java FX and Java 6 update 5. The big noise in Java land is over new programming languages that play on the JRE and tonight was no different.

First up, Java FX which is tagged in the press as Sun's answer to Flash. This summary doesn't do either Flash or FX justice. From what Raghavan "Rags" Srinivas showed us I'd say that the real strategic play here with Java FX is the creation of YAJAPPL (pronounced yah-juh-apple) which has a nifty concept in it called a "bind".

Java FX appears to be yet another language enamored with the associative array. Window definitions and graphical display elements are composed of associative arrays of associative arrays. What's different here is that you can bind an attribute in a display element to a value or method in another object. Demos I've seen include tying a radius to a time stepped method that causes the circle to grow or shrink.

This is a powerful concept in the long run since it means a true separation of the MVC elements and not just by virtue of enforcing this via policy. The Java FX code itself will force the separation. The graphical design tools will certainly help craft better looking Java applications in shorter time frames... but it's really that "bind" concept that's going to simplify development.

Next up was the Java 6 update 5 release and the introduction of the Java Kernel. To someone who is relatively new to the Java political landscape this looks like an update that was sorely needed and a long time in coming. From what I understand the upshot of the new release is that Java is no longer distributed monolithically. That means you download the Java Kernel and some browser plugins to start with.

The browser plugins are interesting in that they will allow scripts running on websites to detect the presence and version of Java installed in the browser the plugin is running in. Sun's goal will be to get as many browsers as possible to run these Java bootstrapping plugins so that way sites can detect Java and cause the JRE to download additional Java features as needed.

It would be very nice for Sun to consider doing something with these remote class loaders that would allow the formation of a comprehensive Java archive network that would allow the distribution of JAR files and the expression of their dependencies. The archive network could function as an open source clearing house that developers could use to get their proposed classes peer reviewed and that neophyte Java developers could use as an example of "good" Java. Projects in the network would have to under go a review process to be accepted to keep out cruft.

With the new browser plugins circulating allowing for piece-meal download of the JRE on an as needed basis it reduces the cost of the JRE from an enormous 10 MB to a merely huge 4 MB. This reduces a barrier to entry for some shops.

Ethan Nicholas mentioned that the JRE plugin was too large for Yahoo! to consider using for the Yahoo! Maps project. It didn't matter if Java was a superior development platform, had better API, or could do a better job all around. It only mattered that from a practical stand point the JRE was a heavy plugin.

Ethan's lesson to Sun is in my words: "It doesn't matter if you are better if they don't let you play."

And, this is the problem facing Java in this space. Java is on just about every cell phone out there but it doesn't matter if they don't let Java play. Java and Java FX appear to be better suited linguistically for their respective jobs than anything that Flash and ActionScript currently have but that doesn't matter if Flash has more developers, better tools, and an equal install base. Java won't even get to play.

Now, Java is open source. Open JDK is out there. But, I don't see it causing any earth quakes until around Java version 8. That quake is coming though and the people involved now will likely be the shakers.

2007-09-17

Binding JBoss


$ /usr/local/jboss/bin/run.sh -b `hostname` 1>&2>/dev/null &


Binds JBoss to `hostname` on port 8080 and ignores the standard output and standard error.

2007-09-13

Database questions...

If you were building a new project today, which database should you use?

If you are working with JBoss how do you identify the need for an XA compliant database?

If you need XA and you are on a budget which database do you use?

2007-09-12

EJB3 security annotations

So with EJB3 declarative security annotations I can do things like this:

@DeclareRoles("ADMIN", "USER")
public class Frobnicator {
@RolesAllowed("ADMIN","USER")
public boolean checkFrobnication() { ... }

@RolesAllowed("ADMIN")
public boolean fullyFrobnicate() { ... }
}



Which will allow me to lift the Frobnicator bean out and drop it into a JUnit tests as a POJO. The POJO can then call the methods in Frobnicator without authentication. This helps doing unit tests and getting higher code coverage. But... isn't the authentication part of what I've written? Isn't that something that needs testing?

So my predicament is how do I provide automated acceptance testing for all the permutations of roles in the system?

2007-09-11

Database Vendor Political Landscape as of 2007


Please note this is simply my opinion. Companies are presented in random order. No official recommendations are being made.
Oracle: Oracle the company has filed court proceedings against SAP citing that SAP has been stealing Oracle intellectual property. Oracle 11g is still closed source and proprietary. Considered the leader in RDBMS technologies and offers unique features such as XML Publisher and XML SQL Java API's that allow java developers to do ORM in Oracle proprietary ways.

Microsoft: Owner of both Access and SQL Server products, SQL server is based on Transact-SQL which is an implementation of the ANSI SQL standard. It is favored by .NET developers because of its tight integration with the .NET Framework. SQL Server runs only on the Windows operating system and as such can only be used in production environments that are predominantly windows. Security vulnerabilities such as the "SQL slammer worm" have scared some shops away from this option as an internet application OLTP store.

IBM: acquired Informix and supports Informix along side DB2. DB2 now has an open source version. Informix and DB2 have started to share features. IBM's move to open source DB2 may indicate a shift in IBM's software development and support strategy. The acquisition of Informix may indicate a desire at IBM to freshen their database offerings. Informix is actively supported by IBM and has had a new release this year.

Sybase: Still a traditional software shop, their still closed and proprietary products based on Transact-SQL have confusing names such as OpenServer and OpenClient which typically are used in industry to indicate Open Source or at least a reviewable source code base. This is simply not the case with the Sybase products. These products are "Try and Buy" products which has absolutely nothing to do with Open Source. However, Sybase still has a strong following but their popularity is waning.

Firebird: an open source RDBMS that features ANSI SQL 2003 compliance is based on Inprise code base from Borland's now defunct InterBase database product. This project is extremely young and unproven by RDBMS standards.

MySQL AG: In addition to the unique MySQL product which has earned acclaim and scorn alike for its design, MySQL AG acquired MaxDB from SAP. MaxDB is an ANSI SQL 1992 compliant product. MySQL itself is partially ANSI SQL 1999 compliant... or rather MySQL does not comply entirely with ANSI standards but enjoys a 10 million user install base. That large install base has earned it the title of "The Open Source Database" since it has become a defacto standard for open source projects such as Ruby on Rails.

Ingres Corporation: Still enjoys a following, (judging from all the comments below to fix this post), but has not enjoyed much market attention. The survival of the product and company appears to be driven by legacy support.

PostgreSQL: Sun Microsystems provides support for Postgres which is an ORDBMS (Object-Relational Database Management System) which is an open source project based on Ingres. It has a much richer feature set than MySQL and commercial technical support available from Sun Microsystems. Among the database players it is unique for its support of multiple PL/SQL sub languages. While Postgres has not enjoyed the success that MySQL has it is used by clients such as BASF, IMDB, Skype, TiVo, USPS, Sony, VeriSign, and the US department of labor. Postgres continues to thrive but has no marketing buzz around it... it has a solid reputation in the Open Source community as a "real" database. (EDIT: Sun does not own PosgreSQL, they merely support it.)

Apache: The Derby RDBMS is actually the IBM Cloudscape database also known as the Sun Microsystems Java DB. The project has only emerged from Apache incubator status in 2004 and is relatively unproven.

The upshot

Oracle and Microsoft still are industry leaders and seem to be relatively comfortable each in their own niche. There doesn't seem to be a serious contender that could knock down either of them.

MySQL has achieved nearly total dominance and is currently the un-assailable king of the Open Source database market but this dominance is built on a non-standard and non-compliant database system that has serious issues with ACID compliance and major missing ANSI SQL features.

Several players (strangely, IBM is a small player in the open source database market niche) are challenging MySQL's dominance by open sourcing already proven, stable, and compliant databases. Serious technical contender Postgres can not seem to get a solid marketing based footing that could propel it to the front. Apache Derby and Firebird may prove to be serious competitors in five years. No other current players seriously factor in to the short term picture.

A fringe player DB4O (Database for Objects) is an interesting new technology but will not likely be a serious commercial space contender in the near future. The product is only 3 years old in production but has prominent users such as BMW, Boeing, Bosh, Intel, Ricoh, and Seagate.

2007-09-10

Engineering for the Web

"What ever happened to Web engineering?"

"The problem is, strictly separating designers from developers has resulted in a Web built by people frightfully unaware of the standards and technologies required to make it go. Most Web pages today extend well beyond the limited scope of HTML, and a good many of them bring together a "pure" programming language like Java or C++ (you know, real code with control structures and variables and stuff) with healthy chunks of JavaScript, PHP, HTML, CSS, and oh, don't forget, XML."


This just feeds my assertion that the dot-com boom was the worst thing to happen to software engineering practice in computer history. The bust was harrowing and the good and bad alike were cut down, but, the boom is what fostered the legacy of bad practice and unrealistic expectations that we have to fight today.

The new movement to introduce engineering principles back into web development shops should be unnecessary.

2007-09-08

Groovy Grails Portlet

I need to put my grails applications in a Portal. If you look at Bug 1345 over at codehaus you can see I'm not the only one. Now Spring will run in a Portlet... Grails is built on Spring... how hard could it be? I might write a portlet adapter myself.

2007-09-04

Careful, Spring will eat your lunch...

One of the best NFJS talks that I did not attend but should have was the talk by Venkat Subramaniam titled "OSGI: A Well Kept Secret." I discovered this talk on my CD a few days ago and started researching OSGi.

OSGi is indeed a well kept secret and appears to be worth looking at. Based on Venkat's presentation and research I've done on my own it looks like OSGi could very well be an answer to creating web enabled appliances. These could be hardware that through JNI and OSGi could expose themselves as services... and it appears that this could be the answer to the class loader woe I had a few months back. Not to mention sounding like it's a JINI/JMX killer... which seems to me to be the lion's share of what an Applications server is to most applicaitons.

The big deal here isn't so much OSGi and how good it is... but that Spring is (from what I see in Venkat's notes) poised to leverage OSGi in its 2.1 release. And if Spring can offer Hibernate3 and JINI/JMX replacements... and can offer SOA... and can offer all of this in an industry standard way...

... why are we using those big heavy application servers again? Clustering? It seems to me that Spring is getting ready to eat someone's lunch. Make sure it isn't yours. Red Hat, I'm looking in JBoss' direction... do you really think embeddable ejb3 will save you? Is that rye bread?

2007-09-01

Grails Widget list...

Take a look at this...

def constraints = {
description(widget:'textarea')
}

... which I got from the Grails site. So, if you want to use the code generators to create views for a form and want a string to have a text area as its input you can use the constraints on the object to specify text area. But wait, what other widgets can you specify?

I did a little digging in the Grails source code and came up with this list....

  1. textField
  2. hiddenField
  3. submitButton
  4. field
  5. textArea
  6. form
  7. actionSubmit
  8. actionSubmitImage
  9. datePicker
  10. renderNoSelectionOption
  11. timeZoneSelect
  12. localeSelect
  13. currencySelect
  14. select
  15. checkBox
  16. radio