Mar 04

TSS is Grooovy… enabled

Groovy, Tech 2 Comments »

I have really been enjoying Groovy, and finally got it all setup in the dev environment for TheServerSide codebase. This enables us to whip up a .groovy instead of a .java and get to work. This is so nice as there are some tasks where having a script is so much nicer.

It took me a second to set this up correctly on the JUnit side.

Most people have the following batchtest in their ant scripts:

<batchtest fork=”yes” todir=”${junit.reports.dir}”>
<fileset dir=”${src.tests.dir}”>
<include name=”**/*Test.java”/>
….
</fileset>
</batchtest>

you simply need to check for .class files via the build dir instead. You can’t look for .groovy as the tests will be skipped:

<batchtest fork=”yes” todir=”${junit.reports.dir}”>
<fileset dir=”${build.tests.dir}“>
<include name=”**/*Test.class“/>
….
</fileset>
</batchtest>

In related news, Gerald Bauer (yeah, the Java Republic guy) just put up a presentation that he gave on Groovy. He doesn’t go on about freeing Groovy ;) He does sneak in references to XUL of course :)

Mar 04

Glad I went with KISS versus COOL

Tech No Comments »

I am really glad I went with a boring/KISS principle when it came to my website (almaer.com). At one point I was going to use a cool CMS system, or write some fun server-side stuff, but in the end I went with a simple solution.

I spent a couple of hours to tweak an XSL project that would generate my look and feel from simple XML documents that represent the content on the site. From this XML I could autogenerate the drop down lists in the menus, headers, as well as the full pages.

To update the site I tweak the XML, run a script and push it live. This turned out to be a good choice, as I recently had to change hosting provider, and went from one where I had a shell/root/could do whatever I wanted, to one that is more restricting. This simple solution enabled me to be up and running with no downtime, and I didn’t have to fight with the hosting provider to make them install a Java Servlet/JSP enabled container, or even PHP.

It may be ugly…. but it works, and it is built with the end user in mind. Not only do I not need to go through some web UI to make changes, I don’t want to. Give me some files in which I can tweak and I am a happy camper. It isn’t ideal if I want my wife to add content, but that isn’t a problem ;)

I think this is where Naked Objects kicks in. It isn’t the ideal UI for the layman, but can be great for a “power user”.

Mar 03

Cedric has been busy: SGen

Tech 2 Comments »

Cedric has been a busy guy :) He just launched SGen, which looks like a next generation of his EJBGen…. well a super-set for sure.

The cool part of it is that it works on both JavaDoc tags, and the new JSR 175 Metadata anotations. Since Cedric was on the expert group for 175 I was hoping something cool would come out from him.

SGen is very generic, and lets you write your own modules to do whatever you want with the metadata. I like how proud people are to say “you don’t need to use XML!”. First Bob with dynaop, and now SGen.

What I want to know is… when will Groovy be built-in. It would be cool to write modules in Groooovy :)

I liked EJBGen when it first came out, and even wrote an article about it. Now there is XDoclet, it is hard to choose between the two.

A pro for EJBGen is that it is kept up to date with WLS, and is even built-in and really supported by BEA now. If you use WLS then you would be happy about that.

A pro for XDoclet is that you can use it to generate your web based deployment descriptors, your hibernate config, and your kitchen sink. If you wanted to generate all of that stuff, then you probably wouldn’t want to use both EJBGen and XDoclet.

Now Cedric has gotten SGen out there, people could write modules for it to generate all of “that stuff” too. Of course, it is early days. In my experience the toughest part of these code gen frameworks is having people to keep the support up to date. It is really annoying to have to wait on an upgrade because the generator isn’t ready to gen the latest versions of the config files. At least with open source you can write your own though!

I can’t wait to read all of the “Cedric why didn’t you just help on XDoclet 2″ talk :)

SGen home page

Mar 03

iPlanet upgrade on java.sun.com the problem? Ouch.

Tech No Comments »

So it seems that the reason that java.sun.com was down for a day was them upgrading from Netscape-Enterprise/6.0 to iPlanet-WebServer-Enterprise/6.0. I guess that is kinda embarrasing… but maybe it isn’t the software… but something else that is the problem? :) The most embarrassed people should be the QA department.

Check out the uptime site at NetCraft and you see that the server changed from Netscape to iPlanet… and then went back again.

Mar 03

JavaServer Faces 1.0: Finally released, but it is only 1.0 :)

Java, Tech, Web Frameworks 1 Comment »

Wow. It is finally here. It really has been “a long road” as Sun said in their JCP ballot notes. Now it is here, is it enough. A lot of heavy hitters have gotten behind Faces (Oracle, Sun, etc) but there has been a mixed reaction in the community. Some people don’t see the need for a layer like this, some see a need but don’t think Faces is “it”, and some think that this is going to be THE way to do web development from now on.

