JavaOne 2006 Netbeans netbeans netbeans
Tuesday 16 May 2006 @ 10:10 pm
Filed under:

I’m currently standing behind a Sun terminal at the conference and due to the position one has to take to use the keyboard and see the screen, it is impossible to make this a lengthy entry describing everything I’ve seen and heard today.

The conference was opened by the General Session aka keynote of Sun themselves. And the message was pretty clear: Please join the JCP (we only have 1052 members) and please download and use Netbeans. Nothing more, nothing less except for some minor details like the birth of JEE 5 and the incredible impact it will have and the announcement that Java once will become really open source (quote : the question is not whether, but how). Openness matters but its clear Sun is still struggling with their other marketing exclamation: Compatibility matters.

About netbeans, two major statements were made. The first was coming from JBoss founding father Mark Fleury who declared that JBoss will support (and donate to?) the netbeans platform (Hey, is JBoss IDE not eclipse based?). The second was coming from Sun themselves declaring they will bring their Studio Creator to the open source community by donating it to Netbeans. It seems the IDE war has entered a new phase.

One other very small thing that caught my attention was about certification. Since we’re not talking J2EE anymore but JEE 5 (Still having problems pronouncing it fluently), we all need to recertificate to become JEE certified developers or architects. So for all who are planning to do their exams, please wait for the new certification program. And for those who already are certified, start reading books again!

— By Okke van 't Verlaat   Comments (0)   PermaLink
JavaOne 2006, The power of java (picture)
Monday 15 May 2006 @ 9:22 pm
Filed under:

The power of java

— By Okke van 't Verlaat   Comments (1)   PermaLink
JavaOne 2006 day 0, a prelude
Monday 15 May 2006 @ 7:32 pm
Filed under:

My goodness, 691 speakers and 380 session all packed in 4 conference days. It’s huge, it’s massive and it’s almost impossible to pick out sessions to visit. It’s simply too much! Way too much. And even Sun’s schedule builder, an online session scheduler, won’t help. Just like a little kid in a toy store I want to play with everything!

Mission impossible. So to get organized I gave myself a theme to fill in: productivity. And within that theme I picked to major hotspots: tooling and scripting. In my very humble opinion tools can manage the overwhelming complex world we’re programming in and scripting will make the actual programming task more comfortable. Beside this theme I picked a couple of sessions that sounded just fun or had a speaker who attracted me.

So, here’s my list (exluding the general sessions and the evening Birth of Feather sessions) in order of appearance. Upfront I have no idea if I’m actually able to follow the schedule but at least it is a good intention.

  • TS-4311, Inside Eclipse calisto
  • TS-4386, Twelve reasons to use Sun Java Studio Creator IDE
  • TS-5033, IntelliJ IDEA: Integrated Team Environment
  • TS-3361, Java EE 5 Platform: Even easier with tools
  • TS-1615, Java EE 5 Blueprints for AJAX-Enabled Web 2.0 Applications
  • TS-3376, Java technology techniques for developing AJAX applications
  • TS-3273, Groovy = Java Technology + Ruby + Python for the JVM
  • TS-3059, jRuby, Bringing Ruby to the JVM Software
  • TS-3886, Dynamically typed languages on the Java Platform
  • TS-3187, Advanced JSF Custom components development
  • TS-1660, Twelve Java Technology security traps and how to avoid them
  • TS-5397, The top-10 ways to botch a J2EE based application
  • TS-1382, Scripting in Java SE 6 (Codename Mustang)
  • TS-3987, Crazy Talk: Examining why Agile software development works

The only session I really would have liked to attend but didn’t fit into my schedule was the session about writing a Sony Playstation emulator in Java. And the session about the building of a highly dynamic battlefield infrastructure. And the session about the robotic dune buddy called Tommy. And the session about ……

 

 

— By Okke van 't Verlaat   Comments (0)   PermaLink
JavaOne day -1: no return (picture)
Monday 15 May 2006 @ 4:13 am
Filed under:

No U turn (on the golden gate bridge!!!)

No U turn on top of the golden gate bridge ?! :-)

 

— By Okke van 't Verlaat   Comments (3)   PermaLink
The StaleStateException, diving into hibernate to get around it
Monday 1 May 2006 @ 9:02 am
Filed under:

