672329 members! Sign up to stay informed.

Sponsored Links


Resources

Enterprise Java
Research Library

Get Java white papers, product information, case studies and webcasts

News News News Messages: 16 Messages: 16 Messages: 16 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

UJO Framework 0.80

Posted by: Pavel Ponec on September 08, 2008 DIGG
The UJO Framework was extended to version 0.80:
  • the new interface UjoExt is available for a better comfort to developers. The interface supports a chaining of properties or setters for example
  • optimized deserialization of UJO objects, which is now faster as JAXB 2.1
  • simplification of some methods by a new interface UjoAction

UJO Framework provides objects with a different architecture from JavaBeans. The original idea was a toy with generic data types of Java 5.0 however over time it appears, that the architecture has some exciting features:
  • an easy object introspection without a heavy PropertyDescriptor implementation
  • a transfer of the UJO object properties (not values) by a collection
  • the core of the building has two interfaces for an easy implementation

These properties open up new possibilities for the use in the J2EE mainly in a production of generic operations over objects. Framework contains some tools for managing the UJO object in addition. See a short motivational presentation for more information:

http://ujoframework.org/presentation/

You can find a link to a reference application called jWorkSheet on the home page. The jWorkSheet is a project time tracker application and uses the architecture UJO objects consistently for all persistent objects.

I welcome all feedback and comments.

Threaded replies

·  UJO Framework 0.80 by Pavel Ponec on Mon Sep 08 15:46:48 EDT 2008
  ·  Re: UJO Framework 0.80 by Martin Straus on Tue Sep 09 10:06:28 EDT 2008
    ·  Re: UJO Framework 0.80 by David Soroko on Tue Sep 09 10:16:18 EDT 2008
    ·  Re: what problem to solve? by Pavel Ponec on Tue Sep 09 11:00:23 EDT 2008
      ·  Re: what problem to solve? by David Soroko on Tue Sep 09 11:18:43 EDT 2008
        ·  Re: That is a concise description which is missing ... by Pavel Ponec on Tue Sep 09 11:39:42 EDT 2008
          ·  Integration by James Cook on Tue Sep 09 12:19:03 EDT 2008
  ·  Re: UJO Framework 0.80 by Rubem Azenha on Tue Sep 09 10:46:28 EDT 2008
    ·  Re: Why person.setName("name") is better ... by Pavel Ponec on Tue Sep 09 11:13:12 EDT 2008
      ·  Re: Why person.setName("name") is better ... by Rubem Azenha on Tue Sep 09 16:34:54 EDT 2008
        ·  Re: Why person.setName("name") is better ... by Pavel Ponec on Tue Sep 09 17:37:33 EDT 2008
          ·  Re: Why person.setName("name") is better ... by Tomi Tuomainen on Wed Sep 10 01:50:25 EDT 2008
          ·  Why person.setName("name") is better ... by Giovanni De Facci on Wed Sep 10 07:42:34 EDT 2008
            ·  Re: Why person.setName("name") is better ... by Pavel Ponec on Wed Sep 10 10:33:24 EDT 2008
              ·  Re: Ujo implementation by Pavel Ponec on Thu Sep 11 01:09:32 EDT 2008
  ·  Why not annotations? by Antonio Gomes on Tue Sep 09 21:48:03 EDT 2008
    ·  Re: Why not annotations? by Pavel Ponec on Wed Sep 10 01:26:51 EDT 2008
  Message #268153 Post reply Post reply Post reply Go to top Go to top Go to top

Re: UJO Framework 0.80

Posted by: Martin Straus on September 09, 2008 in response to Message #268104
And what problem or issues does this framework aim to solve?

  Message #268155 Post reply Post reply Post reply Go to top Go to top Go to top

Re: UJO Framework 0.80

Posted by: David Soroko on September 09, 2008 in response to Message #268153
The problem of lack of "non-traditional object architectures different from JavaBeans".

  Message #268157 Post reply Post reply Post reply Go to top Go to top Go to top

Re: UJO Framework 0.80

Posted by: Rubem Azenha on September 09, 2008 in response to Message #268104
Why

person.setName("name")

is better than

person.set(Person.NAME, "name");

