Application development tool
Hey there today I’m going to show you something very special something we think is going to drastically
improve the time it takes for you to build your web apps and here it is it’s called the Builder plug-in
you can use the Builder plug-in to create new plugins and then manage your
database, models, permissions, tructure, back-end navigation, controllers, version history, and also localization.
builder is a rapid application development tool that takes care of the more boring activities and makes programming fun .
Builder plug-in tutorial
Again it’s an important fact that the output generated by builder is no different to files that you would write
by hand so you might notice there’s a little arrow over here if we click that it
shows the list of available plugins.
How to create your first plugin
So let’s get started and create our first plugin so I’m going to call this plug-in library and the author
name can be ( my app, social plugin…….) we can also select an icon from the drop-down list and I’ll
go with (book ) then we’ll just click OK to create the plug-in.
And there’s our new plug-in library so once we have the library plug-in selected the first thing we should do now is create a table for our plugin so every library has some books so let’s call this table books then we need to add some table columns the first table column we should add is an ID that should be an integer and we’ll also make it auto incrementing this will be used as
our primary key for the table then we should add perhaps a title and also slug and perhaps an author as well and maybe a year and a short description the first four columns should be of strings and the short description should be text it’s also a good idea to make the columns null able and then we can go ahead and save.
so check this out what we’ve got here is the PHP code
necessary to build the database table and once we hit save and apply this will generate a real migration file and save it in the plug-in directory look at all this code that we didn’t have to write so let’s go ahead and hit save and apply.
Now the table that we’re seeing here and the table structure has been applied to our database the next thing we might like to do is create a model so we’ll click add and then enter the class name we’ll call this book then select a database table which is already pre-selected and then click OK.
Create model class
Now just like the migration file the model class
that was created is also saved into the plug-in directory now we can use this model to define our form fields and list columns so let’s start with the form fields.
If you click the plus symbol here it will open a new tab
for us where we can define our form fields notice the file name defaults to fields yum or we could call this anything we like we could call it my fields
if we wanted to but let’s just leave this as the default for now and we’ll add our first form control so we click this place holder here add control
then we’ll select a field type of text now if we empty out the field name here and just type in T you can see it’s got the autocomplete fields based on the names that we gave in our database table so this one
will use title and for the label we could just enter title here as well as plain text but the builder allows us to create translatable user interfaces so if we click the plus sign here we can actually create a language key for this label so we might enter the key as book title with the default value of title as well there you can see it’s automatically generated a language key for us and I’ll show you how that works a bit later.
so now we can close this and we’ve got our first forum field called title for our book model just to show you something cool here I actually prefer to have the inspector pinned to the side and you can do that by clicking this little icon here.
Now the properties of the control are shown in the right hand side so let’s change the title to make it required will quickly require icon and then we can close it.