-
-
Notifications
You must be signed in to change notification settings - Fork 178
004 General Planning
What do you want to build a component In component Builder You need to come prepared There's a number of things that you need to know You need to know what you wanna build You need to know the database structure that you want to Set up These are mostly things that you will only know If you have a great Good 00:00:22 Understanding Of A table And A database and How you Would like to have it mapped Now if you do not know that I could give you some pointers on some of the things you we Needed 00:00:39 And at the same time try to explain Why you need to know these things Ok so We are using Sermon distributor which is a component that I've Developed For Distributing Sermons 00:00:58 We using that as our demo Component that we are demostrating and how to build So you need to know what you gonna called it So we called it Sermon Distributor Then You would need to know The backend views Now the backend views in Joomla Must be 00:01:19 Tightly connected To a Database And possibly In such a way that it Makes sense that the database Naming conventions and everthing follows soot I am not going to be able to To do an extensive Explanation on all this 00:01:37 By just By illustrating what Is the best Convention of implementation Obviously component builder will allow you to You break these convenstions But later you would Regret doing so And Possibly have to 00:01:51 redo a lot of things The purpose being that A lot of these conventions They add up To implementation in other areas like your costum field types and so forth which we will get to in a moment, well not a moment, well not a moment a few videos from now Ok so We first knew that when we were gonna build Sermon Distributor That is four field 00:02:20 Sorry backend views Needed to To be set up Because we wanted these Features Inside of our component And that is the sermons I had a List View Of 00:02:33 Sermons and as well and Editing View of a sermon And they shared a common data Database table And so we had preachers As well as Series list And series And statistic and statistic 00:02:51 And they all share and as you can see they actually Represent two Views But one database table That means two views a listview And an edit view and you will hear me repeat these concepts over and over and if I get Confused are please forgive me as just so much repetition that you need to understand that When I talk about views plural I always talking about the list View If I talk about View Singular 00:03:27 I'm always talking about the editable view which is basically in relation to the backend relay Sorry connection of the database itself So you backend usually forms the connection to the database Your frontend is much more dynamic and that's why we also have a dynamic Get concept which links to site views which is the front of your component these Things will take quite a lot of explanation if you not new if you sorry if you're new to coding and PHP and all that JavaScript CSS You possibly get lost but if you're not you'll be very happy in the way with implemented because it leaves With a lot of Dynamics and maneuverability Which is obviously partly why I developed this component because all the others felt 00:04:21 Other component Builders out there felt like a cookie cutter you know you you can really only Crank out components that are sort of common to each other and I wanted to build something that's really Dynamic so Partly for that the site views and the custom backend views are Mostly the same kind of implementation both drawing their data from The Dynamic get Feature in component builder So you can think of these two, three sorry as working as a team But the backend views stand as the database for these So you need to set up these first and add to them All the necessary Fields which will then map the database 00:05:16 Columns which you can then through the dynamic get connect to so that you can Formulate a data model Which can be reused in your custom backend and in your sight views so I don't know Does that explain it to you let me try again Just to make sure I have everybody on the same page your backend views are very Tightly connected to database structures so even if you were to look at Component Builder itself You have what is called components And if you were to open one it has fields in it And if you want to go to the database 00:06:02 And also open component Builder Component the same table And you to click on structure you would see that the fields That we are seeing Here Here 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 There is name is obviously alphabetical name Codename number images license Email CSS copyright You see it really directly Maps to the database and it is in a way Editing the database through this view So When it comes to the components you're your backend views are all being limited to this kind of Structure And this is not a limitation on component Builders behalf really it's really the way Joomla 00:07:13 wants you to implement it by doing it this way your class is your model your controllers and Everything else just behave right because of that implementation now I know some might feel that is a major limitation but that is the Joomla API's implementation and if you want to Go Beyond that kind of infrastructure you must probably need to look at another Way than using component builder because we only implemented it that way so that your Your backend views directing Maps to the database But because we know that from time to time there is backend views that do not have even there own Database but rather takes these already 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 maybe into a spreadsheet 00:08:17 Or into a Table sorry not a table but a chart or Any other kind of Way we added this custom backend views which behaves on the same Dynamics as The site views which means We trying to give you Best of Both Worlds first being that Strong tightly tight Tighting manage maybe datasets which relates directly to the view and the list View and so forth But at the same time the option of adding a custom backend view which can be dynamic and You know you can really do custom scripting in it you need not need to be concerned about all the other 00:09:08 Overheads as you would usually be So You first need to know your backend views and then any possible custom views That maybe combines backend view so we could possibly in the future we haven't done so yet Possibly takes statistics and sermons And Preachers and series's because these statistics Are taking only the downloads Where us preachers has in them a field called hits And so does sermons have a field called hits that's just when someone opens one Without downloading is necessarily so does series's 00:09:55 But statistics only counts the downloads of sermons so we could possibly add an extra Backend field sorry View custom backend view Called Analysis or anything And Then in analysis we can use the dynamic get Option To get data from all through those tables 00:10:29 These tables basically from that one And Preacher table And a series table Let's shortened it a little by removing That and statisctics And then from them Do what we would call model Modelling 00:11:15 Modelling the data And possibly end up with A whole new Data structure which we can then 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 As these above Views are And it won't won't really have an edit view it will be a Single View Just displaying rows An analysis data From does multiple backend Database Tables And this Can also be done on the front of the site 00:11:59 So That means this whole Get Feature We could Take it Put it under get And we can give it a name and we can call it It is the analysis Get 00:12:17 Get analysis We could call it that And then the analysis view basically get used to get analysis To get the data And then Takes that data and models setting Sorry Displays it on a Page And the same can be done 00:12:37 To the front So the same Dynamic get can be use in The front again So that's sort of how component builder works If you not looking at the fields itself The fields is a discussion on its own but This which I have now sort of just typed out your very basic and alimentary Is really 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 map the field Under each of these So in sermons we will have name And We will have Preacher Right 00:13:23 And we'll have series And we will have Files Right So they should be under Sermons that under preacher We will have also name And we will have Maybe email and discription and 00:13:45 Website and what else Oh maybe I can't I can't hear Same goes for series We will add a name And I think that will be Description of course and by statstics since we only counting downloads we will have a File name 00:14:26 And We will have a counter And we will have 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