HibernateWho hasn’t seen the StaleState or NonUniqueObject exceptions while doing persistency with Hibernate? They tell you there might be a problem in your software design but according to their names, no clue what can be wrong. Here’s a simple �what is happening and ho to get around it’ recipe to solve this.
The StaleStateException describes the inconsistency of your objects versus the state of these objects in your database. This exceptions typically occurs when deleting an object that already was been deleted in the database. Therefore the exception will be something like:


Batch update returned unexpected row count from update….
Incorrect usage of your un-save strategy of your class will be the cause of this exception. Your application is not properly implemented considering your data manipulation saving strategy.


Example:
Suppose School and Student are common classes in your application. In two views school and student relationship can be adjusted. Only in one view the adjustment is saved by user interaction (push the save button). So in case of a deletion, the objects are deleted from the session but not directly saved. When flushing the Session, Hibernate will try to synchronize the state with the database and that will fail. The org.hibernate.jdbc.BatchingBatcher will check the expected row count and throws the exception. Mixing sequence scenarios with Junit is the best way to tackle this issue before functional testing.

NonUniqueObjectException will be thrown when two different instances of the same Java class with a particular identifier are in the scope of a single Session. The simple solution is not to load an object to the session if there is already a reference. Call the saveOrUpdateCopy at the beginning of a transaction to avoid this exception (or merge in Hibernate3).
Another possible issue can be the definition of your mappings. Make your relations unidirectional, this prevents loading from childs object also the parent object
Or by not deleting all objects used in a bidirectional association, for example


parent.getChildren().remove(child);
child.removeParent(parent);


May these tips help in your dive :-)

Resources:
http://www.hibernate.org/hib_docs/v3/api/org/hibernate/StaleStateException.html
http://www.hibernate.org/hib_docs/v3/api/org/hibernate/NonUniqueObjectException.html
http://www.jroller.com/page/maximdim?entry=hibernate_batch_update_returned_unexpected (demonstrate the StateStateExeption with a Junit test)
http://www.hibernate.org/116.html (hibernate common faq)

 

 

— By Wido van der Burg   Comments (0)   PermaLink
do the ui with double-u
Tuesday 11 April 2006 @ 11:31 am
Filed under:

It’s framework time. Again. We’ll probably never learn. And on one hand it’s good we do not learn, creativity is partly based on exploring the unlearned. But on the other hand building solutions for already solved problems seems a waste of time. What I’m talking about? New frameworks for solving the UI problem of our world wide web. The list is evergrowing and when looking at the latest additions your homebrew’s name must at least start with a capitol ‘W‘. I’m talking about Waffle’ and Wedge’ Is this the Wicket-effect??

I’m not in the mood, nor in the position, to dive deeply into these two new kids on the block but a quick look through their respective tutorials gave me the impression we’re not dealing with new and fresh approaches. Waffle seems nothing more than an action handling request based view dispatching framework. And Wedge is following the component oriented paradigm and utilizes ANT to generate java code (how about the write-deploy-test cycle??) for binding (indeed, no reflection needed anymore).

But, If you want to give it a try, go ahead! And Feel free to convince me whenever you’re findings do not match my quick look-without-touching way of review. Oh, and for those with too much spare time, I do not care you’re using it to build UI- framework XYZ, but I strongly suggest not to start its name with a trendy double-U :-) .

— By Okke van 't Verlaat   Comments (7)   PermaLink
Productivity versus design
Wednesday 5 April 2006 @ 3:06 pm
Filed under:

In his excellent written article The state of design Steven Devijver makes some intriguing comments on common design principles. While advertising the principle of simplicity, he focuses on the effect EJB technology had on current practices. Major target of critique is the inherited (as in taken from the olf J2EE world) use of data transfer objects while everyone seems to have forgotten the idea of rich domain models. You can agree with him or not (as one can follow on the discussion full of lengthy replies at javalobby.org), but one point he makes seems evident: when dealing with an object oriented world (language, platform) why restrict yourselves to behaviourless classes? It’s a bit of missed opportunity he forgot to mention how complex OO can make life and how delighting DTO’s can be. I do agree with Steven we not always get the best out of the OO instruments we are using but sometimes I also wonder for whatever reason we decided it must be OO (not even mentioning the additional layer on top dealing with cross cutting concerns). Not everybody is a PhD in applied computer science! At the end, a design will be settled by the fact it resulted in a piece of software that works and that was build within budget.

