File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Transfering to POJO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Transfering to POJO" Watch "Transfering to POJO" New topic
Author

Transfering to POJO

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

I would like to know how difficult it would be to :

1. Change a traditional J2EE experienced programmer into a POJOs guru
Would it need a complete change of thinking ?
2. Rewrite a traditional J2EE application using POJOs.

Number 2 probably depends on the application itself,
but what about number 1 ?


[My Blog]
All roads lead to JavaRanch
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

1. Change a traditional J2EE experienced programmer into a POJOs guru
Would it need a complete change of thinking ?


Why is it difficult ? In fact it is much easier to move to POJO.


Groovy
Theodore Casser
Ranch Hand

Joined: Mar 14, 2001
Posts: 1902

I think #2 would depend largely not just on the application, but on the methodology used to write the initial application. (For instance, my company's moving to using servlets mostly as wrappers to expose/access POJOs as we're trying to keep open options for exposing similar functionality through web-services.)

As for #1, like all things, it depends on how entrenched the given developer is in their ways. Switching over to POJOs requires more a change in how one looks at the architecture of an application rather than any difficult leap in learning a technology.


Theodore Jonathan Casser
SCJP/SCSNI/SCBCD/SCWCD/SCDJWS/SCMAD/SCEA/MCTS/MCPD... and so many more letters than you can shake a stick at!
Chris Richardson
author
Ranch Hand

Joined: Jan 10, 2006
Posts: 50
Satou,

A previous post described how I went about converting an EJB application to a POJO application: http://www.coderanch.com/t/216014/ORM/java/Chris-POJO-POJO . The migration path does depend on the specifics of your application though.

On that project, developers readily picked up frameworks such as Spring and Hibernate. They are, after all, a lot easier to use than EJB2.

Perhaps the biggest challenge is learning (or relearning) how to do object-oriented design. EJB2 really encouraged a procedural way of writing code, which can be a hard habit to break.

Chris


Enterprise Java consulting and training - <a href="http://www.chrisrichardson.net" target="_blank" rel="nofollow">http://www.chrisrichardson.net</a> Author, POJOs in Action - <a href="http://www.manning.com/crichardson" target="_blank" rel="nofollow">http://www.manning.com/crichardson</a> Enterprise POJOs blog - <a href="http://chris-richardson.blog-city.com" target="_blank" rel="nofollow">http://chris-richardson.blog-city.com</a>
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

>Pradip
>Theodore

Why is it difficult ? In fact it is much easier to move to POJO.
Switching over to POJOs requires more a change in how one looks at the architecture of an application rather than any difficult leap in learning a technology.

I see. Understanding the concept as a whole is important.

>Chris
I'll read the thread you have posted

Thank you all for your replies.
Cheenath Ajay
Ranch Hand

Joined: Jan 26, 2006
Posts: 32
Dear all,

I am using two POJOs in my application, One is User and another is Salary.
And i am extending User in my Salary POJO, But one i try to query something in User POJO Hibernate throwing some errors like Property of User POJO is not there in Salary POJO.

Like userName is not a property of Salary POJO.

Why this happening, Is there any solution for this?

Thanks in Advance.

Cheenth.
Chris Richardson
author
Ranch Hand

Joined: Jan 10, 2006
Posts: 50
Without seeing the the code, the Hibernate mappings, the query and the stack trace showing the error it is difficult to say that is going wrong.

Can you supply more information.

Chris
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Transfering to POJO