2012-10-27

Ujorm 1.30 released

After a long pause I would like to introduce a new version, Ujorm 1.30, with several important changes in the API - in the first place I should mention that the original interface called UjoProperty was renamed to Key. The original interface is kept as @Deprecated now, however, its implementation classes remain. The reasons for the change are the following:
  • the original interface name UjoProperty was a little confusing due his immutable features and it was sometimes difficult to explain its meaning. The new name reflects the parameter names of the common interface java.util.Map.
  • the original name was too long and therefore the source code was difficult to read
  • several new classes have been created recently and it was useful to make the decision quickly. Particularly there are two new classes, KeyRing and KeyFactory.

The new KeyRing object is a serializable collection of Keys. Know that any instance of the Key is not serializable directly because it must have a unique instance in the class-loader. Yet sometimes we need to serialize some Keys, and the KeyRing can be the right solution. An example of this real use can be a use with the Wicket framework.

The second class is called KeyFactory and is used to create new instances Keys. An advantage of the factory is that it can also be used to create static Keys in an interface. The factory can create the Key name according to its field name, optionally the name can be converted to camel-case. Now there is no need to send the key’s data type as a parameter when creating it because this framework can obtain the value from the meta-model of the field when the factory is locked (or when the getKeys() method is called for the first time). Each Key contains a new attribute with its domain class now. An example of the use:

public class Person extends AbstractUjo {
private static final KeyFactory f = newFactory(Person.class);
   
public static final Key<Person,String > NAME = f.newKey();
public static final Key<Person,Boolean> MALE = f.newKey();
public static final Key<Person,Double > CASH = f.newKey();
   
@Override public KeyList<?> readKeys() {
    return f.getKeys();
}
}

The Ujorm framework offers a new, simplified key called WeakKey, which does not have a generic domain parameter. It can be used instead of constants for working with Map, List objects, or for reading parameters from the HttpRequest object, where it converts to the desired data type. The instance is created using the WeakKeyFactory class.

Ujorm can be connected with a Maven project using:

<dependency>
    <groupId>org.ujorm</groupId>
    <artifactId>ujo-core</artifactId>
    <version>1.30</version>
</dependency>


in case of use of the ORM module use:

<dependency>
    <groupId>org.ujorm</groupId>
    <artifactId>ujo-orm</artifactId>
    <version>1.30</version>
</dependency>


To use UJO objects in Wicket framework, an implementation of the KeyModel class is necessary. The KeyModel class is similar to the standard implementation of a Wicket class called PropertyModel. The class can be joined using the following depenency:

<dependency>
    <groupId>org.ujorm</groupId>
    <artifactId>ujo-wicket/artifactId>
    <version>1.30</version>
</dependency>

The Wicket-support module does not contain a wide range of services, yet I am enclosing a simple example of creating a simple table for inspiration:

List<ICellPopulator> columns = KeyPopulator.list
    ( Employee.ID
    , Employee.FIRSTNAME
    , Employee.LASTNAME
    , Employee.ADDRESS.add(Address.CITY)
    );

final WebMarkupContainer table = new WebMarkupContainer("table");
final DataGridView grid = new DataGridView("gridPanel", columns,
     new  InnerPeopleProvicer());
table.setOutputMarkupId(true);
grid.setItemsPerPage(20);
add(table);
table.add(grid);
add(new AjaxPagingNavigator("tableNavigator", grid));


I apologize for significant API changes to all users of the Ujorm framework, however, all the chages are necessary for further development of this library.

Further information can be found in:

2011-11-06

Ujorm 1.21 released

The release notes:
  • Java 7.0 is supported now
  • native SQL query can be used in the run-time on demanding requirements
  • direct support for the Slf4J Logger framework
  • slightly extended API for an easier use
  • new special interface to store binary content to a BLOB
  • new abstract class (OrmTableSynchronized) is available for the safe use in a multi-thread environment
  • many other extensions is implemented and
  • small bug fixing for some dialects and some minor other bugs are fixed

More information can be found on the Release notes.

2011-06-14

Ujorm 1.20 released

The release notes:
  • the project have changed a domain to the new: http://ujorm.org/
  • batch features are implemented for the SQL statements INSERT and UPDATE
  • there is possible to require only selected columns on the SELECT statement for better performance
  • the SELECT statement supports the key word: DISTINCT
  • each table can be marked to a READ-ONLY by a new parameter in the annotation @Table
  • the documentation Ujorm User Guide is extended and new samples are done
  • new reverential projects are published on the home page
More information can be found on the Release notes.

2011-02-06

Ujorm 1.10 released