The last months I’ve been busy exploring productivity boosts around web application development. And during this quest I discovered there are only two major streams to follow: You either simplify everything you can and make life as easy as possible especially by underdesigning your app, or you don’t care about complexity that comes with ‘well designed’ OO and rely on the tools you use. No middle of the road! Setting up a rich domain model without the tools to maintain it? Forget it! But on the other hand you can also forget to build an utterly complex application without any design. It seems to be either the complete low- or the complete high-end of bandwith. So you either end up in a Ruby on Rails alike world with simple models (indeed, DTO’s without behaviour), simple controllers and a couple of useful helpers, or you find yourself behind a ‘do everything a normal programmer does not want to do by himself‘ kind of RAD environment. And it’s exactly this perspective you have to use when looking at ‘the state of design’: It’s all about productivity.

So, that said it’s time to drop in the bit over-acted and bold statement Java is not a very productive language. Neither is C++, neiter is C#, neither is any 3GL (not going to argue a language producing byte code that get interpretered by a virtual machine is not pure 3GL!). When you’re planning to write a data driven web application by hand using java, no matter which (set of) frameworks you’re planning to lay as foundation, the language you’ve choosen will become your biggest enemy. You might have the most elegant framework you could find (yep, of course it is Spring), you can have the most elegant design (including those lovely rich domain models) but the chance you got beaten by a bunch of scriptkiddies who just met the Rails environment is quite high. Unless you got tooling! Heavy tooling! And once you’ve got your ironwork, I bet you won’t care about design at all. That is up to the tools and embedded (meta) frameworks you bring with you. So, if you ask me what the state of design is, I would say it has been forgotten. Design has left the building. For the sake of productivity.

— By Okke van 't Verlaat   Comments (0)   PermaLink
It’s just common(s) sense
Monday 3 April 2006 @ 9:59 am
Filed under:

Most java projects use a bunch of common classes for various things.
Because this functionality is so common, we tend to copy these common classes from one of our earlier projects.
Instead of just copying some ‘legacy’ snippets from previous projects, it might be a more sensibly thing to use the (Apache) Jakarta Commons libraries instead.
One of the jakarta commons should be mandatory for each Java project: Commons Lang

The commons lang contains all kind of utility classes that will make you think why it is not part of the standard Java lang(uage).

One of the most handy features of the Commons Lang are the Builder classes to easily create toString, equals and hashCode implementations for a class. All these builder classes are smart enough to detail with null and array arguments, so you don’t have to.

Another handy class is the StringUtils class that contains a whole bunch of string functionality like isEmpy / isBlank, trimming, replacing, chomp / chop etc.

When coding I like to aggressively enforce my constructor / method pre-conditions by throwing and IllegalArgumentException when any argument value is not according to a pre-condition. The Validation class will help you with that. It contains utility methods to easily check if the supplied argument isTrue, notEmpty and notNull. Furthermore for a collection / array you can easily validate if there are no null element and that all elements are of a certain type.

There last class I would like to mention is the Enum / ValuedEnum base class.
By extending from this class you can easily create a enum class in Java 1.4 (in Java 5 you should use the new enum language functionality).

I would advise any Java programmer to have a (short) look at the Javadocs of Commons Lang, because besides the features I described above there are a lot more gems to be discovered.

— By Emil van Galen   Comments (0)   PermaLink
What about the bigger technology scope?
Friday 24 March 2006 @ 11:31 am
Filed under:

At the moment a college has asked me to think with him about a big contract. It’s mainly about the bigger things in development life and forced me to think about developing bigger applications than we have done until now. This fortunately fell together with the talk Duncan Mills had at Guru4Pro (see other article) which also made me look at things in a bigger picture.

I’ve mostly worked on applications that follow the MVC web-app stripe. The Oracle ADF framework can fill this in completely for me. However when we start to live in a less constrained world we have other stuff poking in. Webservices are asked for, ESB (Enterprise Service Bus) is a big bussword here. So i’m looking around for the framework (extensions) that can help me.

