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,337
  • MyMaterialLibraries.png
    MyMaterialLibraries.png
    16.4 KB · Views: 1,062
Last edited:

Mashiane

Expert
Licensed User
Longtime User
Pen-N-Paper: ABMGenerator Designer

This designer is helpful to create ABMTable and ABMModalSheet combos with CRUD functionality. You link the generator with an underlying SQLite table and specify some otpions and then the code is generated to Create, Read, Update, Delete records. This has been re-vamped for a consistent feel for everything ABMContainer based.

1. You create the database table
2. You add a new abmgenerator and through the
3. Field Selector - select the fields to be handled by the ABMGenerator.
4. Field Properties - specify some few things like RCs and proper titles and component types etc
5. ABMComponents - for each field selected, specify additional properties
6. Save the ABMGenerator designer to have all the components created and then compile the project.

Creating components for ABMPage, ABMContainer, ABMModalSheet and ABMGenerator now follows the same approach demo-ed below.


In this video you see the ABMGenerator designer, then the ABMModal sheet generated from that code and then one of the components, an ABMRadioGroup, the code generated based on the options specified based on properties available. You can hover on a property in the property bag to view what it means.

For the components above, as long as you are clear where they will sit in the RC structure, the grid code based on OS (Offset Small), SS (Size Small), PL (Padding Left) etc you specify, the cells are added using OSMPV.
 

Mashiane

Expert
Licensed User
Longtime User
Pen-N-Paper: ABMApplication Designer

The application designer has been re-vamped to ensure that everything is in one place, a good example is everything that has to do with the back end of your application. Things about email configuration, the master structure of the navigation bar, the backend database (currently SQLite) are easy to configure.


The email settings specified here are written to your app as the default email smtp settings. These you can also test by sending an email. As noted, a password view control has been added to hide important things. This has been made to be toggle based.

Will upload a jar as soon as I have debugged some issues. This is still relevant to ABMaterial 4.03.
 

Mashiane

Expert
Licensed User
Longtime User
Feature Rehap: Multiple User Development

At times, you might want to have a couple of developers to work on different sections of your ABM app that is being developed with Pen N Paper. The video below shows how one can

1. Export a component existing on a page and
2. Import the exported component to another project.

Whilst the demo shows two projects to export and import from, one can export and import a component to different pages in the same project. Exporting a component and importing it, saves all the Pen N Paper properties for the component for the reading and the writing. Where a component exists, a prompt will be shown indicating possible replacement of the component.


NB: Also on the 'Page' menu option, one is able to Export a complete page with its components and also import it. Thus, one can design and finish a whole page, test it and when complete, export it and then email the generated page & components file to another user someone else, who can then use the same Page menu to import the page in a multi user development based project.

Good luck!
 

Mashiane

Expert
Licensed User
Longtime User
Excellent project, I would like to try it, but I can not find the download link. How can I download it please?
Thank you for the vote of confidence, did you check the first post? Im sure its there. It will take you to dropbox, you will need mashplugins and also the jar folder contents.

Good luck all the best.
 

Roberto P.

Well-Known Member
Licensed User
Longtime User
excellent tool to simplify the writing of code for ABMaterial. This too is very vast. Before taking time to get to know him, I wanted to understand if he is still in the maintenance phase?

There is an operating error in the bibleshow project, see error:

at b4j.bibleshow.main.main(main.java:28)
Building core.min.1589700857545.css...
2020-05-17 09:34:18.003:INFO::main: Logging initialized @780ms to org.eclipse.jetty.util.log.StdErrLog
2020-05-17 09:34:18.117:INFO:eek:ejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 1.8.0_60-b27
2020-05-17 09:34:18.163:INFO:eek:ejs.session:main: DefaultSessionIdManager workerName=node0
2020-05-17 09:34:18.163:INFO:eek:ejs.session:main: No SessionScavenger set, using defaults
2020-05-17 09:34:18.165:INFO:eek:ejs.session:main: node0 Scavenging every 660000ms
2020-05-17 09:34:18.200:INFO:eek:ejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@543c6f6d{/,file:///C:/B4J/ABMaterial/Tools%20addon/Pen%20&%20Paper/Projects/BibleShow1/Objects/www/,AVAILABLE}
2020-05-17 09:34:18.203:INFO:eek:ejs.AbstractNCSARequestLog:main: Opened C:\B4J\ABMaterial\Tools addon\Pen & Paper\Projects\BibleShow1\Objects\logs\b4j-2020_05_17.request.log
2020-05-17 09:34:18.249:INFO:eek:ejs.AbstractConnector:main: Started ServerConnector@954b04f{HTTP/1.1,[http/1.1]}{0.0.0.0:51047}
2020-05-17 09:34:18.249:INFO:eek:ejs.Server:main: Started @1028ms
2020-05-17 09:34:18.303:INFO:eek:ejs.AbstractConnector:main: Stopped ServerConnector@954b04f{HTTP/1.1,[http/1.1]}{0.0.0.0:51047}
2020-05-17 09:34:18.304:INFO:eek:ejs.session:main: node0 Stopped scavenging
2020-05-17 09:34:18.306:INFO:eek:ejsh.ContextHandler:main: Stopped o.e.j.s.ServletContextHandler@543c6f6d{/,file:///C:/B4J/ABMaterial/Tools%20addon/Pen%20&%20Paper/Projects/BibleShow1/Objects/www/,UNAVAILABLE}
abmapplication._startserver (java line: 284)
java.lang.RuntimeException: Method: getSessionManager not found in: org.eclipse.jetty.server.session.SessionHandler
at anywheresoftware.b4j.object.JavaObject$MethodCache.getMethod(JavaObject.java:363)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:120)
at anywheresoftware.b4j.object.JavaObject.RunMethodJO(JavaObject.java:139)
at b4j.bibleshow.abmapplication._startserver(abmapplication.java:284)
at b4j.bibleshow.main._appstart(main.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
at b4j.bibleshow.main.main(main.java:28)
main.main (java line: 28)
java.lang.RuntimeException: java.lang.RuntimeException: Method: getSessionManager not found in: org.eclipse.jetty.server.session.SessionHandler
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:120)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
at b4j.bibleshow.main.main(main.java:28)
Caused by: java.lang.RuntimeException: Method: getSessionManager not found in: org.eclipse.jetty.server.session.SessionHandler
at anywheresoftware.b4j.object.JavaObject$MethodCache.getMethod(JavaObject.java:363)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:120)
at anywheresoftware.b4j.object.JavaObject.RunMethodJO(JavaObject.java:139)
at b4j.bibleshow.abmapplication._startserver(abmapplication.java:284)
at b4j.bibleshow.main._appstart(main.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
... 2 more

thank

regards
 
Top