???

  Message #268158 Post reply Post reply Post reply Go to top Go to top Go to top

Re: what problem to solve?

Posted by: Pavel Ponec on September 09, 2008 in response to Message #268153
For example: you have got objects with facilities similar like PropertyDescriptor created by a very small effort.

  Message #268161 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Why person.setName("name") is better ...

Posted by: Pavel Ponec on September 09, 2008 in response to Message #268157
The next notation is not simpler of course:
> person.set(Person.NAME, "name")

however the UJO object architecture can be valorized simple by a generic tools without coding an PropertyDescriptor(s).

  Message #268162 Post reply Post reply Post reply Go to top Go to top Go to top

Re: what problem to solve?

Posted by: David Soroko on September 09, 2008 in response to Message #268158
Ok, the framework addresses the difficulty of creating "PropertyDescriptor like facilities".

That is a concise description which is missing from the original post. This kind of statement allows people to quickly decide if they wish to dig deeper or move on to other things.

  Message #268164 Post reply Post reply Post reply Go to top Go to top Go to top

Re: That is a concise description which is missing ...

Posted by: Pavel Ponec on September 09, 2008 in response to Message #268162
Ok, but it is a one feature only which opens a way to more unique solutions include quick serialization or a simple JTable support for example.

  Message #268166 Post reply Post reply Post reply Go to top Go to top Go to top

Integration

Posted by: James Cook on September 09, 2008 in response to Message #268164
I think this is a valuable design choice with the advent of more "property-based" datastores like S3/SimpleDB and BigTable.

One hole to plug is a way to navigate the new bean format from an EL. If your JSP page issues employee.address.zip, you will want to be able to handle that call without some kind of adapter layer.

But using it from something like Wicket which doesn't have an EL would allow for extremely quick development cycles if your stack includes BigTable or SimpleDB.

-- jim

  Message #268177 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Why person.setName("name") is better ...

Posted by: Rubem Azenha on September 09, 2008 in response to Message #268161
The next notation is not simpler of course:
> person.set(Person.NAME, "name")

however the UJO object architecture can be valorized simple by a generic tools without coding an PropertyDescriptor(s).


Let me see if I understood.
If I use this framework I'll have to make my objects extends from a MapUjo (a class from the framework). Doing so I won't have do code an PropertyDescriptor.

Come on, is this the major advantage of the framework? I'll have to kill my POJO architecture because of this?

Itīs 2008, you know... frameworks shouldn't obligate developers to extend their bussiness object from a crazy framework class.

Surprise me if I'm wrong :)

  Message #268184 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Why person.setName("name") is better ...

Posted by: Pavel Ponec on September 09, 2008 in response to Message #268177
If I use this framework I'll have to make my objects extends from a MapUjo
Yes, it is the easiest way, however you can implement an Ujo interface (just one implementation to your parent e.g.)
Come on, is this the major advantage of the framework?
This is a major feature. Advantages starts, if you works over the object:
  • copy all or selected attributes from source to new object by a one statement (method)
  • clone the object by a selected depth
  • create a generic comparator
  • find a property by its text name
  • write a value by the found property to an another object or a collection of objects
  • restore a default value of the property
  • easy text conversions of the properties
  • simplified work with an arrays (you can't initialize array before add method e.g.)
  • generic toString() method for easy debugging
  • easy visualization of UJO object(s) by JTable
  • easy persistence of ujo to different formats
  • and many, many more ...

I'll have to kill my POJO architecture because of this?
Oh no! See a simple solution.
Itīs 2008, you know...
OK :-)
frameworks shouldn't obligate developers to extend their bussiness object from a crazy framework class.
Surprise me if I'm wrong :)
OK, I try it by the next simple solutions:

  Message #268189 Post reply Post reply Post reply Go to top Go to top Go to top

Why not annotations?

Posted by: Antonio Gomes on September 09, 2008 in response to Message #268104
While I see some cases that benefit from using this lib I sincerely don't think it's worth all the effort. If I understood correctly the motivation, why a simple POJO with a bunch of custom annotations is not enough? Things are already too complex to add another layer...

  Message #268193 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Why not annotations?