I’ve made a little list of things i want to do some research about:

  • BPEL: BPEL can solve the *big* SOA problems like asynchronous calls and easy configuration and so on. BPEL processes are exposed as simple webservices. JDeveloper can generate stubs to call webservices, i’ve developed my own way to expose webservices (using Apache Axis) and to call them dynamically (using WSIF) or to do some registry stuff (UDDI4j). So this piece of the bigger picture should not be a big problem.
  • JSF knowledge: Still have a lot to learn here. However my main problem, no templating in JSF, could be solved by something called Facelets. Have only heard of them, need to find out about them. Will it work with the Oracle ADF framework?
  • Security: Okay as a developer i don’t care about security, but customers do. ACEGI pops up everywhere. Need to look into that. Will it fit in the Oracle ADF framework somewhere?
  • And the big one i don’t have a clue about yet. How to integrate Oracle ADF to a Enterprise Service Bus. Still have some thinking to do. Just using Message Driven EJB’s probably won’t cut it. The ESB i’ve heard from was implemented using Oracle Interconnect. Yeah, another Oracle product, that should already be done by them, shouldn’t it? I don’t know yet.

So, these are my thoughts at the moment. However fortunately for the world there are a lot more people out there who are much more intelligent than me. And those people are you. I would like you to give me some pointers on my thoughts. Do you have experience with products that integrate into or work with the Oracle ADF framework for these this? Please leave a comment.

Links
A nice article about integrating BPEL and JSF (written by Chris Schalk)

— By Robert Willems of Brilman   Comments (0)   PermaLink
Duncan Mills speaks on Guru4Pro
Thursday 23 March 2006 @ 3:40 pm
Filed under:

As Okke stated earlier, Duncan Mills has made a visit to the Netherlands to speak on an event called Guru4Pro. Guru4Pro is a series of presentations given by knowledgable guru’s. The first of these presentations was given by Duncan Mills of Oracle. Duncan has been working in the field for 18 years in total, of which 14 years for Oracle. Duncan started on the support department but quickly switched to product development. Currently he is developing the ADF framework, the framework we use for application development.

The presentation was called ‘The rise (and rise) of the meta-framework’. The presentation gave a clear view into the world of frameworks and meta-frameworks. Duncan first started by explaining what a framework exactly is. His view is that every (competent) developer will build there own convenience libraries to make their own life easier. I personally like the comment “If your developers aren’t constantly developing their own libraries to make their job easier, you should fire them and hire others.” It make the point clear that deep down everybody should be thinking about extracting the ‘dumb’ and ‘easy’ stuff and letting libraries do that for you. However a library, or a set of libraries isn’t a framework…

A framework is a complete solution for a specific problem, a point solution. Good examples are Toplink, Hibernate, Struts, JSF, EJB, Spring, etcetera. Frameworks should be applicable for more than one solution, they should be flexible enough to solve the problem every time for each application you make. A good framework at least.
Duncan further stressed the criteria he feels a (good) framework should fill (i list here only a few):

  • Coverage and depth: a framework should do everything you need. If it won’t (say your persistence framework cannot do updates) you won’t use it
  • Documentation & User guidance: a good framework should just give you a set of API’s. If the framework is to succeed you need to explain the framework in documentation and it should provide guidance in the way to solve problems, the right way
  • Infrastructure not generation: a framework provides the plumbing, it does not generate code. If you just generate code you’ll have problems during maintenance. Frameworks abstract and solve the problems
  • Pluggability: the meta-framework should work with different frameworks. And it should work exactly the same
  • And last but not least ‘a cool name’: has anybody heard of the Oracle MVC framework? No, but Spring rings bells. Spring is a cool name

After defining what a framework was, Duncan gave the term ‘meta-framework’ a meaning. A meta-framework is a framework that combines all kinds of frameworks to provide a complete solution. The meta-framework should integrate the frameworks and make sure they work together correctly. The developer using the meta-framework should be able to do things in a consistent way without bothering about the underlying frameworks.

