I’ll be speaking on the upcoming ZK user group conference in Mannheim, Germany on December 6th, 2011 (what’s ZK?).
If you enjoy developing rich internet applications with the power of Java, I highly recommend to be there.
If you want to join, just sign up for the event on zkoss.orgfor free and see three exciting presentations including ones from ZK head Timothy Clare and me.
Also, this is a great opportunity to meet other ZK developers and share some ideas and latest news in the community.
As a little teaser, here is the title sheet for my presentation.
Thank you Steve Jobs for many years of inspiration and for teaching me that one must have faith in his own ideas, beliefs and dreams so they become reality.
Your visions accounted for what I am today and what I believe in. Thank you.
My last girlfriend was sometimes a little weird. Whenever she paid me a visit, she entered my apartment, gave me a kiss and then started checking her email on my computer.
One day I was able to observe her doing that. From what I saw, she had 2 email accounts. One from college and another one for her private emails.
So, whenever she wanted to check her email, she had to log in to two webmail interfaces.
That was the point when I thought: “Couldn’t that be done easier?”. A “true” email client like Thunderbird or Outlook, but in the browser, so one could always and anywhere check emails without having a locally installed client. All email accounts should be at one place and the whole thing should support rich UI capabilities like drag ‘n’ drop and such to easily copy or move emails between or within accounts.
That was the day when the idea of smampi.com was born.
3 years later after I graduated from the University of Ulm, with a “very good” diploma in Media Computer Science, and working in various companies like IBM Germany or Wilken, I founded Kengle Systems, the company behind Smampi.
In various forums I found out that there seems to be a high demand for a true email client for the web. After googling around for a while, I couldn’t find anything similar to what I had in mind.
Also, being a big fan of Google Chrome and Chrome OS, I thought, if Chrome OS is an operating system for the web, shouldn’t there be a real email client for it? Gmail is neat but it has a badly designed UI and one cannot separately manage multiple email accounts. The only option is to import these right into the current gmail account where they’ll mix up with all the other emails and many users (including me) don’t want that.
So, I started working on Smampi by investing into technology (ZK framework, Hetzner servers) and design (dryicons). Smampi’s logo (which you can see above) alone cost 300$ but it was definitely worth it. Today, 9 months later, Smampi is in open beta stadium and has already almost 1000 new users after only 1 month. That’s actually quite good for such a new, unknown product. And the numbers keep growing every day.
New: Dropbox for Smampi
Yesterday we released a new feature for Smampi: Dropbox support, which enables the user to share files between emails and Dropbox. Make sure to check it out on www.smampi.com or watch the video below:
If you suddenly experience problems callling set.remove() and set.contains() on your Java Set instances, you might be using Hibernate, which replaces your Set instance with its own version (PersistentSet), which uses a HashSet internally to store your data.
For example, the problem I faced was the following:
Person.java
public class Person(){
String _name;
public Person(String name){
_name = name;
}
@Override
public String toString(){
return _name;
}
@Override
public int hashCode(){
if (_name != null) return _name.hashCode();
return -1;
}
}
MyTestApplication.java
public class MyTestApplication{
public static void main(String[] args){
Person steve = new Person("Steve");
Set persons = new Set();
persons.add(steve);
System.out.println(persons);
boolean contains = persons.contains(steve);
System.out.println(String.valueOf(contains));
persons.remove(steve);
System.out.println(persons);
for (Person person : persons){
System.out.println("Contains: " + person.toString());
}
}
}
The code above prints the following to the console:
[Steve]
false
[Steve]
Contains: Steve
This definitely was not expected.
The reason: If you call set.remove(obj) or set.contains(obj), the internal HashSet will automatically call obj.hashCode() and use the returned value to search for obj.
Normally, this works without any issues, but there is one case where it doesn’t and that’s when:
For me, a solution was to not override the obj.hashCode() method.
Since this is not a solution for all cases, I recommend to follow the link above and read through the comments. There are quite some workarounds described there. I’m sure one of them will work for you.
Good luck, soldier.
(God, Hibernate! I officially hate you now. It took me a whole day to find the reason for this issue).
Ok, this just took me a while to figure out so I thought I’d share it here.
If you have a boolean variable that follows the naming convention “isValue” (e.g. boolean isPerson = false;), then the according mapping file property name may not include the “is” part of the name, for example:
<property name="person" column="is_person" />
Otherwise, Hibernate throws some weird Exceptions.
In my case it was:
Initial SessionFactory creation failed.org.hibernate.InstantiationException: could not instantiate test object FOO
Caused by org.hibernate.InstantiationException: could not instantiate test object BAR
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.NoClassDefFoundError: Could not initialize class BAR
Hint: Inside your Java class, the following conventions must be used for getter and setters:
public boolean isPerson();
public void setPerson();
Recent Comments