In the first part of his series on creating a blogging platform in Java, Grzegorz Ziemonski shares his mindset on the genesis of his project and preparation.
This article will show you how to set up a clustered MongoDB to store the data, a Solr Cloud to index the data in MongoDB in real time. Then how to use mongo-connector to replicate data from MongoDB to Solr Cloud. And finally, develop a simple Spring Data Solr application that talks to Solr Cloud to search the data in MongoDB.
Documents in MongoDB have a unique object ID when they are created. How can we get around this to develop a more effective REST API when document lookups are involved?
How many times have you reviewed a log file without the data key (secret decoder ring) that explains what everything means. When a user more informative and intuitive format like JSON or XML? It's not too hard to do and can be quite helpful. Here's an example.
If we still use the get() functionality on optionals, we're effectively opening ourselves to the same problems as null checks. Here's how we should properly use this new tool in our arsenal.
Packaging is one of the underrated features of Java. IDEs are so smart that it only takes a few clicks to reorganize the whole project. But we can do better! We can really benefit from a good package structure.