Web development with Java

Now that’s a large topic. A very, very large topic. In case you are into Java web development, you are going to have to decide between millions of frameworks for similar tasks, and sometimes for the simplest and most obvious thing to do, you’ll have to introduce a whole framework into your project. The learning curve for all these frameworks is also another problem. You start with GWT, and realise that it does not feel right always. There are times when it is nice to have Java code compiled into JavaScript, but there are times when it does not feel right. So you want a more server side approach, and that’s where things start to get crazy.

You have struts (old, but still used), JSP, JSF (on top of JSP), Facelets (because JSF on top of JSP is problematic), JSF 2.0 (soon), GWT, Tapestry etc… You have specs and application servers, web containers with their soap opera relationships with specs. J2EE 1.4 or J2EE 5? Tomcat or JBoss, if so which version? Java 5 or 6?

By the way, why not think about different implementations of the same standard? MyFaces or Sun’s reference implementation of JSF? Oh, I forgot to mention, J2EE 5 makes application servers provide their own implementation, so you may need to figure out how to replace defaults with your library.

While you think about this, endless libraries and frameworks  are born and an equal amount of them is dying. It is like the universe with stars and planets. Only for Ajax in JSF you have at least four options, some of them being relatives of others. GWT, Ajax4JSF, RichFaces, GWT4JSF….

And what about the glue type of frameworks? Spring and/or Seam for your web application would be nice, don’t you think so?

I am just trying to come up with a set of reliable and productive tools and technologies, and for Java and web based development, I do not feel like I’m winning. Seriously, things are getting out of control in this domain. The problem is I am in a position where I have to build a set of tools that will support web based development, but in such a fragmented domain, how can I target the combination with largest set of users? I don’t know, I really do not know.

Tablelayout: some people still has some common sense left in them.

I’ve spent almost all day trying to write a small piece of code that would generate a form using an archetype as input. I had everything written, accept the code that would create the form. Would be a no brainer, right? Well if it is java swing that you are using, that is not the case.

What I wanted was very simple, however the “powerful” layout engines in swing just would not let me do it. After spending hours cursing to gridbaglayout, I finally discovered tablelayout here.It works exactly it was meant to be. No catches, no smart tricks. It simply works. In case you want to save your own hours, just take a look at it.

And if you respond with “but gridbaglayout is sooo powerful”, I’ll punch you in the face.

Come on Microsoft, where is my linker???

During the past 7 years, all .net developers somehow had to face the problems of users with no .net framework installed. We all faced it, we all dealt with it, and we all hate it!

.Net framework itself is a COM component actually, and COM is a technology that has roots in OLE which goes back to 1995. Even though some parts of the .net framework require other software to be installed in the OS, not all parts have this requirement. So in theory, the whole framework can be redistributed as a native dll. In practice, MS wants us to install the runtime.

There are companies like RemoteSoft and Xenocode who sell products that package necessary parts of the framework along with the actual software written in C#, VB.NET ,etc, compile the whole thing to native code and deploy it as a single package. This is great! This is what we all want. A single file just like in the old days.

Unfortunately, MS does not give us a tool for this. Well, we have NGen of course, but it solves a part of the problem, the whole thing still requires a separate tool, and these tools are expensive. VmWare now has thinapp, which used to be thininstall, and their prices and licencing is also way out of my reach. If I wanted to develop a small widget that’ll just sit in the taskbar, why should I force users to download a 23 MB runtime for it? Why should not I be able to use C# for all my work, without being afraid of deployment blues.

Since there are companies who does this, this is doable. I guess there are also legal problems if I wanted to do this, becouse I’d be distributing parts of framework in some form, which probably requires permission from MS.

This is one neat feature that I’d love to see. Come on MS, give my linker!!!

Mobile web development, not attractive for Microsoft anymore?

I’ve build a mobile web site a while ago, which provided xhtml based access to an e-commerce site. I’ve done the development with vs.net 2005, and when I migrated to vs.net 2008, I decided to move that project into new vs.net.

Guess what,  mobile web form designer features are gone. They’ve been gone from vs.net 2005 with sp1 for vs.net 2005, but designer support simply does not exist for vs.net 2008

I guess the general approach to mobile web development is to consider it as a moving target, which will eventually merge with the not-mobile web. New mobile devices and new mobile browsers, especially IPhone and Safari on it is quite capable, it can even run a tricky google web toolkit site I’ve build a while ago. Apperantly MS is just passing the effort for mobile web development, and waiting for the devices to catch up. Meanwhile, there are existing projects, like mine,  which have to maintained. I am not happy about keeping the whole vs.net 2005 ide just because of a single project. Vs.net 2008 sp1 does not seem to change much either. Come on MS, give my designer back.

Current winner for JSF development: Netbeans

I’ve just started porting a Google Web Toolkit project (a small one) to JSF, and this time, I have to admit that none of the choices I’ve tested on Eclipse is a match for Netbeans 6.1. Once you get the basics, JSF development is not about visual designers etc, but current solutions on Eclipse platform are way unintuitive compared to usual unintuitive state of Eclipse tools 🙂

I’m not happy about switching tools but I’m really not comfortable with Eclipse based ones. The list includes MyEclipse, Oracle’s solution (ex BEA), and a few others. Let’s see how Eclipse will perform in this field in the future.

I’d love to see Instantiations develop a JSF designer.