Introduction to the Java Content Repository (JCR) introduction-jcr

An introduction to the Java Content Repository (JCR) used by Adobe Experience Manager. The JCR is the base level of the AEM technology stack and is responsible for underlying content persistence, storage, search, access control and much more!

Transcript
Hello and welcome, everyone. My name is Abhishek Dwevedi and in this video, we are going to learn about Java Content Repository.
After completing this video, you should be able to define Java Content Repository, and you should also be able to compare Java Content Repository to a database. Java Content Repository is a hierarchical contents tool with support for structured and unstructured content.
Java Content Repository can support full-text search, versioning, transactions, observation, and a lot more. So, Java Content Repository is a kind of database where you can store the content in a hierarchical format, something very much similar to file system.
However, it can also support structured and unstructured content both.
Java Content Repository was introduced through Java Specification Request 170. This was implemented in 2002. Java Content Repository, or shortly called as JCR, comes from JSR-170, so JSR is Java Specification Request.
So, JCR is based on the principles mentioned in JSR. JCR provides us APIs for Java and JavaScript both. It has a very stable API.
The concepts and principles of JCR are defined by an expert group, and they are based on open standards. So, there was another improvement on JCR through JSR-283, which was introduced in 2005. Then, there is another JSR called as JSR-333. This is another set of specification that is yet to come for JCR. Some high-level principles of JCR is, it’s a common programmatic interface to content repository. As we described before, content repository is basically a way to store data in hierarchical format.
It also provides an API which is not tied directly to the underlying architecture, data source, or protocol. With JCR, content organization is done in a repository model and hierarchical model. One of the implementations of JCR is done by Apache, which is called as Apache Jackrabbit Oak. So, now let’s compare with the existing storage system, like file system features and RDBMS features. Some of the important features of file systems is binaries that can directly be placed there, hierarchical system, the files and folders can have permissioning or you can just lock a folder there, and there is obviously access control that can be done. While RDBMS provides features like transaction, it provides a query mechanism, so that you can easily pick up some information based on some filters. It has a proper structure or schema that you have to define, and there is an integrity available in RDBMS.
If we include all these two features and add some more important properties, like unstructured content, full-text search, versioning, and observation, these all features combines and makes a content repository. If this gets accessed by a standardized API, this becomes JCR.
So on high-level, JCR is a tree structure that contains items. There can be two kinds of item. First is nodes, which provides the structure, and the second one is properties, that stores the data. Item names should be meaningful, so in JCR, or Java Content Repository, we do not recommend usage of ID because it’s not meaningful information. We want items to be meaningful here, so whatever item that you create are stored in the form of paths. Like, for this example, we have a root node on the top, then we have blog, and then that’s further categorized into January and February, and then we are doing it through dates, and then there are further hierarchical representation of the data that we have. Let’s see this JCR node and properties in a little more detail. So, suppose we have a parent node, which can have a child node inside that because it’s providing a structure, and then on the top, we have node type, which is a very important information. This helps us to identify what kind of node is it. Is it a folder or a file, or is it unstructured information that we are capturing? Or if it’s a user information. You can also have some additional properties like mixin. You can provide information like single value properties, like date, or binary information, or Boolean, or you can have multi-value property, like string array, or path array, or binaries.
And further, you can again have child nodes. So, JCR is a hierarchical structure where the data is stored in form of nodes and properties. And this JCR contains the features of RDBMS and file system, and on top of that, it has some more important features, like versioning or full-text search. Now, you should be able to define Java Content Repository, and you should be able to compare Java Content Repository and database. Thank you for watching this video. Have a great day. -
recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69