Article: Building Rich Internet Applications with Naked Objects

Discussions

News: Article: Building Rich Internet Applications with Naked Objects

  1. This article discusses the need for rich clients in certain types of applications, such as expense reporting and customer-service systems. It contrasts two kinds of applications: 'transient' and 'sovereign', and shows you how to use Naked Objects to gain all of the advantages of a rich-client interface, without sacrificing the benefits of the thin-client approach.

    Read Fat is the new Thin: Building Rich Internet Applications with Naked Objects
  2. and shows you how to use Naked Objects to gain all of the advantages of a

    > rich-client interface, without sacrificing the benefits of the thin-client
    > approach.

      Well, I hope I don't break new ground if I tell you that XML UI Language (XUL) offers the best of both worlds too, that is, the best of classic desktop applications (rich widgetsets,drag&drop,offline usage,etc.) and the best of classic web applications (zero-install,cross-plattform,language-independent,rapid prototyping,etc.).

      To find out more about XUL stop by at the XUL Alliance online @ http://xul.sourceforge.net or catch the latest breaking news live from the XUL News Wire @ http://news.gmane.org/gmane.comp.lang.xul.announce

      - Gerald
  3. We certainly weren't implying that Naked Objects is the only way to achieve rich client interaction with thin-client maintenance. There are several such solutions. XUL is a laudable project.

    But you will appreciate that Naked Objects and XUL are quite different approaches. We focus very strongly on behaviourally-complete objects, such that you do not have to specify a presentation layer at all - thick or thin.
  4. Hi,
    Gerald is a guy who thinks XUL solves all presentation problems and tries to divert any forum topic on presentation to a XUL discussion. He's like he's found a hammer and every presentation problem is a nail. Therefore, I don't take him serious.
  5. Hi Gerald,

    I read at the Javalobby sometime ago that because Sun isn't willing to opensource Java, you've decided to go and implement your own VM with XUL.
    Are you sick?? Do you understand the concept of a Virtual Machine? Please help me here.

    Emmanuel
  6. To me, the most interesting aspect of this idea hasn't been talked about yet. How is it possible to create a user interface that is generic enough to handle any 'network' of objects but be useable enough to traverse, find, and view the data? By 'network' of objects, I mean the interdependencies that exist between instances. For example, object instances can exist in isolation or be chained as a linked list, or form a tree structure (like a folder hierarchy), a 2D matrix (like a spreadsheet), or even as complicated as a network of neurons. Depending on the topology, you'd probably want to display the data differently. From what I see in the sample screen shots, it looks like you can only look at one instance at a time which is a shame if you have one million objects. Some topologies lend themselves to different ways they can best be viewed and I'm skeptical about the usefulness of a generic viewer.
  7. The Naked Objects framework supports the idea of multiple, alternative visual representations of an object, or collection of objects.

    For example, any collection of objects should be viewable as a tree-hierarchy or a table. If each object in the collection implements a 'hasMagnitude' interface then that collection should be optionally viewable as a chart - giving the user the ability to control aspects of the chart just as in, say, Excel. We have had early versions of these ideas working.

    In time we hope to expand the framework to offer a broad range of these viewers. Right now we're concentrating more on building up the enterprise side of Naked Objects. But all the hooks are there for anyone who wants to extend the framework to add their own generic viewers of this form.

    In the Naked Objects book we describe one prototype application that we built for Norsk Hydro, where any collection of objects that implement the 'Spatial' interface (i.e. implement a getLongitude() and getLattitude() method would automatically give the user the ability to view that collection positioned on a geographic map background. See:

    http://www.nakedobjects.org/section52.html to view the results.
  8. I just feel you'd end up creating your own custom viewers all the time. In such a case, your framework would just get in the way. Perhaps if a default viewer is acceptable in most scenarios then your framework makes sense but I think we might disagree on the percentage of the time you'd have to create a custom viewer. In the articles, there are some metrics on creating a project with NO compared with java + Swing and a comment was made about the developer not needing to know Swing. If you need to create custom ui's frequently then you'd need to know java + Swing + how to fit it into NO framework.

    Another minor issue I have is that naked objects don't seem very naked to me. You have to 'mark up' your domain model with information about how they will be presented in the GUI. If you want to expose a behavioural method you have to go to your domain model and change the name of the method so that it starts with 'action'. You even mentioned that you need to add a 'hasMagnitude' method to your domain model objects if you want to see it as a chart. What if you wanted to display these objects differently in different applications? There is presentation information in the data object and it looks like there is tight coupling between data and 'ui hints'.

    My gut also tells me that NO attempts to take on too many responsibilities. By imposing limitations in both persistence and presentation, won't this limit the framework's applicability? How about separating both of these features. For example, I would refuse to use NO if it saved my objects using java's default serialization mechanism, so I'd miss out on the auto-gui-generation feature. And what strategy do you have for versioning persisted objects?
  9. You seem to be very wedded to the belief that customised UIs are always going to be necessary. You don't like the fact that with Naked Objects you need to add a single word 'action' to a method in order for it to be auomatically rendered visible to the user, but you seem happy with the idea of writing a completely customised UI. We aet out to challenge this line of thinking. We certainly don't believe that Naked Objects is viable for all applications. But we have proven that it can be highly effective in lots of situations where the developers had previously held beliefs similar to yours. I recommend you try it out.
  10. I agree with this opinion. Generated GUI will not solve all UI needs. However it is not say non-GUI should be generated, espcially with the primitive UI generator shown in this article. A powerful GUI generator will indeed solve many UI problems, just not all.

    The other big problem with these series of articles is that it diverges, starting from the second article, from the topic of domain-model UI generation into uninteresting and seemly irrelevant debates on platform interoperability, thin-vs-thick clients etc. These are at best implementation details of a particular system using this idea.
  11. Ooh... an error with my previous reply:
    ... Generated GUI will not solve all UI needs. However it is not say non-GUI should be generated, espcially with the primitive UI generator shown in this article. ...
    I mean: Generated GUI will not solve all UI needs, espcially with the primitive UI generator shown in this article. However it is not to say "no GUI should be generated." ...
  12. I understand that NakedObjects will create a database design from an object design but what if you can't throw away your existing database schema because applications are already using it ?

    The documentation says you can build mapping classes to connect the business objects to the database.

    I would like to hear comments from anyone who has done this.

    What approach did you take and were there any pitfalls ?

    Thanks,
    Richard
  13. Can I recommend that for a specific query about experience of using Naked Objects you might like to post it onto the Naked Objects newsgroup, which you can access from nakedobjects.org I know that there are people on that newsgroup who have done what you are asking about.

    Richard