Archive

Archive for the ‘ammentos’ Category

Ammentos guide now available in serbo-croatian language

March 26, 2013 Leave a comment

Thanks to Anja Skrba from Webhostinggeeks.com, the Ammentos user guide is now available also in Serbo-Croatian language.

Great work Anja!

The new web site is online!

September 21, 2009 Leave a comment

Screenshot

As promised 🙂

www.ammentos.org

Categories: ammentos, ddpole, java Tags: ,

Finally a top level domain for ammentos

September 7, 2009 2 comments

Ammentos has finally a top level domain: www.ammentos.org .

A completely new website is under construction as well. It wil be ready for the end of September 2009. Stay tuned!

What’s cooking in the project?

June 1, 2009 Leave a comment

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.

Read more…

Over 5000 downloads!

February 16, 2009 6 comments

tmp

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  🙂

Showing query results within a JTable

January 26, 2009 3 comments

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.

Read more…

PersistenceList and PersistenceMap: new syntax proposal for composite primary key support

November 26, 2008 Leave a comment

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. 🙂

Dependencies can seriously disturb sleep

November 21, 2008 Leave a comment

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.

Read more…

Queries, the shortest way

October 10, 2008 1 comment

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 😉

Ammentos running on OSGi!

May 22, 2008 Leave a comment

One of the best things of my job is when one of my projects starts walking on his own feet.

I received a great email yesterday from an enthusiast Ammentos user about his experience running Ammentos into an OSGi environment. I asked him the permission to publish his email on my blog. Here it is.

Read more…