Hi!
To give you a better picture of my problem, let me describe my current situation. I have a desktop application, and I want to start developing a web application, as a replacement. There's a few things in the code base of our desktop application that would be nice to port. This thread is about one thing:
-- To give you a better picture of my problem, let me describe my current situation. I have a desktop application, and I want to start developing a web application, as a replacement. There's a few things in the code base of our desktop application that would be nice to port. This thread is about one thing:
(B is basically any DTO/domain object/whatever you call it)
interface BusinessObjectDao<B> {
B load(Serializable identifier);
void save(B object);
void delete(B object);
}
interface CustomerDao extends BusinessObjectDao<Customer> {
}
class CustomerDaoImpl extends AbstractBusinessObjectDao<Customer> implements CustomerDao {
}
This makes it VERY nice to abstract away the common code for all different editors (views in the desktop application, that for example lets you edit a business object). Most of the business object editing editors are all very much alike. I want to do something similar in GWT. But instead of DAO's, it would be GWT Services. Something like this:
interface BusinessObjectService<B> extends RemoteService {
// Same as above
}
interface CustomerService extends BusinessObjectService<Customer> {
}
class CustomerServiceImpl extends AbstractBusinessObjectService<Customer> implements CustomerService {
}
However, since we get auto-generated Async interfaces that we work with, this doesn't let me work with the base interface, as I would like. I would like my generated code to look like this:
interface BusinessObjectServiceAsync<B> {
void load(Serializable identifier, AsyncCallback<B> callback);
void save(B object);
void delete(B object);
}
interface CustomerServiceAsync extends BusinessObjectServiceAsync<Customer> {
}
Is it possible to make this happen? Change how the auto-generated code is done? I. e. if the service interface extends another interface, have the Async interface extend the other interfaces generated Async interface. Also generate no Util class for the "base" interface.
Thanks in advance!
// Anton
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment