Hi Gary, ORMs are sophisticated tools and while they are great tools in enterprise environments, they have steep learning curves. There are many other ORMs besides Cayenne, including Hibernate and the standard Java Persistence API or JPA for short.
There are also simpler database tools like MyBatis which is more of a database mapping tool than a full blown ORM. While Click examples uses Cayenne you could always use straight JDBC which is more low level. WRT how this is done, there is a Cayenne DataContextFilter defined in web.xml which bootstraps the environment. Cayenne has a modeler where you define your DB connection and Cayenne manage these connections for you. Once the DataContext is defined you use it to perform CRUD operations using your domain objects. Having a background in PHP myself I'd say that Java is heavily geared towards enterprise and you will find it "heavier" than the scripting environment of PHP. Kind regards Bob On 13/01/2011 10:40, Schultz, Gary T - COMMERCE wrote: > I'm starting work on an application. Normally I would use PHP, but I > accidently found Apache Click. > Looking at the documentation and examples, it appears easy to use. Maybe I > missed it in the > documentation, but how do you get data stored in a database? > > In a separate email exchange I received a reply from Malcolm Edgar saying the > examples use Apache > Cayenne ORM framework. Is there an example that elaborates on how this is > done? I've never worked > with a ORM framework, is the learning curve steep? Any other ORM Frameworks > worth looking at? > > Sincerely, > > Gary Schultz > Web Administrator/Developer > Wisconsin Department of Commerce > > ---------------------------------------------------------------------------------------------------- > CONFIDENTIALITY NOTICE: This electronic mail transmission and any > accompanying documents may contain > confidential and legally privileged information. If you are not the intended > recipient, you are > strictly prohibited from any disclosure, copying, distribution, or storage of > the contents of the > information contained in the transmission. If you have received this > transmission in error, please > notify the sender and delete the message. Thank you.
