What’s cooking in the project?

Maybe somebody could have tought that Ammentos project was freezed, or maybe abandoned because, I see, an unusual time delay has passed since last official release 1.3.7.
Instead, not only the project is still absolutely alive, but it’s growing very quick, and so let me anticipate some of the important news about the present and the next future.
(more…)
Add comment June 1, 2009
Over 5000 downloads!

I am very proud to announce (with a little of emotion) that Ammentos has been downloaded more than 5000 times since its start in the April of 2005.
This big result has been reeched this weekend; i was expecting for it to happen in the next month, but an unexpected, sudden growth of contacts (which currently I cannot explain) has made it possible much before that date.
Thank you very much to all programmers that make all this possible, that still think lightweight, that fight everyday my same battle against overweight and polluting software
5 comments February 16, 2009
The KISS WebApp Framework? Maybe I found it!
“Sometimes Less is More”. This is the slogan of SLOTS, a templating framework for servlets and JSP. “However, ‘framework’ isn’t entirely accurate, unless you consider 2 class files a framework”, said its author. Yes, incredible, a framework composed by two classes, and yet very flexible. No XML at all, just one .properties file à la old manner.
The framework is composed by a servlet to map into web.xml file, for handling the requests, and a wrapper which performs the templating work. The base concept is that pages content are wrapped into templates before being returned to the browser. Templates can be referred each other into the simple configuration file, allowing lots of possibilities.
And what if you actually need more? Well, are you actually a Java programmer? Take the source code and write down your changes; with SLOTS you can
And finally, do you want a KISS servlet container as well? See Simple, a Java based HTTP engine. Its name says everything!
2 comments January 28, 2009
Showing query results within a JTable
One of the most boring and error prone operations to do while writing desktop applications with database access is to show query results into a JTable. Here’s a simple EntityTableModel that can be used every time you need to need to do so, if you are using Ammentos.
Add comment January 26, 2009
Ayudu: supporting customers, the kiss way

I have many reasons to talk about this topic. Ayudu is a new customer support service and realtime traffic monitor for the web, built in Java.
The first one is that the persistence layer of this software is based on Ammentos.
Add comment January 19, 2009
Boring bug with large files in NetBeans
While working with a very big file (>> than 2k rows) for Ammentos with NetBeans 6.5, on Ubuntu 8.10 I was getting a strange problem. The source document looked like in the image below:

The solution is to update <netbeans_home>/etc/netbeans.conf as explained here.
6 comments January 14, 2009
Is OpenSource betraying its principles?
This morning, driving to my office, I was thinking about what George Orwell could have written if he was currently alive.
Sometimes I feel like the “last man” of his 1984’s novel, under the government of the OpenSource Big Brother. The OBB always told me that we were fighting an epic war against the horrible army of the Commercial enemy. We were the pure, we brought salvation to people oppressed by the big companies, brandishing the new flag of a completely new idea of Software.
Add comment December 15, 2008
PersistenceList and PersistenceMap: new syntax proposal for composite primary key support
So far Ammentos’ support for this composite primary keys has been limited, so that currently is not possible to use Persistent Entities declared this way into one-to-many relationships, for instance as items into a PersistenceList.
Maybe I’ve just found a simple way to complete the support for composite primary keys. I’m still working on that and I’ll write about it when it will (hopefully) be ready.
At the moment I am just wondering about the new mapping syntax to adopt while declaring PersistenceLists (and PersistenceMaps). I’d like to make the change the most little as possible. Here’s my proposal:
@PersistentList(query="invoice_id=? and year=?")
private List<Item> m_invoiceItems;
I think the syntax is pretty good but what about keys ordering? Should I parse the query and accept any usage or just assume the order must be the same as in the class declaration, similarly to the Ammentos.load(Class, Object … ) method?
I honestly think the second idea is the best because:
1) It is coeherent with the rest of the api
2) It lets the user free to make the query as he wants without worring about which names to use in his sql code. For instance, the query can be executed into a view with differently specified field names.
If you have any suggestions please write me or put a comment below.
Add comment November 26, 2008
Dependencies can seriously disturb sleep
Code reuse has ever been one of the most famous principles in programming.
When I started learning Pascal, my teacher always repeated I had to write my code thinking about the future. Right now, when I model a new library, I think at the best way to give it the longest life I can. I try to imagine how many times I’ll need this library, how many environments I’ll put it inside, how many “younger” code would be able to trust on it.
Now, which is the best way to ensure long life to your code? I honestly don’t know anything better than reduce dependencies.
Add comment November 21, 2008
Queries, the shortest way
Following a recent suggestion by an user Ammentos 1.3.5 introduced a new interesting feature: method chaining into SqlQueryFilter class. This allows a more concise syntax for loading objects, with no need to declare temporary SqlFilters objects.
With previous versions to load a Person object you had to write all this code:
SqlQueryFilter sql = new SqlQueryFilter("name=? and surname=?");
sql.setString("Alan");
sql.setString("Ford");
Person p = Ammentos.loadUnique(sql);
Here’s below the new, single statement syntax:
Person p = Ammentos.loadUnique(Person.class, new SqlQueryFilter("name=? and surname=?")
.setString("Alan").setString("Ford"));
This is possible because now any setXXX() method returns the SqlQueryFilter itself, similarly
to Java’s StringBuffer class.
A simple but nice and, mostly important, KISS idea. Thanks to Florin for his suggestion
1 comment October 10, 2008
