Re: Cayenne code generation - pointers requested

2010-02-02 Thread Mike Kienenberger
I've written a great deal of templates (generated entire CRUD web apps straight from the model in struts and JSF) which I run from ant cgen, but I can't make them available. If you post specific questions, I can answer them. Basically, you need to choose whether you want to generate one file per

Re: Cayenne code generation - pointers requested

2010-01-28 Thread Adrian Wiesmann
Thanks Andrus. The cgen docs explain the process but the code pointers are going to be super helpful. We wrote our own code generator. This might be of help... http://somap.svn.sourceforge.net/viewvc/somap/codegen/src/ Cheers, Adrian

Re: Cayenne code generation - pointers requested

2010-01-28 Thread John Armstrong
The way I am handling 'what gets mapped' is with a BeanFactory class that uses Dozer to do basic mapping on a per CDO/Bean basis. BeanUtils could do this but BeanUtils blows up a lot more easily. Dozer handles serializable attributes automatically for us. Case by case I add logic to my BeanFactory

Re: Cayenne code generation - pointers requested

2010-01-28 Thread Andrey Razumovsky
Cool, didn't know about BeanModel.. I'm never used GXT. We've wrote quite a lot of code in GWT-Ext (and it supports JSON).. This is raw and abandoned project, and I hate it more and more each day (and also I will never anymore use wrapper library, like SmartGWT). Still I've been unable to persuade

Re: Cayenne code generation - pointers requested

2010-01-28 Thread John Armstrong
I'm using GXT which has a pretty strong preference for its own 'BeanModel' (thin wrapper around a javabean that understands GXT) for grid population etc. That (in my mind) means I am either serializing Cayenne Models -> JSON -> BeanModels or just going from Cayenne Model -> BeanModel so I decided

Re: Cayenne code generation - pointers requested

2010-01-28 Thread Andrey Razumovsky
I'm currently using Cayenne and GWT. I think the question should be if it is worth it to convert server beans to client beans. Do you really need data objects on client side? With a lack of reflection they cannot be easily used in UI. I think this only produces unneeded convertion. What I do is con

Re: Cayenne code generation - pointers requested

2010-01-28 Thread John Armstrong
Thanks Andrus. The cgen docs explain the process but the code pointers are going to be super helpful. Down the rabbit hole.. John- On Thu, Jan 28, 2010 at 12:23 AM, Andrus Adamchik wrote: > cgen (Ant or Maven variety) support custom templates and generation modes > (either one run per DataMap or

Re: Cayenne code generation - pointers requested

2010-01-28 Thread Andrus Adamchik
cgen (Ant or Maven variety) support custom templates and generation modes (either one run per DataMap or one run per ObjEntity): http://cayenne.apache.org/doc30/cgen.html http://cayenne.apache.org/doc30/maven2-cgen.html So you can definitely implement class generation around Cayenne mapping

Cayenne code generation - pointers requested

2010-01-27 Thread John Armstrong
I'm finding myself generating a lot of Beans that mirror my cayenne entities (plus Dozer mappings) as I delve into GWT. This is crying out for automation and I'm sure a few others would enjoy it. It may even make Cayenne very GWT Friendly. To move this ball forward (for me minimally) can anyone p