-
-
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 Statstics, since we only counting downloads. We will have a File Name, 00:14:26 a counter, a Sermon. Which is the ID but let's just leave it as sermon for now And That will be it So That means if you can 00:14:52 Somehow Map these things Before hand it will help you tremendously The reason being That 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 But then you'd get to obviously you would skip most of these for the initially just getting started You just set up these Fields that are compulsory the ones with the Stars And This component image that tells you here the Dimensions right 300pix X 300pix And you must put it in the image folder And then you can access it from here Let me see 00:15:44 This version updates Is a Nice feature which we will really look into detail later So you'll add all these compulsory fields At settings You would hardly do anything at this stage Scripts as well you just leave blank read me also blank Then add views After you've saved the component once I mean That means you've Now added name and you've added these and you clicked save 00:16:13 Then You'd basically be able to start adding views to it Now 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 But you can create new views through this area and you can also see you're ready connected views and I'll explain this again so maybe this is gonna be a duplication What are you really primarily wanted to show you Is that if you start building a component You feel very lost if you do not know where you going 00:16:48 And This will help you know where you going it will help you know it you need to set up these views And you need to add these Fields to those views And That that kind of information and knowing how to construct this is something that you Need to know before hand Now obviously you can always add more fields And you can obviously add more views it's not that you need to be that forough and be That sure that you didn't miss Missed something It's more that you just need to know what you wanna do 00:17:23 Component Builder cannot decide that for you And you need to realise it you literally have to create all of these Fields before you can add them Into a view and this Line Are seen as a view although it When it's compiled will represent two views It is in component builders Component Backend views It's seen as one view 00:17:50 And these Fields will need to be created before they can be added to this view in the same goes with these The nice thing though is the name field Can You can create it once and use it reuse it 3 times So you can reuse the name field You can also use the hits well Sorry the hits Are already added By Default so you don't need to add an hits field 00:18:17 We'll be talking about the default Fields later In showing you which Fields you don't need to add Yourself but it's add dynamicly To each backend View This being a backend View now This is also a backend view but I'm I would always mention that there is a custom backend View The purpose being that it doesn't directly related to a single Database What gives you the option of pulling from multiple databases as I've explained here And modelling the data and then displaying it So that's sort of a quick overview of how to get started with a component 00:18:57 I realise there's so much more to say but it's very difficult to cover all of that and Hopefully as we go along Whatever questions still remain Will be answered We will be starting At fields So it seems sort of turned around right You might feel we must start at the component and then build the views And then build the fields and you possibly right 00:19:24 And you can do that I mean you can after having created the component You can click your own admin views which is the first Things you need to create is the admin views And click new and create an admin view but again even there You just like with the component only be able to set the bare bone information and not all the needed more Nitty gritty complex information if I could say it so And that's why I usually Sorry wrong file I usually start at the bottom the bottom and work my way up 00:20:02 I usually start with creating all the fields I know I'm gonna need so I will basically Collapse this take these away Like that And Just go create all these fields And when I see there are duplicate Fields I would remove them Because I know we use them So I'll just create Fields that I know are unique And then when I come to certain Fields Like These These are custom fields 00:20:42 These I won't create initially These are the custom fields These are custom fields And I won't create them initially So I would also separate the custom field now how do I know it's a custom field well because the preacher Is a I wanted to pull IDs from the preacher view so if we Ok let's mark those custom Fields again I would like to have This field basically link to that name right a list of these names 00:21:45 And the same for the series I would like it to link to that value And In Joomla you can create what is known as custom fields And component builder makes provision for you to do so But this is what I would call an advanced field And so we'll only 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 a back end views value you see 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 Really know how this is gonna look and that's why we will be only looking at that after I possibly Explain this again but Just that we Let you know where we're going Building a component needs these kind of things 00:22:51 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 knowing exactly well sorry that's the wrong word At least knowing partially what you want to achieve and what you want to build Now that means you can do a lot of paper Planning and do do a lot of sort of structuring Of your component long before actually getting to component builder itself And that's really what this 00:23:33 Short Tutorial was trying to illustrate That if you haven't done this you might get lost and not know where you're heading when you start mapping The Fields and the views and the Things in component build itself Well thank you for watching Next stop 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