Share My Creation Pen&Paper: PWCT for Basic ABMaterial WebApps

Pen&Paper Explained.png



The intension of Pen & Paper is the creation of ABMaterial WebApps as depicted in the drawing above. This was developed as a pet project out of a personal need to create ABMaterial WebApps. So far everything has gone well with the outputs.

1. The ABMaterial Library comes out with an XML file that has vast information about the components (depicted as classed) including their properties (attributes), events and methods. Any Library viewer is able to access these too.
2. These classes are represented as property bags in Pen & Paper so that I can create any component by just changing the various attributes, whether true/false, specifying text etc. The way the components are built, initialized and added to pages/containers/modal sheets has been explained in detail in the ABMaterial Demo, where all of this started.
3&4. On creating an ABM project with Pen & Paper, two databases are created, one to store the project definition (pages and component structures i.e. propertybags) and the other a production one that the data will be stored in. These are both in SQLite. Pen & Paper has functionality to perform a DAO (Data Access Object) link for each backend table and fields you want to link a component to. This is essence creates a CRUD code base. This was inspired by the ABMCRUD generator that produces a structure of ones ABMTable and ABMModal sheet with the specific input components.
5. On Project Build, Pen & Paper produces a complete B4J application including the source code that can be compiled to generate a working version of an ABM Web Application.
6. Pen & Paper does not come bundled with ABMaterial, is not affiliated with ABMaterial and to compile any Pen & Paper project to a fully fledged working ABM Webapp, you need the ABM Libraries. It is just a helper tool to elimitate the repetitive nature of creating projects, pages, containers, modalsheets, etc, in a programming without coding technology fashion. It does NOT in anyway replace ABM or intends to replicate its functionality as it just generates B4J code for your ABM application, this being achieved by use of property bags to create your components and generate the respective source code based on your options, eliminating the need to type code and what anyone gets out is the basic stuff to make ones project work. Not everything ABM is here anyway.

As everything that has a beginning has an end. This personal enjoyment project will stop being maintained as other things will evolve. As on 31 March 2018, there is no intention to advance this any further than what it is. Thanks for B4J this project was possible.

Steps in using Pen & Paper
  • Get everything related to Pen&Paper from this DropBox Link. Get executable from jar folder.
  • See videos below on usage and related articles
  • Please note that not all ABM components are covered with Pen&Paper as yet.

2018 Tutorials

Creating a Sign In Modal Dialog with Options

Interesting Tutorials
2017-12-20

Creating a simple 'Contacts' ABMaterial WebApp - Part 1
Creating a simple 'Contacts' ABMaterial WebApp - Part 2
Creating a simple 'Contacts' ABMaterial WebApp - Part 3

Below are some of the articles touching on code generated by Pen&Paper.

ABMaterial WebApps created with Pen&Paper

Bible.Show

CodeProject Article

Creating the Bible.Show WebApp with ABMaterial

Some YouTube Links


Pen&Paper is built using B4J and distributed with jMashProjectProfile.

NB: You will need the ABMaterial Framework to compile the generated source code.
 

Attachments

  • abmaterial.gif
    abmaterial.gif
    53.1 KB · Views: 13,423
  • MyMaterialLibraries.png
    MyMaterialLibraries.png
    16.4 KB · Views: 1,175
Last edited:

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show: A Play With Icons

What's New

1. Wow, I'm very much enjoying this tool. The latest example is the inclusion of the FontAwesome icons to the tool.
2. The ABMLabel component designer has been added a combobox with all the FontAwesome fonts and those fonts built into ABMaterial Framework.

The color of the icon depends on the LabelTheme used, so I decided to check the RGB colors. Awesome!!!
 

Attachments

  • IconAdd.png
    IconAdd.png
    22.1 KB · Views: 319
  • IconSourceCode.png
    IconSourceCode.png
    8 KB · Views: 352
  • IconSourceCode1.png
    IconSourceCode1.png
    8.8 KB · Views: 336
  • IconsWeb.png
    IconsWeb.png
    4.5 KB · Views: 331

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show: ABMTabs

What's New

I have been trying the ABMTabs component for the better part of the day. So far so good, at least I get to generate the source code for the component. I still need to master the ABMContainer though for a better experience. For now its passed as a Null.

For ease of reference, the design screens now show which component you are working on, Label at the top.

More work is coming here.

1. Define the ABMTab
2. Define the ABMTab(Panel) that sits inside the ABMTabs added with .AddTab method.

Next Steps, Define ABMContainer for each tab.
 

Attachments

  • Tabs_Definition.png
    Tabs_Definition.png
    23.5 KB · Views: 291
  • TabsPanel_Definition.png
    TabsPanel_Definition.png
    23.4 KB · Views: 314

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show: ABMSocialShare

I found a page with some nice social sharing on the demo, so i built along. They are nice buttons, this is so cool. You can specify your own URL here!!!

I have however excluded the AddFaceBookExtended method in my code designer. I was also trying to use different button types for them
 

Attachments

  • SocialShareDisplay.png
    SocialShareDisplay.png
    33.2 KB · Views: 317
  • SocialShareAdd.png
    SocialShareAdd.png
    34.1 KB · Views: 286
