Philipp Hauer's Blog

Engineering Management, Java Ecosystem, Kotlin, Sociology of Software Development

'MongoDB for Java Developers' (M101J) I: Experiences and Assessment

Posted on Feb 21, 2016. Updated on Jan 20, 2019

I attended the course “MongoDB for Java  Developer” (M101J). It was fun and I learned a lot about MongoDB. I like to share my gained knowledge and experience in a two-part series. In this first part I assess the course and state, whether or not the course is worth the time.

'MongoDB for Java Developers' (M101J) I: Experiences and Assessment

General Remarks

  • I attended the online-course “MongoDB for Java Developers (M101J)” in January and February 2016. The course covered MongoDB 3.x.
  • Although “Java” is part of the course name you will mostly work with the Mongo shell. The Java and the Java driver play a role in only a few lectures and homeworks. The first reason for this is that there isn’t much more to say about the Java driver after you have understood that the queries created with the driver are quite similar to the ones in the Mongo shell. In fact, dealing with the Document class of the Java driver is more verbose than using the shell. The second reason is that most of the topics are language-agnostic (schema design, performance, indexes, aggregation framework, replication, sharding). I guess attending another developer course won’t provide you with much more information besides the driver usage (and even this won’t differ much).

Assessment

Pros

  • The MongoDB guys have done a great job in producing a well-done online-course. The lecturer (who is a good speaker) uses a pen and develops each cover picture by hand and step by step. This makes it easy to follow his thoughts and to don’t get bored. This is way better than the typical flood of PowerPoint slides.
  • Moreover, they added interactive elements to the course. After every video lecture you can answer a short question (the so-called quizzes). Besides, there is a homework after every week.
  • The homework has been great fun. It’s important to have this hands-on time to use MongoDB and gather practice experience. You reflect over the content you’ve learned in the video lectures and this helps you to remember the subject matter.
  • The course focuses on the practice and real world requirements, which is great. Afterwards you have a really broad knowledge about everything a Developer needs to know about MongoDB:
    • Using the Mongo shell and the Java driver for CRUDing and the aggregation framework.
    • Schema Design (very important!) and the trade-offs you have to take into account.
    • To be aware of performance issues, tools for profiling queries and what you can do to speed up your queries (indexes).
    • Nice summary of the implications of replication and sharding for the development.
  • My favorite homework was the one in the week about performance. You get a simple web application backed by MongoDB and your task is to analyze the executed queries and to optimize them. This is exactly the same thing you have to do with real world applications. I really like the practice-orientation of the course.
  • Afterwards you got a lot of practice with the Mongo shell, which is very useful in daily usage (especially for ad-hoc analysis and queries).
  • The final exam is an excellent repetition of the whole course and covers all important topics. But it is not very hard, especially because there are a lot of multiple-choice questions. If the computed result is not in the possible choices, it’s wrong. That makes it too easy. 😉 But I understand that the way to the result is much more important than asking tricky questions without the safety to know whether your result is right or not.

Cons

  • It was more time-consuming that I expected. The course lasted two months and I had done the course besides my daily work. But in return for your time you gain a lot of knowledge.
  • If you are already familiar with MongoDB the first weeks doesn’t contain much new for you. But that’s fine. There have to be a common starting point for all attendees. It gets better as the course continues.
  • The only aspect I really missed is a critical reflection about MongoDB. What are the cases where MongoDB makes perfect sense and (more important) where shouldn’t I use MongoDB? What are the drawbacks when using MongoDB? I missed this fundamental consideration. Assuming I’m starting a project and want to specify the architecture for my application, for which requirements MongoDB makes sense and for which not? In my blog post “Why Relational Databases are not the Cure-All” I’m talking about this topic, but I would be great to get to know the opinion of the MongoDB guys.
  • Object-Document-Mapper (ODM) are only covered in one video and there is no homework for it. It’s a pity, because ORMs and ODMs play an important role in the daily work of a developer. The Java driver is quite low-level, not type-safe and cumbersome to use. Therefore, the driver is not always the best choice. There is only one video about Morphia, but I would really like to have a hands-on session for this topic. I claim, that it’s absolutely important for a developer to know the libraries that eases the usage of MongoDB, like MongoJack, QueryDSL or (most important) Spring MongoTemplate and Spring Data MongoDB. This would make the course even more practice-relevant.

Conclusion

All in all, I recommend the course. It is well done and provides an extensive knowledge about MongoDB and equip you with nearly everything a developer needs to know to cope his daily work with MongoDB. I only missed a critical consideration about MongoDB and some high-level recommendations when to use MongoDB and (more important) when not.