Posted by: Pavel Ponec on September 10, 2008 in response to Message #268189
... why a simple POJO with a bunch of custom annotations is not enough?
Annotations are excellent thing but I'm afraid that the one can't replace the UJO architecture.
Things are already too complex to add another layer...
This is a great truth.
However, I believe that will happen gradually new tools for the development on the UJO architecture.

  Message #268194 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Why person.setName("name") is better ...

Posted by: Tomi Tuomainen on September 10, 2008 in response to Message #268184
OK, I try it by the next simple solutions:


You don't need to recreate JavaBeans model to have a simpler JTable. See http://www.sourceforge.net/projects/tikeswing and YTable that shows a collection of JavaBeans in a table without writing table models.

And these standard JavaBeans can be used as EJB 3.0 entity beans (+ many other frameworks). So I don't see any reason to model my business some other way and end up creating convertors to JavaBeans because of persistence, xml-mapping etc. framework

  Message #268208 Post reply Post reply Post reply Go to top Go to top Go to top

Why person.setName("name") is better ...

Posted by: Giovanni De Facci on September 10, 2008 in response to Message #268184
>>>> I'll have to kill my POJO architecture because of this?

>> Oh no! See a simple solution.

Yes but the solution implies that my POJOs should extend BeanUjo or MapUjo, or am i missing something?

  Message #268223 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Why person.setName("name") is better ...

Posted by: Pavel Ponec on September 10, 2008 in response to Message #268208
... the solution implies that my POJOs should extend BeanUjo or MapUjo, or am i missing something?

Yes, an extension is the easiest way, however you can implement an Ujo interface (just one implementation to your parent e.g.). See the next sample.

  Message #268247 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Ujo implementation

Posted by: Pavel Ponec on September 11, 2008 in response to Message #268223
A link to the Ujo implementation sample one more:
http://ujoframework.org/#ujoimpl

New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com

Dependency Injection in Java EE 6 - Part 2

Reza Rahman continues to explore the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (January 21, Article)

Ted Neward Q&A: What you must know about JavaScript, Scala and more

Ted Neward is an independent consultant specializing in high-scale enterprise systems, and an authority in Java and .NET technologies. He is the author and co-author of several books, including Effective Enterprise Java. At TheServerSide Java Symposium in March, he will be presenting sessions on pragmatic architecture, ECMAScript and Scala. (January 15, Article)

Developers split on open sourcing Java

Now that Oracle is absorbing Sun Microsystems, there mixed views on what should come of the Java Community Process (JCP). While some say Oracle should become the new steward of Java and keep the JCP much as it was, others argue that it may be time to open-source this widespread language. (November 24, Article)

Dependency Injection in Java EE 6 - Part 1

Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (November 2, Article)

SAML: It's Not just for Web services

SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options. (September 28, Article)

Programming is Also Teaching Your Team

Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team. (September 22, Article)

Can Java EE Deliver The Asynchronous Web?

Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies. (July 14, Article)

JSF Flex

JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags. (June 29, Article)

The Rules of SOA - A Road to a Successful SOA Implementation

In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project. (June 23, Tech Talk)

Ari Zilka Talks About Terracotta 3.1

Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now. (June 15, Tech Talk)

Enterprise Application Integration, and Spring

In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements. (June 15, Tech Talk)

Google Web Toolkit: An Introduction

In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls. (June 4, Tech Talk)

Just Enough Early Architecture to Guide Development

Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable. (May 28, Tech Talk)

Productive Programmer: On the Lam from the Furniture Police

This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work. (May 26, Tech Talk)

Auto-Scaling Your Existing Web Application

Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers. (May 21, Tech Talk)

Automating Hibernate Mapping and Queries For Java Web Development

Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application. (May 19, Article)

Free Book PDF Download: Mastering EJB Third Edition

Mastering EJB was one of the original and most influential EJB books in the industry. Mastering EJB III now returns with two new expert co-authors, updated for EJB 2.1 and 30% new chapters including security, integration, best practices, open source, and more.
(Book PDF Download)

Application Server Matrix

The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
Java Solutions
All Content Copyright ©2007 TheServerSide Privacy Policy
Site Map