Last edited:

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show : ABMCalendar & ABMCalendarEvent

Whooa!!! This is another interesting component added to this Designer. The nice part about this is I got introduced into events, specifically the FetchData event of the calendar.
 

Attachments

  • CalendarDefinition.png
    CalendarDefinition.png
    25.6 KB · Views: 316
  • CalendarSourceCode.png
    CalendarSourceCode.png
    13.6 KB · Views: 303
  • CalendarEventDefinition.png
    CalendarEventDefinition.png
    27.1 KB · Views: 301
  • CalendarEventSourceCode.png
    CalendarEventSourceCode.png
    9.9 KB · Views: 312
  • CalendarDisplay.png
    CalendarDisplay.png
    17.9 KB · Views: 305

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show: ABMDateTimeScroller & ABMDateTimePicker

Wow, other additional controls added. These two controls have a lot more properties than defined here.

I'm in a process of adding scrollers to my pages so that one can add more properties to the Components. For the DateScroller, the properties defined by arrays are hard coded.

Ta!
 

Attachments

  • DatePickerDefinition.png
    DatePickerDefinition.png
    26.5 KB · Views: 300
  • DatePickerDisplay.png
    DatePickerDisplay.png
    36.1 KB · Views: 305
  • DatePickerSourceCode.png
    DatePickerSourceCode.png
    14.6 KB · Views: 308
  • DateScrollerDisplay.png
    DateScrollerDisplay.png
    15.4 KB · Views: 321
  • DateScrollerDisplay1.png
    DateScrollerDisplay1.png
    11 KB · Views: 314
  • DateTimeScrollerSourceCode.png
    DateTimeScrollerSourceCode.png
    29.2 KB · Views: 295

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show : ABMInput

Almost there, my aim is to try and create a WebApp version of my android app using ABMaterial. So far so close. Just finalized the input controls and will start working on the screen designs. I still need to master the grid either way. I will also have to add setting and getting the screen component values.

For some reason the AutoComplete works well on google chrome, firefox didnt display it.
 

Attachments

  • InputDesign.png
    InputDesign.png
    27 KB · Views: 292
  • InputDisplay.png
    InputDisplay.png
    22.3 KB · Views: 290
  • InputDisplay1.png
    InputDisplay1.png
    7.2 KB · Views: 284
  • InputDisplay2.png
    InputDisplay2.png
    11.5 KB · Views: 301
  • InputSourceCode.png
    InputSourceCode.png
    10.5 KB · Views: 300

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show : ABMNavigationBar

Part of the ABMNavigationBar has been completed and it displays nicely. To add is a designer for the top, side buttons and also sub side buttons.
 

Attachments

  • NavigationBar1.png
    NavigationBar1.png
    19 KB · Views: 300
  • NavigationBarDesign.png
    NavigationBarDesign.png
    34.4 KB · Views: 348
  • NavigationBarSourceCode.png
    NavigationBarSourceCode.png
    14.2 KB · Views: 292

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show: NavigationBar (TopItem & TopSubItems)

Well, this has been going smoothly more than I have expected. I have been able to add the ABMTopItem and ABMTopSubItems in the NavigationBar. Yes, I will soon be adding the events handling to these components, but I have been wanting to see if I can design something first.
 

Attachments

  • TopNavigation.png
    TopNavigation.png
    21.5 KB · Views: 276
  • TopItemDesign.png
    TopItemDesign.png
    15.2 KB · Views: 288
  • TopSubItemDesign.png
    TopSubItemDesign.png
    13.7 KB · Views: 280
  • TopNavigationDisplay.png
    TopNavigationDisplay.png
    24.3 KB · Views: 289

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show: What's Coming...

Please Note: So far, this tool is based on the ABMaterial Demo Example

1. Done - ConnectPage builds your component during runtime and thus makes your page dynamic. At times you dont want your components dynamic, so with the coming version of MyMaterial.Show, you can indicate that you want a component "Static" by just checking a checkbox. This will create your component in the BuildPage sub routine, thus inserting that component as part of the generated HTML of that page.
2. When defining a page, you can indicate if it will require Social Media Authorization and then can add the components for that page for Social Media auth.
3. Done - Each component now has a "DB Field" property, with this property you specify the name of the field in the database to save the component contents to. This is used when reading component text to a map variable.
4. Done - Each page definition will have a "DB Table" property to indicate the table name the contents of that page will be saved to.
5. I have added a method to the page called ...GetComponents. This returns a Map of the component contents linked to the "DB Field" property. You can use this map in whatever way you see fit. I will add another Method to assign a map contents from the map to the page components.
6. I have added ShowGridInfo on the Page definition so that you can see your grid, this was interesting. It's important to go through the READMEs done by alwaysbusy, got that there.
7. I have also added all events per each of the components that I have created designers for so far. You can add your code there for the methods.
8. Some tests to be done to see how ABMaterial plays with php. The app I want to concert to a webapp already uses PHP to speak to the MySQL backend.

