Wednesday, March 5, 2014

Work log - 3/5/14

I finally got in the zone around 3:30 today and churned out a good-sized chunk of code.  I wrote 3 classes to represent the database schema objects in the Java Play server code.  I also figured out how to connect to my remote MongoDB database and query it.  Furthermore, I wrote a couple of the search methods the other members of the team need to use to get info out of the database.  I was initially bogged down today by trying to use some Play-oriented MongoDB plugins, which I couldn't figure out.  I made a breakthrough when I downloaded the regular MongoDB Java driver package (jar file) instead.  I was also having trouble seeking out and using some kind of ORM - Object Relational Mapping - setup to directly translate the MongoDB documents into Java object representations.  After a while of being frustrated with that, I decided it was easier (and I will claim more efficient and with less complexity) to just write a method for each database object class (3) that translates a MongoDB query object (com.mongodb.DBObject) into my custom objects.  I have emailed my team about this progress, as I know they need some of this functionality to continue with their own sections of the project.  I'm sure they will have more methods to request and some input on additional parameters or outputs for the ones I've written.  Feels good to get some working code out.

No comments:

Post a Comment