Browsing through the local bookstores

Posted by Dominik Sun, 18 Feb 2007 12:23:00 GMT

I’ve been browsing through the local bookstores yesterday and have been looking through the programming and IT sections. The two big bookstores I’ve been in both still haven’t got a section for Ruby. There are sections for everything you might (or then, might not) be looking for, Perl, PHP, Python, Java, C#, Joomla, Mambo, ActionScript etc. At the first bookstore I found one book about Rails, the other had four or five. Both had them filed under general programming. Both did not have a single book about Ruby (“The Ruby Way”, the “Pickaxe”, nothing).

That makes me question:

  • How big is the acceptance of Ruby in Germany? and
  • How big is the acceptance of Rails in Germany?

I have seen a few articles about Rails in german language magazines, but I somehow have got the feeling, that Ruby and Rails haven’t yet arrived in Germany yet.

Am I right? Or do I just look in the wrong places? At least there are 139 people from Germany registered at workingwithrails (as of today).

Workingwithrails lists two other developers in Freiburg, Germany. Maybe three is enough to start a ruby brigade? We’ll see.

Posted in  | Tags ,  | no comments | no trackbacks

My thoughts about "JSF is way too complicated?"

Posted by Dominik Sun, 18 Feb 2007 12:16:00 GMT

Imho, JSF is not too complicated. JSF was conceived for specific goals, and I think that JSF matches these goals very well. When you want to develop a java web application and can follow the path that JSF has laid out for you, you are well served. Integration with IDEs is available, RAD support, drag and drop development, it’s all included in the package. So, yes, JSF is not too complicated, if you use it the way it should be used.

JSF, e. g. , abstracts away the low level request-response layer inherent in all applications delivered over HTTP. I agree with Tim Shadel that the abstraction is leaky, but maybe programmers new to web development have something to gain from this abstraction.

It is only when you leave the troten path, when you make design decisions that were not considered in JSF, that JSF gets complicated. And even then, it is not actually JSF that gets complicated, but the fact that you have to work around a framework which was supposed to help you. It gets complicated because you have to dig through the seven layer burrito down to the request and the response to do what you want to do. Managed beans in request scope and bookmarkable URLs are, in my experience, things that have either not been considered in JSF, have been omitted on purpose or were, to the JSF creators, on the fringe of things considered necessary for a web framework.

I have done web development in Java since about eight years, starting out with Servlets going over JSP to JSF. I have also done web development in Perl, PHP and Python. And I currently do all my off-work projects in rails. Having worked with different frameworks written in different languages, I feel like there is a sweetspot between abstraction and allowing easy access to low level HTTP. And that sweetspot surely isn’t universal. But it seems that I share the same sweetspot with a lot of programmers. For me it’s rails. BUT: that does not mean that I would say that JSF is bad! It is just not a the level of abstraction I would like to work at.

Posted in  | Tags , ,  | no comments | no trackbacks

Page URLs in JSF Applications

Posted by Dominik Fri, 05 Jan 2007 15:51:00 GMT

Is it just me, or is the following behavior annoying others as well?

I’ve been playing around with JSF lately and noticed that the URLs displayed by the browser and the pages shown don’t match.

The minimal setup I used was a page which lists all users and a page which displays the details for an user named, respectively, users/list.jsf and users/details.jsf.

The navigation part of the xml configuration I’m forced to write for that trivial application looks like:

    <navigation-rule>
      <from-page-id>/users/list.jsf</from-page-id>
      <navigation-case>
        <from-outcome>success</from-outcome>
        <to-view-id>/users/details.jsf</to-view-id>
      </navigation-case>      
    </navigation-rule>
    <navigation-rule>
      <from-page-id>/users/details.jsf</from-page-id>
      <navigation-case>
        <from-outcome>success</from-outcome>
        <to-view-id>/users/list.jsf</to-view-id>
      </navigation-case>      
    </navigation-rule>

When I navigate to /users/list.jsf the list page is shown as expected. Once I select an entry I get served the details page. Sounds OK, but the browser is still showing /users/list.jsf as URL. And when I use a link on the details page to go back to the list page, the list page gets displayed again. That is fine as well. But now the browser shows /users/details.jsf as URL.

I’ve tested this with not only list and details, but the whole bunch of CRUD pages for Users, and the behavior is consistent. Consistently wrong.

Am I missing a point here?

Somehow I’m used to having some kind of relation between the URL shown by the browser and the page displayed. As I’m typing this, e. g., the URL shown is typo/admin/content/new and not typo/admin/content (which would have been the overview page). Now I have written and used my part of Java web applications, and often the URL shown by the browser was totally useless, but even that is an better behavior than having the wrong URL shown to you.

And it seems like I’m not doing everything wrong. Just checkout the URLs shown in Figures 4 & 5 of http://www-128.ibm.com/developerworks/java/library/j-jsf2/index.html. The same behavior over again.

And I haven’t even started to talk about the fact that, even if the right URL were shown for the details page, I could not bookmark it, because it carries no information about the user whose details I’m viewing at the moment.

Seems like I’m already spoiled by rails…

Posted in  | Tags , ,  | 2 comments | no trackbacks