The release notes:
  • dialect for the database MS-SQL is implemented thanks to Tomas Hampl from company Effectiva
  • new Native Criterion is implemented with an SQL expression to use on Ujorm query
  • new annotation @Comment can be used to describe database tables or columns
  • documentation Ujorm User Guide is extended
  • new performance test with the database H2 is published
  • no major bug was discovered
More information can be found on the Release notes.

2010-10-20

Ujorm 1.00 released

I would like to announce that the ORM framework Ujorm 1.00 has been released. The open-source framework was designed for the rapid Java development based on a relation database and the framework provides a type-safe API for database queries so the most of typing errors are detected before running the application. Developer can take an advantage of a code-completion in their favorite IDE at coding time.

The Ujorm has implemented a lot of changes that have been designed on the desire of developers of real applications in the last year. Important features include:
  • session and transaction management by the Spring framework
  • optimized performance and extended API
  • new documentation
  • positive feedback from the production deployment

A development of several new projects based on Ujorm is on the way. The message from the developers added: "We have gained a good experience with the Ujorm and we plan other projects with it!"

Related links:

2010-10-18

The Ujorm development Interview

The Ujorm ORM framework has been installed on a production environment. I mediate to you an interview about the experience in developing and deploying an application built on Ujorm with the consent of the company's technical director.

Q: Hallo Radek, can you say a few words about yourself?
A: Hi, my name is Radek Majer, and I am Technical Director at Effectiva Solutions s.r.o., which deals mainly in software development. My hobby is playing ice hockey.

Q: Can you introduce your application eCall based on Ujorm?
A: The eCall is a complete software for advanced call center, thus it is not just a single application. The heart of the solution certainly is an aplication communicatingwith a PBX (Private branch exchange?) based on Ujorm. The purpose of this application is critical, system run depends on it, frequently constantly 24/7 and that is why is called the heart.

Q: What was your role in the project?
A: I am responsible, among others, for appropriate use of technology, not only in our company but also in other realised projects. Developers mostly prefer interesting or popular tools againstthe effective ones. It is necessary toprovide give them some latitude, but on the other hand, insist on a pragmatic solution.

Q: Why did you used Ujorm in place of a standard ORM framework?
A: I haveoften heard complaints of Hibernate from developers. Development in this ORM was far from effective development despite of all amenities offered by Hibernate. First of all, we looked at the problem of bad use, but we collectively came to the conclusion that the whole framework is just too complicated and on a large project is overly expensive for maintenance of stable ORM layer. Therefore, we searched for a simple alternative, and after considering all candidates we have chosen Ujorm.

Q: How many database tables does this application use?
A: Dozens. However, the number of records this application is dealing with is much more interesting. Imagine 50 operators who are using the application in real time. For processing the statistics are converted millions of records.

Q: Can you make publish any statistics in a real application workloads?
A: Exact numbers are not available, but the real need have shown even higher than primary estimates. We have not forced down any delays at the ORM layer. Ujorm deals with stress excelently.

Q: What problems have you solved using Ujorm?
A: The need the UJO use as Business ObjectsEveryone is now accustomed to use the POJO and UJO are just different. However, the benefits of the UJO architecture this initial reluctance have fully overcame.

Q: Has Ujorm brought any benefits to your project?
A: Yes, I have to say that the benefit is not only faster development, but especially much better maintainability of the product further into the future.

Q: Will you use the Ujorm into your new projects?
A: Yes, we have no particular reason to go back to Hibernate.

Q: What would you say to developers who are considering about using the Ujorm?
A: Think :)
Q: Thank you for the interview.

2010-08-08

jWorksheet domain

The jWorkSheet is available on a new domain: http://jworksheet.ponec.net/ . In case you have a problem with the Lite version of jWorkSheet, modify you local JNLP file by the new content:


<?xml version="1.0" encoding="utf-8"?> 
<jnlp 
  spec="1.0+" 
  codebase="http://jworksheet.ponec.net/" 
  href="file.jnlp"> 
  <information> 
    <title>JWorkSheet</title> 
    <vendor>Pavel Ponec</vendor> 
    <homepage href="."/> 
    <description>...</description> 
    <description kind="short">...</description> 
    <icon href="logo.png"/>
    <icon kind="splash" href="logo.png"/> 
    <offline-allowed/> 
  </information>
  <security>
      <all-permissions/> 
  </security>
  <resources> 
    <j2se version="1.5+" max-heap-size="32m"/> 
    <jar href="jWorkSheet.jar"/>
    <jar href="lib/UJO.jar" />
  </resources> 
  <application-desc 
      main-class="net.ponec.jworksheet.gui.JWorkSheet"> 
     <argument></argument>
  </application-desc> 
</jnlp> 


The JNLP file can be found on the Windows XP in directory:
C:\Program Files\jWorkSheet\file.jnlp

The small bug will be fixed in the next release, probably in September.