introduction to morphia

The following two tabs change content below.
Prasad Kharkar is a java enthusiast and always keen to explore and learn java technologies. He is SCJP,OCPWCD, OCEJPAD and aspires to be java architect.

Latest posts by Prasad Kharkar (see all)

We’ve seen about all mongodb operations those can be performed using java. We wrote java code which interacts with java driver directly and performs operations in mongodb. By this way we have to directly deal with collections and all the fields within it. As we are java developers, it would have been great if there was some framework in mongodb just like JPA or Hibernate in relational databases, and guess what , there is such framework. We will get some introduction to morphia.

Introduction to Morphia:

Morphia acts as a layer between application logic and mongodb database. As java developers it is easier for is to directly deal with POJO classes than with documents in collection. Introduction to morphia will list out such parameters why morphia is useful.

  • Provides way to map documents to java classes
  • Easier for java developers to deal with POJO than with documents directly.
  • Errors due to mismatch of fields in documents while programming can be avoided.
  • Provides another way to query documents (in the form of entities) from mongodb
  • POJO classes defined as entities on which operations can be performed
  • Another layer of separate adds flexibility.

This is just an introduction to morphia. we will see how things work in it form next tutorial onwards

Share Button

Prasad Kharkar

Prasad Kharkar is a java enthusiast and always keen to explore and learn java technologies. He is SCJP,OCPWCD, OCEJPAD and aspires to be java architect.

One thought on “introduction to morphia

Leave a Reply

Your email address will not be published. Required fields are marked *