Posted by Martin Homik | Posted in ActiveMath, Software | Posted on 23-10-2007
2
A nice way to embed ActiveMath items, for instance in a blog, is to use ClipMarks. Get an account and install the Firefox/IE plugin. Then go to any web site, press the ClipMarks button, and select any span or div item on the web site. A tiny menu on the top will be presented from which you can select an action. Choose “Blog” and a popup windows opens asking you for some information. I send my clipmarks to my WordPress based blogs. Unfortunately, WordPress has the feature to push any entry through a set of filters which cause an autoinsertion of paragraph and linebreak tags. So, to get the content right, you have to:
- Install the WP Unformatted plugin
- Add ActiveMath specific css definitions
See how great this is!
Posted by Martin Homik | Posted in Java, WebApp | Posted on 12-10-2007
0
This one made me laughing!!!

Posted by Martin Homik | Posted in Java | Posted on 12-10-2007
0
In the past weeks, I have been working with the application framework AppFuse and I highly appreciate its usage of annotations. They help to create a databasae schema and hibernate mapping files automatically which speeds up development of applications.
So far, I sticked to the JPA standard, because I wanted to stay as much independent of a specific persistency framework as possible. I wanted to keep the option to change from one framework to another at a later point or to compare efficiency of different persistency frameworks.
The other day, I came across a typical problem and got frustrated, because JPA does not provide a solution for that. Here is the scenario: assume you have a class “Thing” which holds only a label. Then you have a class “Relation” with properties “source” and “target”, basically you want to express relations between arbitrary things.
A typical database problem is referential integrity caused by delete actions. In our scenario, two cases can occur:
- You delete a relation and you want to delete all referenced things as well.
- Upon deleting a referenced thing, you also wantt o delete the relation as it is not valid any more.
While JPA solves case 1 by CascadeType.REMOVE it does not offer support for case 2. And this is really frustrating as this case a very common problem and the action can be even triggered on the SQL level whic means that you do not even need a persistence layer for that. Hence, I dropped my goal to be as general as possible and not to commit to a specific persistence framework. I chose Hibernate as this is a well-known framework. To solve case 2 I only needed to add the @OnDelete annotation and specify an action. Hibernate translates the annotation into a SQL create statement. In principle, it does not do any calculation itself. A convenient and quick solution.