B4X:
'Get the contents of the page input components and save to a map
Sub frmRegisterGetContents() As Map
    Dim pMap As Map
    pMap.Initialize
    DateTime.DateFormat = "dd/MM/yyyy"
    DateTime.TimeFormat = "HH:mm"
Dim txtFirstName As ABMInput = page.Component("txtFirstName")
pMap.put("firstname", txtFirstName.Text)
Dim txtLastName As ABMInput = page.Component("txtLastName")
pMap.put("lastname", txtLastName.Text)
Dim txtYearJoined As ABMInput = page.Component("txtYearJoined")
pMap.put("yearjoined", txtYearJoined.Text)
Dim txtYearLeft As ABMInput = page.Component("txtYearLeft")
pMap.put("yearleft", txtYearLeft.Text)
Dim txtGradeCompleted As ABMInput = page.Component("txtGradeCompleted")
pMap.put("grade", txtGradeCompleted.Text)
Dim txtEmail As ABMInput = page.Component("txtEmail")
pMap.put("email", txtEmail.Text)
Dim txtMobilePhone As ABMInput = page.Component("txtMobilePhone")
pMap.put("mobilephone", txtMobilePhone.Text)
Dim txtCurrentProfession As ABMInput = page.Component("txtCurrentProfession")
pMap.put("profession", txtCurrentProfession.Text)
Dim txtCurrentInstitution As ABMInput = page.Component("txtCurrentInstitution")
pMap.put("institution", txtCurrentInstitution.Text)
Return pMap
End Sub
 

Attachments

  • PageDesign.png
    PageDesign.png
    32.9 KB · Views: 293
  • EditorDesign.png
    EditorDesign.png
    13.6 KB · Views: 287
  • EditorShowWithGrid.png
    EditorShowWithGrid.png
    44.7 KB · Views: 300
Last edited:

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show

What's New (Some interesting enhancements)

1. The InputTheme for ABMInput has been added to the designer. This changes the IconColor if your ABMInput component has an icon.
2. The ItemTheme has also been added for List Items.
3. Form Validation has also been added for ABMInput, ABMCombo, ABMFileInput Components. I have discussed Form Validation in this post.
4. Form component contents are returnable as a Map variable, this can be passed to the frm... Validate method to validate form input.
 

Attachments

  • InputThemeDesign.png
    InputThemeDesign.png
    33.2 KB · Views: 254
  • ItemThemeDesign.png
    ItemThemeDesign.png
    31.7 KB · Views: 275
Last edited:

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show: What's New

I have re-organized the flow with an opening Welcome page. For now that I have not mastered the SideNavigation of the NavigationBar I have used buttons that navigate to the respective pages.

Please Note: Everything that runs on the MyMaterial.b4j project was created by MyMaterial.Show without writing a single line of source code.

Known Issues

  • For now the ABMTabs do not load as I have not done a designer for Components and ModalSheet thus I have passed Null there
  • ABMIcons do not load on the static pages but only load on ConnectPage, I dont know yet if this is by design

Enjoy

PS: Things that I still need to master (no other component will be implemented after this as I believe this tool will have the basic functionality to create simple WebApps)
  • List
  • GoogleMap
  • SideNavigation
  • ComboBox
  • Table
  • Thee Grid
  • CRUD Generator
 

Attachments

  • Welcome.png
    Welcome.png
    34.2 KB · Views: 305

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show: ABMSocialOAuth

Just finished the ABMSocialOAuth component in the designer. A very simple component. This meant some changes in the page designer were needed.

1. Use Social Auth checkbox was added to the page designer and
2. The RowCell position of where the SocialOAuth component will reside.

You use the More Components > ABMSocialOAuth menu item to add the various SocialOAuth items.
 

Attachments

  • SocialOAthPage.png
    SocialOAthPage.png
    38.1 KB · Views: 283
  • SocialOAuthDesign.png
    SocialOAuthDesign.png
    14.7 KB · Views: 255
  • SocialOAuthDisplay.png
    SocialOAuthDisplay.png
    17 KB · Views: 310

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show : ABMSignaturePad

I have just added the ABMSignaturePad to the designer. This is one interesting component. I'm thinking of a lot of usage for this...

Wow @alwaysbusy , thanks for this framework...
 

Attachments

  • SignaturePad.png
    SignaturePad.png
    24.1 KB · Views: 255
  • SignaturePadDisplay.png
    SignaturePadDisplay.png
    50.6 KB · Views: 277
  • SignaturePadSourceCode.png
    SignaturePadSourceCode.png
    8.8 KB · Views: 263

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show: What's New

1. The ABMInput component has received a 'Match With' component for validation purposes. This is useful where you want to validate the match between two ABMInput components e.g. Password and ConfirmPassword. You select on the latter component which component it should match with. Both the components should be 'Required' / compulsory content.
 

Mashiane

Expert
Licensed User
Longtime User
MyMaterial.Show: What's New

The ABMTopItem component designer for the ABMNavigator has been blinged with a Navigate To property. This enables one to select from the project pages which page to navigate to when that top navigation button is selected. This then overwrites the URL property of that component.
 
Top