I definitely think we have a ways to go when it comes to being productive in web development. I have seen far too many projects that spend mind blowing amounts of time on the “web layer stuff” compared to the business problems themselves.

We also have to remember that although this is a standard, it is only 1.0. It is not the holy grail. Remember EJB 1.0?

It *is* good to get some good tool support, and work on making the web tier a better place. I hope Faces spurs on the niche. Good luck, and the next few months will be interesting.

Discussion on the JSF 1.0 release

JavaServer Faces 1.0 has been released, but why does it matter?: Kito Mann’s editorial on the new release from JSFCentral.

Mar 03

WebLogic Configuration: Part 2

Tech 13 Comments »

We have been continuing our fun with WLS 8.1sp2 (upgrading from WLS 7), and are trying to put processes in place to allow:

a) A new developer to take our doc, setup a dev environment in a short period
b) An admin to take our doc, and setup a new testing/production server in a short period

When I take a look at the docs, it again shows that WLS is a real pain when it comes to single install servers.

WebLogic has the notion of an Admin Server for central configuration, logging, etc. This is great if you have a bunch of servers that you need to administer, clusters, etc. However in my experience this is probably ~5% of the total installs of WLS?

We want to be able to do the following to get a new instance running:

- Install WLS on machine
- Grab configuration from repository
- Set a few environment variables
- Run start script (again from repository)

This is what we have with other servers, why isn’t that the case here?

Instead what do we have to do?

- Install WLS on machine
- Run through a config wizard to setup a domain, and add a couple of things (JDBC pool) through this tool (since we need the {3DES} password that it generates)
- Run the server in that domain once, as for some reason that changes the config.xml. Kill the server.
- Grab the config.xml from the repository and run through a bunch of steps to merge the two. At least relative directories seem to be working now in WLS 8.1. The documentation says:

Relative paths are based on the root of the Admin Server installation directory.

However, from testing, it appears to actually be from the domain directory. This allowed us to use a path of:

<Application Name=”portal” Path=”applications/portal” …. >

This seemed to work on Windows too, although for some reason after you run the server it changes the file to be: Path=”applications\portal”. Whatever.

Something scares me about having running servers change your config.xml. I understand that there should be a tool (e.g. /console) to make changes in a GUI. That is great. However just running a server with a given config shouldn’t be changing the file! It should be read only!

BEA always recommends not touching the config.xml, and having that be a blackbox. In the real world though you want to share this file, and don’t want to force every new install to involve a step which goes through /console setting things up. Just let me edit a file and CVS checkout to the machine I am setting up… then I can % ant setup-server and away we go!

Tom Malaher has been running into similar problems, as shown by his post “Third party software installation woes”

Mar 03

A brazilians view of London

British, Personal 2 Comments »

Carlos (Brasil) Villela has written up a review of his 2 weeks in England.

He is spot on with some of the generalizations. Two points:

- Indian food: He has hit this on the head. Indian food is the BEST food out there and is cheap in England (since it is on every corner ;) ). Luckily there are some (albeit few) good Indian restaurants where I have lived in the US.

- TV Licenses: I *wish* I could pay a few bucks and get NBC, CBS, etc with NO commercials. I would definitely be willing to do that. Well, I guess I would be willing to do that.. but now I have TiVo I can skip past the commercials anyway. In the US it is nuts… the amount of commercials has steadily grown and now reaches 20 mins / hour. That is just crazy.

Thanks Carlos, this has gotten me in the mood for my trip back home to the UK in March!

Mar 02

God hates shrimp

Personal 29 Comments »

Oh man, this is a good one. There is a new movement out there: God Hates Shrimp. Gotta love satire, and it is SO easy with a president like “we” have here.

12 Reasons Gay Marriage Will Ruin Society (not) is another good one.

“Keep your laws off of my body”

Mar 02

Funny TSS posting: java.sun.com is down

Tech 1 Comment »

Now and then we get very funny posts to TheServerSide news page (which we don’t push live!). One of them today was: “java.sun.com is down!!!!”. It is interesting that if a site like this goes down, people love to laugh. “A ha! see Java must be bad!”. Of course this is crap :)

I have to admit to being part of this trend myself. I do get quite a chuckle when I see pages that spit out ASP errors. There was also an early trend where sites with .jsp were really slow. At the time we actually got emails at TSS asking how the site was fairly responsive. As a consultant you look at the offending code and saw fun examples such as:

  • Every JSP connects directly to a database and runs SQL
  • The 500000 line Servlet

It took awhile for caching to catch on. This happened in early PHP pages (as well as all of the other technologies).

Mar 02

Comments are back thanks to MT-Blacklist

Tech 8 Comments »

I took off comments from this blog, simply due to the spam bots that put hundreds of comments soliciting viagra etc.

I recently installed MT-Blacklist and hope that takes care of some of these fools.

Cedric also had a smart simple idea… simply renaming the comments CGI. So I did that too. I wonder how long it will take for the bots to break through this time :)