Duncan gave an example using the Oracle ADF framework (the new one based on JSF) and Oracle JDeveloper 10.1.3. First he wizarded two kinds of datasources together. Nobody will be to overly impressed by an IDE that can give you a wizard that can generate your persistence layer. However he created a persistance layer based on Toplink and EJB 3.0 session beans, next to that he created another persistance layer based on Oracle Business Components. Next we went on to the UI. Duncan showed that using the meta-framework and abstractions that Oracle ADF gives the developer to possibility of using data sources as just a source of data without thinking about the implementation. He could drag-and-drop the Toplink and EJB based data on a JSF page the same way as the Oracle BC based data. After that he showed how to integrate those two sets of data and synchronize them. You could now browse the department data (via the Toplink and session EJB) and see the relevant employee list (via Oracle BC) and without much ado those two different data sources were combined. Personally i found this a really good demo, it was pleasing to see something else than the usual slick sales manager click-through. Duncan later told me he only thought up this demo a few hours before the presentation; he also thought it was good the show something closer to reality.

After the Oracle ADF demo the presentation went on over meta-frameworks. The only other framework that comes close to meta-frameworkness was Spring. Both Oracle ADF and Spring come close, but neither are there completely yet. Both meta-frameworks revolve around their key-ability to glue frameworks together. Oracle ADF used the ADF Model Binding layer and Spring uses the bean factory. Spring for example has better security support than Oracle ADF, but Oracle ADF has better tool support.

The last part of the presentation was about trends that are comming. The latest trend is that the standards are behaving differently and comming up to par with proprietary (not in the sense of ownership, but in the sense that it isn’t the standard) frameworks. JSF has come to replace Struts. EJB 3.0 is comming for Toplink and Hibernate. Duncan explained that when the standards are getting better, the frameworks will be getting thinner and thinner and finally will fade as a framework a become an implementation of the standard. Meta-frameworks are rising and will rise in the future.

One of the most enlightning things were the challenges Duncan named. He said that meta-frameworks have a few (few?) challenges ahead. One of the challenges is debugging. Debugging should be abstracted just as development is. Why should you be thrown in the framework source code when you only created a XML to configure something? You shouldn’t, Duncan formulated this very eloquently by stateing (cannot produce the exact quote but it was something like) ‘Frameworks have recognized the debugger, debuggers have yet to return the favour’. Dbuggers will have to become ’smarter’ or maintenance will be problematic.
Another challenge that we developer and i myself am constantly struggling with is State Management. At the moment the only problem i have with state management is the fact that i have a heck of a problem because users want to use that ‘back button’ in their browser. They also want to use the ‘Open in new window/tab’ functionality and have the application react correctly. With our applications it isn’t working. Fortunately the meta-framework developer has also recognized this problem and is working on it. This was one of my most pleasant surprises: They (they is Oracle here) actually have a (good) clue about the problems in facing when using their product (framework) and they are working on it!

As all presentations end, this one was also concluded with a refreshing drink and talk in the internal bar at LogicaCMG (yes, the cafeteria actually also has a small bar. Big plus for any employer)

A few collegaes and i also had the pleasure to meet Duncan before the presentation and the next day to talk about all sorts of stuff. We could talk freely about the pro’s and cons of the Oracle ADF framework and hear what Oracle is doing with it. Duncan is very knowledgable about the framework and is a real pleasure talking about it. You can really fell that he has a passion for the work he is doing and that he believes this is the right way to go.

I would like to thank Duncan again for his presentation and would recommend everybody to attent a presentation of Duncan if they can.

You can download the presentation here. It contains the slides including comments written by Duncan to explain the story fully.

PS. [shameless plug]Look at the Guru4Pro presentations. They are free to attend, you’ll like them.[/plug]

Links
Duncan Mills’s Weblog
The slides and comments of the presentation given by Duncan
Guru4Pro

— By Robert Willems of Brilman   Comments Off   PermaLink
« Previous PageNext Page »

Menu


Sha256 mining

Blog Categories

Browse by Date
August 2007
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031EC

Upcoming Events

Monthly Archives

Recent Comments

Links


XML Feeds Option


Get Firefox  Powered by WordPress

code validations
Valid RSS 2.0  Valid Atom 0.3
Valid W3C XHTML 1.0  Valid W3C CSS