One of the things that is always difficult is writing queries for AEM. You may spend several minutes to hours constructing some complex ones. In fact, the documentation for query commands available are out there but are often hidden within a Stack Overflow article or on a GitHub repo with not many stars.
It is important though before writing commands to understand how the JCR infrastructure works, which should lead you into understanding what the commands do and how they function. My major takeaway from three years working on AEM so far is that it is a large database where everything can be searched (pages, tags, files) and you can search node within node for some neat yet complex queries.
I leave you with my faves I use all the time in XPATH:
JCR:like -> find exact match for property and text you provide it
JCR:contains -> works to find anything within an array of strings or nodes, maybe with multiple tags
XS:DateTime -> extremely useful when comparing times
And the last one is more of a technique, but nesting. After you make a command inside of square brackets, you can add another //* after it to look within that particular node. this means you can go several levels deep!
There is still a ton to discover and a lot to learn and many unknowns. Enjoy the journey! 🎉
AEM Certified Developer
3w1: create a custom component which handles the API key 2: Sling Model to handle the logic of fetching data from the third-party weather API. The model will interact with the API, parse the response, and provide the data to the front-end. 3: Create an OSGi service to encapsulate the API interaction logic. 4: Use HTL to bind the data provided by the Sling Model to the front-end