-
-
Notifications
You must be signed in to change notification settings - Fork 178
004 General Planning
When to build a component, in Component Builder you will need to be prepared. There is a number of things that needs to be known. You need to know what to build. You need to know the database structure that you want to set up. These are the things that you will know if you have a good understanding of the table and of database, and how to have it mapped. If you do not know that, I can give you some pointers on some of the things you will need. At the same time try to explain why you need to know these things. We are using Sermon Distributor which is a component, what I have developed for Distributing Sermons. 00:00:58 Use the demo Component that are demostrating how to build. You need to know what you are going to called it. It is called Sermon Distributor. Then you would need to know back end views. The back end views in Joomla must be 00:01:19 tightly connected to the database. Possibly in such a way that it makes sense that the database naming conventions and everthing that follow soot. 00:01:37 By illustrating what is the best Convention of Implementation, Component Builder will allow you to break these convenstions, but later you would regret doing so and possibly have to 00:01:51 redo a lot of things. The purpose of these conventions, are add up to Implementation in other areas. Like your costum field types and so forth. First, when Sermon Distributor are going to be build, 00:02:20 back end views needed to be set up, because we want these features inside of the component. This is the sermons I have a list view Of. 00:02:33 Sermons and as well as editing view of a sermon. They share a common data database table. Preachers, as well as series list, and series, and statistic, and statistic. 00:02:51 They all share and represent two views, but one database table. That means two views, a list view, edit view. 00:03:27 I am talking about the editable view which is basically in relation to the back end connection of the database itself. The back end usually forms the connection to the database. The front end is much more dynamic and that is why a Dynamic Get concept which links to site views, which is the front of the component. These things will take quite a lot of explanation if you are new to coding, and PHP, and all JavaScript, CSS. 00:04:21 Other component Builders out there felt like a cookie cutter you can really only crank out components that are sort of common to each other, and I wanted to build something that is Dynamic. The site views and custom back end views mostly are the same kind of implementation. Both drawing their data from the Dynamic Get feature in Component Builder. Think of these three as working as a team, but the back end views stand as the database for these. You need to set up these first. Add them to all the necessary Fields which will then mapped the database 00:05:16 columns, which then through the Dynamic Get connect to that you can Formulate a data model. Which can be reused in your custom back end and in your site views. Back end views are very tightly connected to database structures so even if you look at Component Builder itself, you have what is called components, and if you open one, it has fields in it. If you want to go to the database, 00:06:02 and open Component Builder, components table, if you click on structure you would see the fields there: name, name in code, version, version, updates, Bugs, short description, description, copyright. All these names 00:06:31 are actually mapping directly into the database, add licence. These names are alphabetical name, Codename, number, images, license, Email, CSS, copyright. It directly maps to the database and it is in a way editing the database through this view. When it comes to the components, your back end views are all being limited to this kind of structure, and is not a limitation on Component Builders behalf. It is the way Joomla 00:07:13 wants to implement it by doing it this way. Your class, your model, your controllers and everything else behave coorectly because of that implementation. It is a major limitation but that is the Joomla API's implementation. If you want to go beyond that kind of infrastructure you must probably need to look at another way than using Component Builder. We only implemented it that way so that your back end views directing maps to the database. We know that from time to time there is back end views that do not have there own Database, but rather takes saved information in the database. Either from other third-party components or even your own component, because we know that you would like to take that information and remodel it into a spreadsheet. 00:08:17 Or into a chart or any other kind of way we added this custom back end views which behaves on the same Dynamics as the site views. We are trying to give you best of both worlds. First being that strong tightening manage data sets which relates directly to the view and the list view and so forth. At the same time the option of adding a custom back end view, which can be dynamic and you can do custom scripting in it.00:09:08 First you need to know your back end views and then any possible custom views that combines back end view. In the future we haven't done so yet. Possibly takes Statistics and Sermons and Preachers and Series, because these Statistics are taking only the downloads, where as Preachers has in them a field called hits. And Sermons also have a field called hits. When someone opens one, downloading isn't necessarily so does series's. 00:09:55 But statistics only counts the downloads of the sermons, we could possibly add an extra custom back end view called; Analysis. Then in Analysis we can use the Dynamic Get Option to get data from all through those tables. 00:10:29 These tables; Preacher table, series table. Let us shortened it by removing statisctics, and then do modelling. 00:11:15 Modelling the data possibly end up with a whole new Data structure which we can place into a table, or into a chart. In that view which means that it is now dynamic, and no longer directly connected to the Database. 00:11:38 These above views won't have an edit view, it will be a single view. Displaying rows of analysis data. From multiple back end Database tables. And this Can also be done on the front of the site. 00:11:59 We can put this whole Get Feature under get and we can give it a name and call it the Analysis Get. 00:12:17 Get Analysis, We could call it that and the analysis view used to get analysis. To get the data and then takes that data and displays it on a page and the same can be done 00:12:37 to the front. The same Dynamic Get can be use in the front again. That is how Component Builder works. If you are not looking at the fields itself, the fields is a discussion on its own, but this which I have typed out are very basic and alimentary. It is what you need to know before coming to Component Builder. You need to know what you want to achieve. 00:13:05 What do you want to build and if possible mapped the field under each of these. In Sermons we will have Name and we will have Preacher. 00:13:23 We will have Series, and we will have Files. They should be under Sermons. Under preacher we will have also Name, and maybe we will have Email, and Discription, and 00:13:45 Website, and for Series. We will add a Name, that will be Description and Statistics, since we only counting downloads. We will have a File Name, 00:14:26 a counter, a Sermon. If you start in Component Builder you can start by creating a new Component and you can add Name and all this information. 00:15:14 Then you would skip most of these initially just getting started. Set up Fields that are compulsory, the ones with the Stars and this Component image that tells you the Dimensions: 300pix X 300pix. You must put it in the image folder and then access it. 00:15:44 This version update is a nice feature which we will look into detail later. So you will add all these compulsory fields. At settings you would hardly do anything, at this stage. Scripts as well, you just leave it blank. Read me also blank, then add views after you've saved the component. Once you have added Name, and you've added these, and you clicked save, 00:16:13 you basically be able to start adding views to it. The way to add a view to a component, is different from the way to create a view. You adding the view through the settings tab. You can create new views through this area, and you can also see your already connected views. I will explain this again. Maybe this is going to be a duplication. What I primarily wanted to show you, is that if you start building a component, You feel very lost if you do not know where you are going. 00:16:48 And This will help you know where you going. It will help you know if you need to set up these views. You need to add these Fields to those views, and that kind of information and knowing how to construct, this is something that you need to know before hand. You can always add more fields, you can add more views. 00:17:23 Component Builder cannot decide that for you. You need to realize it. You literally have to create all of these Fields before you can add them into a view. This line are seen as a view although when it's compiled, it will represent two views. It is in Component Builders, component back end views. It's seen as one view. 00:17:50 These Fields will need to be created before they can be added to this view. The nice thing though is the name field. You can create it once and reuse it three times. So you can reuse the name field. The hits are already added by Default so you don't need to add hits field. 00:18:17 The default Fields is showing you which Fields you don't need to add but it is add dynamically. To each back end view, I would always mention that there is a custom back end view. The purpose is it doesn't directly relate to a single Database. That gives you the option of pulling from multiple databases as I have explained. Modelling the data and displaying it, It is a quick overview of how to get started with a Component. 00:18:57 We will be starting at fields. It seems turned around. You might feel we must start at the component, and then build the views, and then build the fields! 00:19:24 You can after having created the Component, you can click your own admin views. The first thing you need to create is the admin views. Click new and create an admin view. Again it is just like with the component, you are able to set the bare bone information. I usually start at the bottom, and work my way up. 00:20:02 I usually start with creating all the fields. I will basically Collapse this, and create all these fields. When I see there are duplicate Fields, I will remove them, because I know we used them. I will create Fields, that I know are unique. Then when I come to certain Fields, like these are custom fields. 00:20:42 These I won't create initially. These are the custom fields. These are custom fields. I won't create them initially. I would also separate the custom field. How do I know it's a custom field? Because the Preacher is. I want to pull IDs from the Preacher view. Mark those custom Fields again, I would like to have this field basically link to that Name. A list of these names. 00:21:45 The same for the series. I would like to link to that value. In Joomla you can create what is known as custom fields. Component Builder makes provision for you to do so. This is what I would call an advanced field. We will look at advanced custom fields after we've looked at creating Normal fields and creating actually back end views. 00:22:15 Because only then will you understand the implementation of this custom Field. Since it will be linking to back end views value. It is not just linking to a bunch of values, it is linking directly to this back end views value called Name, and so we can't really create it until we know how this is going to look. That is why we will be looking at that after I possibly explain this again. Just to let you know where we are going. Building a Component needs these kind of things 00:22:51 t0 be thought through and sort of mapped out. Some of us might not need to write it down, some of us do. Depends on who you are. To me that doesn't really matter even if you have these things in your head. As long as you come to Component Builder at least knowing partially what you want to achieve and what you want to build. That means you can do a lot of paper planning and do a lot of structuring of your component long before actually getting to Component Builder itself. That is what this 00:23:33 short tutorial was trying to illustrate. If you haven't done this, you might get lost and not know where you are heading when you start mapping the Fields, and the views, and the things in Component Builder itself. Well thank you for watching Next up. Start looking at Field types And then we'll look at using field types to create fields 00:23:56 And so slowly we'll be Progressing to eventually ending up with having this component Fully functional and working And we will be illustrating all of these Fields as they relate to this back end views that are linked to Database tables And Hopefully that will give you A good enough insight and 00:24:22 understanding of how all this should be done Ok thank you for watching
- Home
- Beta Testing
- Custom Code
- PHP Settings
- Demo Component
-
Tutorials
- Hello World JCB
- Intro JCB Guide
- JCB Installation Steps
- Planning Components
- Field Type Overview
- Basic Fields Creation
- Admin View Management
- Advanced Field Usage
- Admin Component Integration
- Component Setting Customization
- Scripting Components
- Component FTP Options
- Dynamic Get Method
- Site View DynamicGet
- Site View Templates
- Template Setup Guide
- Layout Configuration Steps
- Custom Admin Management
- Adding Site Views
- Custom Admin Integration
- MySQL Demo Tweaking
- Global JCB Settings
- Custom Time Field
- User Helper Integration
- Email Helper Usage
- Message Store Email
- List View Unescape
- Export Import Customization
- Overwrite Custom Fields
- List Field Filtering
- Automatic Code Import
- Manual Code Implementation
- Component Export Import
- Custom Admin Buttons
- Translation Management
- Site View Permissions
- Component SQL Updates
- Site Edit Configuration
- JCB Backup System
- Helper Structure Integration
- JCB v2.5 Upgrade
- Tab Setup Guide
- JCB v2.6 Release
- Extended HelloWorld
- Field Rule Validation
- Community Snippets Intro
- Snippet Forking Tutorial
- Pull Request Snippets
- Library Manager Area
- Excel-based Translation
- Dynamic Router Details
- Database Auto Updates
- Subform Quick Demo
- VDM Package Import
- Dynamic File Inclusion
- File Field Upload
- Drag-n-Drop Upload
- Quick HelloWorld JCB
- Non-database Fields
- Dashboard Customization
- Menu Prefix Toggle
- Community JCB Packages
- Collaborative JCB Workflow
- JCB Package Install
- JCB JAB18 Event
- Convenient New Fields
- Component Language Strings
- Library Functionality Anticipation
- Join Field Relations
- License Template Change
- Code Reusability
- Local Dev Environment
- Extended Field Types
- Joomla Custom Fields
- Custom Field Expansion
- Site View Listing
- Run Expansion Method
- Form Site View
- Field URL Update
- Additional Helper Methods
- Field Validation Rules
- New Placeholder Feature
- Component Config Params
- Per-field Default Values