Updated 044 Hello World Component with Joomla Component Builder Creator Extended (markdown)

Amigo 2019-08-15 11:52:34 +02:00
parent b8beeefb80
commit 3fd2eb2bc2

@ -10,34 +10,34 @@ This is a tutorial on how to build a Hello World Component with Joomla Component
[00:00:41](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m41s)
For example: Since there are a lot of concepts in components that are build for Joomla, which may be called Conventions or Boilerplate Implementation. These things are always the same. I wanted something like a wire frame that could just take care of that for me all the time.[00:01:09](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m09s) Even if Joomla was to change, to be able to make a change in one place, and then compile it into all the components that I have developed. Then have them run stable again on Joomla, instead of having to go to every one of those components. We have gone beyond developing the most basic parts of a Component and ventured into some of its complexities.[00:01:40](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m40s) That is why showing an Hello World Component being built by Joomla Component Builder. It is going to end up being quite an advanced Component.
For example: Since there are a lot of concepts in components that are built for Joomla, which may be called Conventions or Boilerplate Implementation. These things are always the same. I wanted something like a wireframe that could just take care of that for me all the time.[00:01:09](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m09s) Even if Joomla was to change, to be able to make a change in one place, and then compile it into all the components that I have developed. Then have them run stable again on Joomla, instead of having to go to every one of those components. We have gone beyond developing the most basic parts of a Component and ventured into some of its complexities.[00:01:40](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m40s) That is why showing a Hello World Component being built by Joomla Component Builder. It is going to end up being quite an advanced Component.
### Become A Community Project
[00:01:57](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m57s)
I had build JCB for myself, and it was not intended as a community project. It has since became a community project with the code open on GitHub. [00:02:19](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m19s) With only functionality in mind, I did not contemplate the complexity thereof during the development and set conventions in place which I know how to use. [00:02:43](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m43s) On the surface JCB might look just like any other Component Builder, but when you start to use it and come to know some of its secrets, it is amazing how conventions, even conventions that you would use when you develop components yourself would make JCB do things that are quite amazing.
I had build JCB for myself, and it was not intended as a community project. It has since become a community project with the code open on GitHub. [00:02:19](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m19s) With only functionality in mind, I did not contemplate the complexity thereof during the development and set conventions in place which I know how to use. [00:02:43](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m43s) On the surface JCB might look just like any other Component Builder, but when you start to use it and come to know some of its secrets, it is amazing how conventions, even conventions that you would use when you develop components yourself would make JCB do things that are quite amazing.
[00:03:16](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m16s)
So you will end up to realize that JCB has a lot of functions. Most of the basic ones has been explained in the tutorials that can be found on YouTube which can be accessed from this link 'Access Tutorials'.
So you will end up to realize that JCB has a lot of functions. Most of the basic ones have been explained in the tutorials that can be found on YouTube which can be accessed from this link 'Access Tutorials'.
### Need To Know - PHP - Joomla API
[00:04:08](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m08s)
If you do not know PHP and Joomla's API you should not expect to built complex components with JCB. [00:04:44](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m44s) If you do, the correct doors will open and the correct relationships can be set up to have those conventions dynamically built for you by JCB. If you are very good at PHP programming and know the Joomla API, you can simply go into the Compiler, and start reading the code. The Compilers code files are alphabetically ordered. [00:05:20](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m20s) The first one is 'a_get.php' and so forth. Reading this code and understanding how JCB's Compiler Constructs the code would send you on a treasure hunt where you would discover amazing features.
If you do not know PHP and Joomla's API you should not expect to build complex components with JCB. [00:04:44](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m44s) If you do, the correct doors will open and the correct relationships can be set up to have those conventions dynamically built for you by JCB. If you are very good at PHP programming and know the Joomla API, you can simply go into the Compiler, and start reading the code. The Compilers code files are alphabetically ordered. [00:05:20](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m20s) The first one is 'a_get.php' and so forth. Reading this code and understanding how JCB's Compiler Constructs the code would send you on a treasure hunt where you would discover amazing features.
### Necessary to Start with the Basics
[00:05:50](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m50s)
It is necessary to start with the basics. That is to build a Hello World Tutorial, in order to be able to combine the different concepts that is required for a component for it to be fully functional, and portable, and useful.
It is necessary to start with the basics. That is to build a Hello World Tutorial, in order to be able to combine the different concepts that are required for a component for it to be fully functional, and portable, and useful.
**Patience and Perseverance**
[00:06:23](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m23s)
There are two principals to mention before we start. One is patience, the other is perseverance. Within any programming career these aspects are invaluable. [00:06:49](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m49s) This is what has made JCB possible and this is also what would make you successful in using JCB.[00:07:17](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m17s) It is not a component which is claimed to have no internal conflicts or inconsistencies but it is most certainly a component with which I have developed countless mini program components which I am maintaining.
There are two principals to mention before we start. One is patience, the other is perseverance. Within any programming career, these aspects are invaluable. [00:06:49](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m49s) This is what has made JCB possible and this is also what would make you successful in using JCB.[00:07:17](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m17s) It is not a component which is claimed to have no internal conflicts or inconsistencies but it is most certainly a component with which I have developed countless mini-program components which I am maintaining.
### Basic Steps To Understand How To Build
* Need Joomla Website
@ -46,45 +46,45 @@ There are two principals to mention before we start. One is patience, the other
[00:08:01](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m01s)
The basic steps. You would need a Joomla website. This Joomla website would preferably be on a developing environment, which is either offline or on a server which is not necessarily used in production. [00:08:30](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m30s) Not because JCB itself is unsafe. It is simply just more convenient. If it is offline, the code can be opened in your IDE. JCB has the feature to extract this customized code out of your component, and put it back on compilation, a feature that does exist but which will not be discussed during this tutorial.
The basic steps. You would need a Joomla website. This Joomla website would preferably be on a developing environment, which is either offline or on a server which is not necessarily used in production. [00:08:30](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m30s) Not because JCB itself is unsafe. It is simply just more convenient. If it is offline, the code can be opened in your IDE. JCB has the feature to extract this customized code out of your component and put it back on compilation, a feature that does exist but which will not be discussed during this tutorial.
### Local Environment Is Ideal
[00:09:06](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m06s)
A local developing environment is most ideal for this. By using certain protocol, a tunnel may be setup between your desktop and live server and still have this kind of interaction of editing code live and then compiling and seeing changes. That may be done if you are able to manage any kind of complexity; [00:09:27](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m27s) It is suggested that if JCB is installed, and there are some limitations in a shared hosting environment, to first resolve that or move development offline.
A local developing environment is most ideal for this. By using certain protocol, a tunnel may be set up between your desktop and live server and still have this kind of interaction of editing code live and then compiling and seeing changes. That may be done if you are able to manage any kind of complexity; [00:09:27](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m27s) It is suggested that if JCB is installed, and there are some limitations in a shared hosting environment, to first resolve that or move development offline.
### Ways To Install JCB - Download Package - URL From GitHub - Install From The Web
[00:09:56](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m56s)
First go to the Joomla Website and log in. Then install JCB. Simply go to 'Manage' and 'Install'. There are different ways to install JCB. A package may be downloaded, or a URL may be grabbed from GitHub, or it can also be installed from the web.[00:10:20](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m20s) It is listed with Joomla. If JCB is searched, it brings up JCB on the page but it would not necessarily always do that.
First, go to the Joomla Website and log in. Then install JCB. Simply go to 'Manage' and 'Install'. There are different ways to install JCB. A package may be downloaded, or a URL may be grabbed from GitHub, or it can also be installed from the web.[00:10:20](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m20s) It is listed with Joomla. If JCB is searched, it brings up JCB on the page but it would not necessarily always do that.
### JCB One Of The Listed Developing Tools
[00:10:35](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m35s)
If you do not find a Component in the search, this 'Component Builder' is the Component. Then you could go down to an area called 'Tools', and then 'Developing Tools'. [00:11:06](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m06s) JCB is one of the listed Developing Tools. Here it is only listed as a Component Builder. You can click on that, and simply click install. This 'Install' will then grab a URL from GitHub. [00:11:33](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m33s) The Joomla Installer may also be used, and simply click install. How fast it will take will depend on your own network. This is quite a big file, and in certain areas it might be a limitation if used outside of a local developing environment.
If you do not find a Component in the search, this 'Component Builder' is the Component. Then you could go down to an area called 'Tools', and then 'Developing Tools'. [00:11:06](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m06s) JCB is one of the listed Developing Tools. Here it is only listed as a Component Builder. You can click on that, and simply click install. This 'Install' will then grab a URL from GitHub. [00:11:33](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m33s) The Joomla Installer may also be used, and simply click install. How fast it will take will depend on your own network. This is quite a big file, and in certain areas, it might be a limitation if used outside of a local developing environment.
### Need To Understand and Setup Components: Field Types, Fields, Views
[00:11:57](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m57s)
Now that JCB is installed there are some things that need to be understood concerning the way most Joomla Components are constructed. We are going to build a Component called 'Hello World'. The way to setup a component is to first understand Field Types. [00:12:31](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m31s) Then the Fields need to be set up and then the Views that are needed in your Component.
Now that JCB is installed there are some things that need to be understood concerning the way most Joomla Components are constructed. We are going to build a Component called 'Hello World'. The way to set up a component is to first understand Field Types. [00:12:31](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m31s) Then the Fields need to be set up and then the Views that are needed in your Component.
### Views Mapped Back to Database - Admin Views
[00:12:40](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m40s)
These Views also map back to the database. These are what is called Admin Views. Admin Views have Fields and Fields are the Database Columns. Admin Views are the Database Tables, [00:12:59](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m59s) Fields are the Database Columns and these are the Field Types(Please see video). There is a Text Field, Radio, List, Multiple Selection, Checkbox, a Date Field. There are many types of Fields. Each Field independently is linked to a type, but there are some Database Settings within each Field as it gets linked into the Admin View , since the Fields form the Columns of the Tables of the Admin Views. This is how a Component is setup.
These Views also map back to the database. These are what is called Admin Views. Admin Views have Fields and Fields are the Database Columns. Admin Views are the Database Tables, [00:12:59](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m59s) Fields are the Database Columns and these are the Field Types(Please see video). There is a Text Field, Radio, List, Multiple Selection, Checkbox, a Date Field. There are many types of Fields. Each Field independently is linked to a type, but there are some Database Settings within each Field as it gets linked into the Admin View since the Fields form the Columns of the Tables of the Admin Views. This is how a Component is set up.
### First Build the Back End then Add in the Front End
[00:13:34](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m34s)
Once a component have been setup, then you are done with what we would call the back end. [00:13:49](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m49s) With JCB the back end of the component should be build first, and then only add in the front end.
Once a component has been set up, then you are done with what we would call the back end. [00:13:49](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m49s) With JCB the back end of the component should be built first, and then only add in the front end.
### Front End have not its own Database
### Front End has not its own Database
[00:13:58](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m58s)
@ -94,25 +94,25 @@ The front end does not have its own Database. It pulls its data from the back en
[00:14:15](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m15s)
In JCB it ships with quite a lot of Fieldtypes. Open the Fieldtypes area. There are many Fieldtypes already setup. JCB is built in a way that it can be extended. Like Sub Form is a new Fieldtype which was recently introduced into Joomla Community. It also replaces an old Fieldtype called Repeatable Fields.
In JCB it ships with quite a lot of Fieldtypes. Open the Fieldtypes area. There are many Fieldtypes already setup. JCB is built in a way that it can be extended. Like SubForm is a new Fieldtype which was recently introduced into Joomla Community. It also replaces an old Fieldtype called Repeatable Fields.
### Joomla Discontinuing Repeatable Fields - Migrate Repeatable Fields to Sub Form Fields
### Joomla Discontinuing Repeatable Fields - Migrate Repeatable Fields to SubForm Fields
[00:14:40](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m40s)
It is advisable not to use Repeatable Fields anymore. Since JCB used Repeatable Fields quite excessively, [00:14:49](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m49s) and due to the fact that Joomla is now discontinuing this Fieldtype, we had to migrate all of the Repeatable Fields to Sub Form Fields. Part of the reason why I am redoing the Hello World tutorial, is because of the fact that Sub Forms are now being used all across JCB and there has been a few changes in implementation.
It is advisable not to use Repeatable Fields anymore. Since JCB used Repeatable Fields quite excessively, [00:14:49](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m49s) and due to the fact that Joomla is now discontinuing this Fieldtype, we had to migrate all of the Repeatable Fields to SubForm Fields. Part of the reason why I am redoing the Hello World tutorial is because of the fact that Sub Forms are now being used all across JCB and there have been a few changes in implementation.
### Add New Fieldtypes
[00:15:23](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m23s)
Here you can see all the Fieldtypes that I have set up in JCB already. You could always add new Fieldtypes as JCB and Joomla continues to evolve. Whenever you would be confronted by a Fieldtype that needs a bit of extra tweaking within the Compiler, I would hope to be ahead of you in adding that Fieldtype if necessary. [00:15:54](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m54s) With most of the time Fieldtypes extra help is not needed. It is only Fieldtypes like Subform and perhaps with some Fieldtypes like URL, Text, Tel, SQL and Tag that help may be necessary
Here you can see all the Fieldtypes that I have set up in JCB already. You could always add new Fieldtypes as JCB and Joomla continues to evolve. Whenever you would be confronted by a Fieldtype that needs a bit of extra tweaking within the Compiler, I would hope to be ahead of you in adding that Fieldtype if necessary. [00:15:54](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m54s) With most of the time Fieldtypes extra help is not needed. It is only Fieldtypes like Subform and perhaps with some Fieldtypes like URL, Text, Tel, SQL, and Tag that help may be necessary
### Fieldtypes Helps Setup Properties
[00:16:14](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m14s)
The way a Fieldtype works is that it helps you set up what is known as the Properties. The property has a Name, it has a Default value, it is either Adjustable or not Adjustable. It is Mandatory or not Mandatory and Translatable. It can be given a Description, that when the Fieldtype is used you can always come back to this. This information can be gathered from going through the Joomla Core Libraries. [00:16:49](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m49s) Because Fieldtypes are only mapping Joomla's own implementation of Fieldtypes. If a Fieldtype is opened that has already been created like the Text field, it may be seen that these properties are already there and in place. The Fieldtype is 'text'. The 'name' is 'any text'. When we say that the type is 'text', then this is not adjustable, but if it is adjustable, it can be ticked.[00:17:18](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m18s) It is most certainly Mandatory. Most of the Fieldtypes had been created already and are ready to be used.
The way a Fieldtype work is that it helps you set up what is known as the Properties. The property has a Name, it has a Default value, it is either Adjustable or not Adjustable. It is Mandatory or not Mandatory and Translatable. It can be given a Description, that when the Fieldtype is used you can always come back to this. This information can be gathered from going through the Joomla Core Libraries. [00:16:49](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m49s) Because Fieldtypes are only mapping Joomla's own implementation of Fieldtypes. If a Fieldtype is opened that has already been created like the Text field, it may be seen that these properties are already there and in place. The Fieldtype is 'text'. The 'name' is 'any text'. When we say that the type is 'text', then this is not adjustable, but if it is adjustable, it can be ticked.[00:17:18](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m18s) It is most certainly Mandatory. Most of the Fieldtypes had been created already and are ready to be used.
### Creating Fieldstypes
@ -124,48 +124,48 @@ Most of the time you can simply start with Fields. There are already quite a few
[00:18:24](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m24s)
To give a quick demonstration: If I click on this button(pencil), and say; change this(ValueExample) to text'tt' and save and close and return to Fields and click 'New', then select 'Text field' again.[00:18:53](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m53s) Three t's has been added in there. Since this whole structure has been built from the Fieldtypes Default Settings, which we just looked at. I am going to change that back quickly, and for example put something in the Description. [00:19:22](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m22s) I am going to take text again, and you will see those oooo's are showing up here. This means that this whole area is dynamically populated from the values that are put up in the Fieldtype and so does this XML(field definition) structure usually populates the demo or default values that you have added when you created the Fieldtype.[00:19:57](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m57s) JCB ships with most Fieldtypes already in place, it appears like this is something we have done, but it is something that you can extend and even change. For example: If you know that the Text Fieldtype has more properties than we have setup, you can add more to it and simply click on this 'edit' or before creating a Field, you can go to the Fieldtypes, and open the Text Fieldtype and click on the green button and add more Properties.[00:20:34](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m34s) Those Properties will dynamically also appear within the area where the Fields are created. [00:20:57](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m57s) Things in JCB has not been set hard into code but is movable, easy to scale and easy to customize.
To give a quick demonstration: If I click on this button(pencil), and say; change this(ValueExample) to text'tt' and save and close and return to Fields and click 'New', then select 'Text field' again.[00:18:53](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m53s) Three t's has been added in there. Since this whole structure has been built from the Fieldtypes Default Settings, which we just looked at. I am going to change that back quickly, and for example, put something in the Description. [00:19:22](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m22s) I am going to take text again, and you will see those oooo's are showing up here. This means that this whole area is dynamically populated from the values that are put up in the Fieldtype and so does this XML(field definition) structure usually populates the demo or default values that you have added when you created the Fieldtype.[00:19:57](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m57s) JCB ships with most Fieldtypes already in place, it appears like this is something we have done, but it is something that you can extend and even change. For example: If you know that the Text Fieldtype has more properties than we have set up, you can add more to it and simply click on this 'edit' or before creating a Field, you can go to the Field types, and open the Text Fieldtype and click on the green button and add more Properties.[00:20:34](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m34s) Those Properties will dynamically also appear within the area where the Fields are created. [00:20:57](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m57s) Things in JCB has not been set hard into code but is movable, easy to scale and easy to customize.
### Creating A Field
[00:21:18](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m18s)
The first field that we are going to create is a Text field, which we will call 'Greetings'. Then Update the label with 'greetings' in the 'XML Field definition' area. This is what will be visible in the Database, 'greeting' (singular) is going to be the Database Name. Most of the others will be left as default. [00:21:48](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m48s) Let's just maybe change the hint 'add greetings here'. Then remove the description. Take out the default text, otherwise it will always appear.
The first field that we are going to create is a Text field, which we will call 'Greetings'. Then Update the label with 'greetings' in the 'XML Field definition' area. This is what will be visible in the Database, 'greeting' (singular) is going to be the Database Name. Most of the others will be left as default. [00:21:48](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m48s) Let's just maybe change the hint 'add greetings here'. Then remove the description. Take out the default text, otherwise, it will always appear.
### Databases
[00:22:19](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m19s)
Now in regards to the Database, that is what these features are all about. Since Text Fields can differ, not all of them are going to be this size. It is up to you to decide what kind of Text Field this is going to be. A bit more knowledge about MySQL and Databases is necessary to effectively use this. [00:22:49](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m49s) If you do not know what would be the best for a Text Field or a Date Field, Google that or simply look at Joomla's own implementation. It has an article Manager, and you can go into its XML Database and look at what Database Values was used and just use the same whatever be the case.[00:23:14](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m14s) Because these values are all movable, and by setting them wrong, could break things. Having created our first field, we can reuse Name and maybe also Description. [00:24:23](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m23s) Those are part of the Demo Component. Since Fields can be linked into any Admin View and therefore belong to any Component, it does not matter if it is already linked to the Demo Component . Although, if it is changed, it will affect both Components.
Now in regards to the Database, that is what these features are all about. Since Text Fields can differ, not all of them are going to be this size. It is up to you to decide what kind of Text Field this is going to be. A bit more knowledge about MySQL and Databases is necessary to effectively use this. [00:22:49](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m49s) If you do not know what would be the best for a Text Field or a Date Field, Google that or simply look at Joomla's own implementation. It has an article Manager, and you can go into its XML Database and look at what Database Values was used and just use the same whatever be the case.[00:23:14](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m14s) Because these values are all movable, and by setting them wrong, could break things. Having created our first field, we can reuse Name and maybe also Description. [00:24:23](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m23s) Those are part of the Demo Component. Since Fields can be linked into any Admin View and therefore belong to any Component, it does not matter if it is already linked to the Demo Component. Although, if it is changed, it will affect both Components.
### Creating a Admin View - Preparations - Object Orientated Development
### Creating an Admin View - Preparations - Object Orientated Development
[00:24:46](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m46s)
Having created our Fieldtypes and also a Field, let's create an Admin View. Admin Views is the back end of the Component. There is a whole lot of tutorials around the web about **Object Orientated Development** to give some perspective into the; How should it work? What should be where? What should have its own classes? What should have it own tables? Where we going to put what? All this preparation should be done before coming to JCB. Once you have all that planned, only then it is possible to create Fields, create Admin Views, which is your Tables which can be linked to a Component. Once that has been done, the foundation is laid of your application. [00:25:53](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m53s) Now you can start to work on that which will make the front end unique.
Having created our Fieldtypes and also a Field, let's create an Admin View. Admin Views is the back end of the Component. There is a whole lot of tutorials around the web about **Object Orientated Development** to give some perspective into the; How should it work? What should be where? What should have its own classes? What should have its own tables? Where are we going to put what? All this preparation should be done before coming to JCB. Once you have all that planned, only then it is possible to create Fields, create Admin Views, which is your Tables which can be linked to a Component. Once that has been done, the foundation is laid of your application. [00:25:53](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m53s) Now you can start to work on that which will make the front end unique.
### Creating Admin Views
[00:26:02](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m02s)
First Admin View. The System Name is to identify the View. If there be more than one View with the name greetings. For example: If you have build quite a few components that deals with Hello World, and have three or four different variations of greetings and say this is the first one.(See video) [00:26:21](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m21s) By doing that it is identifiable within the drop down list across your application of JCB. It will be seen when the greeting is later selected, that the System Name is used in the drop down list.
First Admin View. The System Name is to identify the View. If there be more than one View with the name greetings. For example: If you have built quite a few components that deal with Hello World, and have three or four different variations of greetings and say this is the first one. (See video) [00:26:21](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m21s) By doing that it is identifiable within the drop-down list across your application of JCB. It will be seen when the greeting is later selected, that the System Name is used in the drop-down list.
### Name (single record), Name (list of records)
[00:26:48](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m48s)
There will be a 'Name(single record)' and a 'Name(list records)'. Single record is also the Edit View. That is when you are looking at one record, and are editing that record in the Admin area, that is the single record. That is also what will be used when you tweak JCB to add an Edit option to the Site area of your Website. [00:27:22](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m22s) Since JCB can do that on the fly, this single record would also affect the front end of your component in that case which will be demonstrated later on . I am going to call the single record 'Greeting' and the list record 'Greetings'.
There will be a 'Name(single record)' and a 'Name(list records)'. Single record is also the Edit View. That is when you are looking at one record, and are editing that record in the Admin area, that is the single record. That is also what will be used when you tweak JCB to add an Edit option to the Site area of your Website. [00:27:22](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m22s) Since JCB can do that on the fly, this single record would also affect the front end of your component in that case which will be demonstrated later on. I am going to call the single record 'Greeting' and the list record 'Greetings'.
### Type: Read And Write
[00:27:42](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m42s)
Obviously we want to have the ability to read and write on the Type table. If this is a 'read' only, it means that the data is in this Admin area can not be changed via Joomla. Unless you have added some JavaScript and some other nice conventions around your component that sort of creates data for that area dynamically as people use the component. This turns all the fields in the area as read only, and if an attempt is made to change them, they never get submitted to the Database. Leave it always by Default as read and write .
Obviously, we want to have the ability to read and write on the Type table. If this is a 'read' only, it means that the data is in this Admin area can not be changed via Joomla. Unless you have added some JavaScript and some other nice conventions around your component that sort of creates data for that area dynamically as people use the component. This turns all the fields in the area as read-only, and if an attempt is made to change them, they never get submitted to the Database. Leave it always by Default as read and write.
### Short Description
[00:28:38](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m38s)
Give it a short description. Go to Fields and Conditions. This will be displayed: 'button to create admin field conditions will show once the Admin View is saved for the first time.' So Fields cannot be added to this Admin View if it has not been saved. That is one of the changes that came as result of moving away from Repeatable Fields to Subform Fields. The Admin View is a Table on its own and its relationship with the Fields is also a Table on its own. At this stage you should not click save and close first, but just save once, so that it creates this Admin View in the Database.
Give it a short description. Go to Fields and Conditions. This will be displayed: 'button to create admin field conditions will show once the Admin View is saved for the first time.' So Fields cannot be added to this Admin View if it has not been saved. That is one of the changes that came as a result of moving away from Repeatable Fields to Subform Fields. The Admin View is a Table on its own and its relationship with the Fields is also a Table on its own. At this stage, you should not click save and close first but just save once, so that it creates this Admin View in the Database.
### Fields And Conditions
@ -189,31 +189,31 @@ There is the Name Field and that is a text field. We want it to show in the Admi
[00:31:57](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m57s)
The Next Field that is added, is Greetings. We want the Greetings to be in the Admin List View and want it to be second in the Order in List views, also to be Sortable and Searchable. It does not need to be a Link and should be on the Right in the Tab and to be first in Order in Edit. That is all that are necessary. Click 'save and close'. This will link those Fields to this Admin View. If Fields and Conditions are opened again, those Fields will be seen with all the variations that we have selected; ready to use.[00:32:33](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m33s) With the Admin View that has been set up, our component can be created. Click save and close or just close. No changes had been made in this view since we have returned, this area is already been saved. [00:32:59](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m59s) Click 'close', but clicking 'save and close', is always the safest choice.
The Next Field that is added, is Greetings. We want the Greetings to be in the Admin List View and want it to be second in the Order in List views, also to be Sortable and Searchable. It does not need to be a Link and should be on the Right in the Tab and to be first in Order in Edit. That is all that is necessary. Click 'Save and close'. This will link those Fields to this Admin View. If Fields and Conditions are opened again, those Fields will be seen with all the variations that we have selected; ready to use. [00:32:33](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m33s) With the Admin View that has been set up, our component can be created. Click save and close or just close. No changes had been made in this view since we have returned, this area is already been saved. [00:32:59](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m59s) Click 'close', but clicking 'save and close', is always the safest choice.
### Creating The Component
[00:33:11](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m11s)
Now that the Admin View is in place, the Component can be created. Click 'new'. We are going to give our Component a System Name since this is the second Hello World tutorial, called version 2. It is given a Code Name which is the same as the first one; Hello World, and its Version '2.0.0' [00:33:35](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m35s) It will be necessary to add Company Names, Author, Email, Website and Short Description.
Now that the Admin View is in place, the Component can be created. Click 'new'. We are going to give our Component a System Name since this is the second Hello World tutorial, called version 2. It is given a Code Name which is the same as the first one; Hello World, and its Version '2.0.0' [00:33:35](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m35s) It will be necessary to add Company Names, Author, Email, Website, and Short Description.
### Adding A Admin View
[00:34:01](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m01s)
Now with those things in place the next thing to do would be to add an Admin View. Since the Admin View can only be added once the component has been saved for the first time. 'Save' it. The component has been saved. Open the Admin View, it can be linked to this Component. Under Settings there are two places where this may be done. Click on Component Admin View, and click on this 'Create component admin view for this joomla component'. [00:34:40](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m40s) Or in the Admin Views click: 'Create'. Both these buttons lead to the same place. This used to be the old way to add Admin Views to Components and that is why it has been left there. But within the new JCB after the transition away from Repeatable Fields, it can all be handled within the Admin View Tab. Just click Create. If we are sure all our work is saved; Click 'OK'. Again there is something that looks very similar to that when we were linking the Fields, except that we are dealing with the Admin View and linking Admin Views to this Component.
Now with those things in place, the next thing to do would be to add an Admin View. Since the Admin View can only be added once the component has been saved for the first time. 'Save' it. The component has been saved. Open the Admin View, it can be linked to this Component. Under Settings, there are two places where this may be done. Click on Component Admin View, and click on this 'Create component admin view for this Joomla component'. [00:34:40](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m40s) Or in the Admin Views click: 'Create'. Both these buttons lead to the same place. This used to be the old way to add Admin Views to Components and that is why it has been left there. But within the new JCB after the transition away from Repeatable Fields, it can all be handled within the Admin View Tab. Just click Create. If we are sure all our work is saved; Click 'OK'. Again there is something that looks very similar to that when we were linking the Fields, except that we are dealing with the Admin View and linking Admin Views to this Component.
### Clicking On Plus Button To Open First Line
[00:35:25](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m25s)
Click on the plus Button to open the first line. We need to link the Greeting in View. Leave the Default Icon of Joomla, there are a whole list of Icons available. These icons are Icomoons which are the Joomla Default Icons that are part of the Joomla back end and front end. Search 'Icomoon' and you will find on Joomla's website a whole picture map of all these icons. [00:36:04](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m04s) Then I most certainly want this view to be part of the Main Menu and would like an 'add record' on the Dashboard. If I want a 'list record' on the Dashboard, that means clicking on something and it shows us the list of greetings; I want it in the Submenu.
Click on the Plus Button to open the first line. We need to link the Greeting in View. Leave the Default Icon of Joomla, there is a whole list of Icons available. These icons are Icomoons which are the Joomla Default Icons that are part of the Joomla back end and front end. Search 'Icomoon' and you will find on Joomla's website a whole picture map of all these icons. [00:36:04](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m04s) Then I most certainly want this view to be part of the Main Menu and would like an 'add record' on the Dashboard. If I want a 'list record' on the Dashboard, that means clicking on something and it shows us the list of greetings; I want it in the Submenu.
### Auto Check-in Feature
[00:36:23](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m23s)
The Auto Check-in feature. When a record are created that are stored in the Database and someone else comes and wants to edit that record, and want to prevent people from working on the same record at the same time, since one of them is going to lose their work. Joomla has this feature by which you can check out an item, and when someone else tries to open it, it tells them that it is not available, it has been checked out. [00:36:58](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m58s) Apparently this check-out may be problematic, because if people do not save, and open it maybe to have a look at it, and then instead of clicking cancel or close, they just click back. The item does not get checked back into the database.[00:37:19](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m19s) The Auto Check-in feature is a nice add-on that JCB has set in place, which you can set that an item which are checked out longer than a day, is obviously one that was missed, and should be checked-in automatically. This is one of the reasons why I developed JCB because I have all these little tweaks that I want in all my views but I know that [00:37:46](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m46s) if Joomla changes something and I need to change this little tweak, and have to go to every single view will be cumbersome. Simply click whether you would like this, and if Joomla makes a change that we need to know, and adapt this feature we just change it in the Compiler and it immediately compiles correctly all the components mapped in it.
The Auto Check-in feature. When a record is created that is stored in the Database and someone else comes and wants to edit that record, and want to prevent people from working on the same record at the same time since one of them is going to lose their work. Joomla has this feature by which you can check out an item, and when someone else tries to open it, it tells them that it is not available, it has been checked out. [00:36:58](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m58s) Apparently this check-out may be problematic because if people do not save, and open it may be to have a look at it, and then instead of clicking cancel or close, they just click back. The item does not get checked back into the database.[00:37:19](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m19s) The Auto Check-in feature is a nice add-on that JCB has set in place, which you can set that an item which is checked out longer than a day, is obviously one that was missed, and should be checked-in automatically. This is one of the reasons why I developed JCB because I have all these little tweaks that I want in all my views but I know that [00:37:46](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m46s) if Joomla changes something and I need to change this little tweak, and have to go to every single view will be cumbersome. Simply click whether you would like this and if Joomla makes a change that we need to know and adapt this feature we just change it in the Compiler and it immediately compiles correctly all the components mapped in it.
### Keeping Of History - Feature
@ -239,7 +239,7 @@ Then also does this View have Access, Public Special or Registered all these Acc
I'm just going to add some Permissions, because I want to demonstrate the Permission Structure regarding the front end Management of Editing these items. I'm just going to use the Core. There is the option of using what is known as the view.edit [00:41:22](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h41m22s) instead of core.edit then it means its relationship is just for this view. If I want it to be related to the Core which means that it's not going to be only related to this view, but whatever I change in the Core will affect this view. For more explanation on the permissions there is this tutorial which is available in the Description. You can go watch this tutorial and also maybe do some changes. Compile the Component and look at the code. [00:41:54](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h41m54s) Look at the code and look at the code. That's all I can say for most questions being asked because the code really tells you what has been done. There are many ways for you to learn how JCB does things by making changes and then compiling your component and looking at what changed. Usually using something like Git will be very useful in discovering the changes. There's also a way for you to know where in the Compiler specific code is being created which I will show you as we continue.
Since we've made changes, I'll simply click on save and close. [00:42:36](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h42m36s) This will take us back to the Component. Being back in the component, we'll see that everything is still the way we left it. There is quite a few things around the Admin View which I'm not going to go into depth during this tutorial. I would encourage you to watch the tutorials that are already online for actual explanation on all these features. [00:43:04](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m04s) But to demonstrating a Hello World Component we have done quite enough regarding the back end. All that now remains is to compile, so we'll click save and close and we'll go to the Compiler. Select our Component and Compile. That means we've just written 9000 lines of code, [00:43:36](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m36s) created 51 folders and 122 files. If we were to have manually written this without any boilerplate tool or wire script that could help us write all the classes and tables and stuff and it took us 5 seconds to write one line, it would have taken us 25 hours or about three 8 hour days. [00:44:07](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h44m07s) That's a long it would have taken you to do this manually. So just right there JCB has already saved you quite a lot of time.
Since we've made changes, I'll simply click on save and close. [00:42:36](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h42m36s) This will take us back to the Component. Being back in the component, we'll see that everything is still the way we left it. There is quite a few things around the Admin View which I'm not going to go into depth during this tutorial. I would encourage you to watch the tutorials that are already online for actual explanation on all these features. [00:43:04](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m04s) But to demonstrating a Hello World Component we have done quite enough regarding the back end. All that now remains is to compile, so we'll click save and close and we'll go to the Compiler. Select our Component and Compile. That means we've just written 9000 lines of code, [00:43:36](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m36s) created 51 folders and 122 files. If we were to have manually written this without any boilerplate tool or wire script that could help us write all the classes and tables and stuff and it took us 5 seconds to write one line, it would have taken us 25 hours or about three 8 hour days. [00:44:07](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h44m07s) That's a long it would have taken you to do this manually. So just right there JCB has already saved you quite a lot of time.
### Installing The Component
@ -251,7 +251,7 @@ Now the Component can be installed by clicking this'install com_hello_world_v2_0
[00:44:42](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h44m42s)
Now one thing I didn't do is, I didn't select a Component image. When we selected you see there is no image showing as there is with this one. So I think I want to quickly go back, I'm going to clear the temporary folder and just go select [00:45:01](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m01s) at least the Demo Components Image as our Hello World Component. So in the Component there is this area to select an Image. I'm going to click select and I've selected the Demo Components Package so that we have something. I'm going to save and close again. Now go back to the Compiler and compile it again. I'm going to click on install. If I now go here we'll see that there is now a new Component in this Joomla Website. I'm going to open in a new Tab. [00:45:45](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m45s) There we go we got our Component installed. It has a Greetings Tab and a Add Greetings Tab. We also have not selected images for those. Let's quickly do that. Going back to the Admin Views and then the Greetings I'm going to click on Greetings first as an Admin View. Here you see there is a place for Icons and the Add Icon. [00:46:13](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m13s) I'm going to select Icon. So I've selected this little bucket as the icon for Greetings. I'm going to just add one for adding a Greeting with a little green plus. Now we got it to icons. I'm going to click save and close. I've got Greetings [00:46:39](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m39s) setup and I'm going to go and compile this again. That's usually how things go. We go make a change, we come back to the Compiler to compile it, install it and go look at the Component. When it gets a little bit more advanced, we not only go and look at the Component in Joomla [00:47:03](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h47m03s) but we also go and look at the code. There we got it, the two icons are in place. If I click Add Greeting, we see that there's the Name, there's the Greetings. There's also all these other fields added by default. So the created and the Metadata and the Permissions are all in place. That is how you would setup a basic Hello World Component.
Now one thing I didn't do it, I didn't select a Component image. When we selected you see there is no image showing as there is with this one. So I think I want to quickly go back, I'm going to clear the temporary folder and just go select [00:45:01](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m01s) at least the Demo Components Image as our Hello World Component. So in the Component there is this area to select an Image. I'm going to click select and I've selected the Demo Components Package so that we have something. I'm going to save and close again. Now go back to the Compiler and compile it again. I'm going to click on install. If I now go here we'll see that there is now a new Component in this Joomla Website. I'm going to open in a new Tab. [00:45:45](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m45s) There we go we got our Component installed. It has a Greetings Tab and a Add Greetings Tab. We also have not selected images for those. Let's quickly do that. Going back to the Admin Views and then the Greetings I'm going to click on Greetings first as an Admin View. Here you see there is a place for Icons and the Add Icon. [00:46:13](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m13s) I'm going to select Icon. So I've selected this little bucket as the icon for Greetings. I'm going to just add one for adding a Greeting with a little green plus. Now we got it to icons. I'm going to click save and close. I've got Greetings [00:46:39](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m39s) setup and I'm going to go and compile this again. That's usually how things go. We go make a change, we come back to the Compiler to compile it, install it and go look at the Component. When it gets a little bit more advanced, we not only go and look at the Component in Joomla [00:47:03](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h47m03s) but we also go and look at the code. There we got it, the two icons are in place. If I click Add Greeting, we see that there's the Name, there are the Greetings. There's also all these other fields added by default. So the created and the Metadata and the Permissions are all in place. That is how you would set up a basic Hello World Component.
### Hello World Configuration
@ -269,13 +269,13 @@ Now that we have the Admin area basically done, let's continue to the front end.
[00:48:42](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h48m42s)
The first thing we need to do we need to create what is known as a Dynamic Get. There two ways to get to the Dynamic Get area. One is to click on this Add Dynamic Get. The others would be in the sub menu to go to Dynamic Gets and then click New. We're going to need two Dynamic Gets. We going to need one to return a list of greetings. And then we'll need one to return one greeting. The one Dynamic Get is going to return for us all the greetings that are available and published. The second one is when we click on one of those greetings it should open only that greeting. We going to use the name as who is being greeted, and then the greeting will only show when we click on the name and then show that individual's greeting. That's part of how we think about this at this stage.
The first thing we need to do we need to create what is known as a Dynamic Get. There two ways to get to the Dynamic Get area. One is to click on this Add Dynamic Get. The others would be in the submenu to go to Dynamic Gets and then click New. We're going to need two Dynamic Gets. We going to need one to return a list of greetings. And then we'll need one to return one greeting. The one Dynamic Get is going to return for us all the greetings that are available and published. The second one is when we click on one of those greetings it should open only that greeting. We going to use the name as who is being greeted, and then the greeting will only show when we click on the name and then show that individual's greeting. That's part of how we think about this at this stage.
### Adding Edit/create Buttons Controlled By Permissions Structure Of JCB
[00:50:05](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h50m05s)
In this area where we can see the full greeting we are going to add an Edit button. And in the list area we are going to add a Create button. These Create and Edit buttons are going to be controlled by the Permissions structure which JCB puts into your Component by you just saying that it should be there. Setting up a Dynamic Get is quite easy.
In this area where we can see the full greeting, we are going to add an Edit button. And in the list area we are going to add a Create button. These Create and Edit buttons are going to be controlled by the Permissions structure which JCB puts into your Component by you just saying that it should be there. Setting up a Dynamic Get is quite easy.
### First - Use Back-end View
@ -305,13 +305,13 @@ Then there's a joint area which we not going to use, but it is a very nice way o
[00:53:36](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h53m36s)
The next one is going to be Greeting. We want it to be one item. We going to do a Back-end View. Again from the Greetings(list). This time we want the name and a greeting. We can still use the published. We don't need to modify by. We can leave those(version). We don't need ordering. We could have left out the hits in the previous one we have setup. Let's do a little tweak to make sure that it doesn't allow someone to grab an unpublished value by just adding an ID in the URL or something. Custom Script is Ok. Got this(Joint). [00:54:26](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h54m26s) We need to add a filter. We going to use the ID. Basically passing the ID via the URL. So the State Key will be id and it is going to be a.id in Table Key, equals in Comparison Operator. That's what makes the item load, is this Filter Type and there are many ways to load items. And yes this is a little bit more complex than you might wanted to be but believe me it gives you freedom and ability to build quite amazing things.
The next one is going to be Greeting. We want it to be one item. We going to do a Back-end View. Again from the Greetings(list). This time we want the name and a greeting. We can still use the published. We don't need to modify by. We can leave those(version). We don't need ordering. We could have left out the hits in the previous one we have setup. Let's do a little tweak to make sure that it doesn't allow someone to grab an unpublished value by just adding an ID in the URL or something. Custom Script is Ok. Got this(Joint). [00:54:26](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h54m26s) We need to add a filter. We going to use the ID. Basically passing the ID via the URL. So the State Key will be id and it is going to be a.id in Table Key, equals in Comparison Operator. That's what makes the item load, is this Filter Type and there are many ways to load items. And yes this is a little bit more complex than you might want it to be but believe me, it gives you the freedom and ability to build quite amazing things.
### Dynamic Get Tutorials On GitHub - Wiki
[00:55:07](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h55m07s)
Please go and watch the tutorial on Dynamic Get on GitHub. There is a place, I just show you called Wiki. In the Wiki there is links to all the different tutorials. You should really watch all of that. My encouragement is to really watch everything. I have often seen people ask question [00:55:35](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h55m35s) in the issue area which are dealt with in the tutorials. I'm sorry we all have a lot of things to do and so if I don't answer this questions but simply point you to the tutorial I hope you understand.
Please go and watch the tutorial on Dynamic Get on GitHub. There is a place, I just show you called Wiki. In the Wiki, there are links to all the different tutorials. You should really watch all of that. My encouragement is to really watch everything. I have often seen people ask the question [00:55:35](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h55m35s) in the issue area which are dealt with in the tutorials. I'm sorry we all have a lot of things to do and so if I don't answer this questions but simply point you to the tutorial I hope you understand.
### Two Dynamic Gets Created - Second Return One Greeting