B4J Library [BANanoVueMaterial]: The first complete opensource VueJS UX based framework for BANano

*START OF NOTICE

As of 02 FEB 2021, this project is is no longer maintained as it has given birth to BVAD3.

This project was a joy to create, however like everything that has a start and an end, its time to move on and evolve. BVAD3 is faster, more simpler to implement and takes advantage of the Abstract Designer use.

Subscribe to Telegram Channel

[BANanoVuetifyAD] Vuetify WebSites & WebApps with BANano for Dummies

Ahoy!!!

*END OF NOTICE


UPDATE 24 October 2020: The recommended methodology to create BANanoVuetify WebApp is being discussed here:
MealPrep. This covers most of what VueJS + Vuetify is all about in terms of the internals.

Whilst you can use the designer to create your UX, you need to separate your concerns when creating the app just like its done on the MealPrep by using components and routers for the pages.

DO NOT FOLLOW THE APPROACH USED IN CREATING THE BANANOVUEMATERIALDEMO WHEN CREATING YOUR APPS. THAT METHOD IS NO LONGER FEASIBLE.


Download

BANanoVuetifyAD - Prelease Playlist on Youtube
BANanoVueMaterial (Vuetify) Playlist on Youtube

2020-05-20 Update: Important Update

BANanoVueMaterial Designer Usage - Mock.Compile.Publish

BANanoVueMaterialCore (pure vuetify without extensions)

Exploring Components & Router Basics

How to ask questions, request help, report bugs and request enhancements + Telegram Channel

Thanks to everyone who has been playing with this and highlighting issues and requesting features. You are stars!

*** IMPORTANT: Migrating to the new version

Word. Moving from VueMaterial to Vuetify was inevitable and whilst both are Vue Material based frameworks, Vuetify has more strengths. If if was going to be possible, we would not be having a migration guide, however things changed and enhancements happened and some code rewrites took place. When doing the transition from the VueMaterial to Vuetify codebases, we tried to make the code transition to be as smooth as possible, thus our migration guide is as small as possible. We did not want to dictate how to use the lib, so we removed some things that were hard coded and fixed. This was specific to the side drawer. To test the migration, the old examples were converted to new examples (see below) and all of them work.

BANanoVueMaterial is complete open source, so this means you can use it to your hearts content and adjust it and make it your own. If you enhance, send us word, we will merge. Make the code simple and comment it as much as you can. I cannot over-emphasize that Vuetify is LARGE, so check their website on how components are created and used to learn stuff. Do enjoy. TheMash. #IAmLovingThis

BANanoVuetify (recommended for new projects & migration notes attached)

You can track our progress from here. All the components that we got from VueMaterial exists in Vuetify and more!!!

  • Copy all the files in the 1. External Libraries folder to your B4J external libraries folder
  • If you want to explore the BANanoVuetify source code, open and run the project in 2. Library
  • If you want to explore all the components in this version, open and run the project in 3. Demo
  • You can also explore other specific examples from the 4. Examples folder
Live Preview



Tutorials (New)

Mock.Compile.Publish


NB: Download and Import the Project Components files for the Expense Tracker here.

1. Expense Tracker with BANanoSQL


Expense Tracker Part 1
Expense Tracker Part 2
Expense Tracker Part 3
Expense Tracker Part 4
Preparations for Part 5
Expense Tracker Part 5.1
Expense Tracker Part 5.2

2. Expense Tracker with SQLite (you need to understand all of 1. Expense Tracker with BANanoSQL first!)

Making your app use SQLite as a backend
Mock.Compile.Publish Expense Tracker with SQLite as BackEnd Full Implementation

3. Expenses Tracker with MSSQL (you need to understand all of 1. & 2. above first!)

Mock.Compile.Publish Expense Tracker with MSSQL as BackEnd

4. Expense Tracker with MySQL (you need to understand all of 1. - 3. above first)

Mock.Compile.Publish Expense Tracker with MySQL as BackEnd

NEW NEW NEW!!!! Handling Events

Developing a grid with the Designer
Developing forms with the Designer
Designing text field controls with the Designer
Designing text area controls with the Designer
Designing password controls with the Designer
Designing images with the Designer
Designing file input with the Designer
Designing buttons with the Designer
Designing checkboxes with the Designer
Designing switches with the Designer
Designing icons with Designer
Designing labels with Designer
Designing sliders with the Designer
Designing select, combo and autocomplete with the Designer
Designing radio boxes with the Designer
Designing date & time pickers with the Designer (NB: functionality works on your app)
Designing a parallax with the Designer
Designing a container with the Designer
Designing the appbar, toolbars and systembar with the Designer - Part 1
Designing the appbar, toolbars and systembar with the Designer - Part 2
Drag n Drop Menu - Part 1
Drag n Drop Menu - Part 2
Drag n Drop Carousel
Drag n Drop Dialog
Drag n Drop Rating
Drag n Drop SpeedDial
DataTable multi selects
SetFocus(?)
Invisible File Selector
DataTable GetItemKeys
Drag n Drop Chips
Drag n Drop Badges
Drag n Drop Avatars
Exporting Component Schemas (Multi Development Mode)
Importing Component Schemas (Multi Development Mode)
Drag n Drop Lists
Drag n Drop Tabs
Drag n Drop Stepper
Drag n Drop ExpansionPanels (Accordion)
Drag n Drop Page
Setting Project Properties
Reading Text files (without upload to server)
Reading Excel files (without upload to server)

Reporting (New)

Excel Client Side Reporting with OXML

Example Projects

Hello World
Navigation (1 or more pages using v-show directive)
Login Screen
User Registration Screen
Expenses.Show - MySQL+PHP+ChartKick CRUD
Form Utilities - BANanoSQL CRUD
Calculations - using watch directives

IMPORTANT: Asking Questions about BANanoVueMaterial

1. Please do not ask questions on this thread as this is about updates and new developments about BANanoVueMaterial.
2. When asking a question, please use the B4J Forum and prefix your question with [BANanoVueMaterial] Your Question
3. As the author of this lib, I would recommend that in the content of your question you also address it to myself with @Mashiane (this will also help me find and attend to your questions faster as it will show in my personal notifications)

Related Content

BANanoVue - a now updated CORE of BANanoVueMaterial
BANanoWired - a mockup framework build on BANanoVue (WIP)
BANanoPDFDesign - a creation based on BANanoVueMaterial for PDF reporting (WIP)
BANanoVMDesign - this intends to support BANanoVueMaterial design philosophy. (WIP)

Have fun and enjoy!

PS: BANanoVueMaterial uses an updated version of the BANanoPostProcessor library done by Kiffi.
 
Last edited:

Mashiane

Expert
Licensed User
Longtime User
BANanoVuetify 3.03 - Drag n Drop Selects, AutoComplete and Combo

To simplyfy development we have merged the Select, AutoComplete and Combo into VMSelect control. The source of data for these can be a map or a datasource from a list of records stored in a database. When using a map, one is provided with an option to specify the Item Values and Item Text values. These needs to be separated by ,.

For a database based source, one specifies the 'source table', 'item value' field and also the 'item text' field. For example

B4X:
Dim states as list
states.initialize
states.add(createmap("id":"1","name":"State 1"))
states.add(createmap("id":"2","name":"State 2"))
states.add(createmap("id":"3","name":"State 3"))
states.add(createmap("id":"4","name":"State 4"))

We save the list to the state of the app

B4X:
vm.SetData("mystates", states)

So as a data source, we will use "mystates" - meaning the state we have saved the list to for the list.

The item value will be the 'id' in each map record. This identfies each state uniquely.
The item text will be 'name' as it links to the name to be returned.

datasource.png


To use map values, one needs to select 'Use Options' in the property bag. This will use the '1,2,3' and 'One,Two,Three' as specified in item values and item texts and not the datasource.

This will be defined as

B4X:
Dim select3keys As String = "1,2,3"
Dim select3values As String = "One,Two,Three"
Dim select3map As Map = vm.keyvalues2map(",", select3keys, select3values)
Dim selselect3 As VMSelect = vm.NewSelectOptions(Me, true, "selselect3", "select3", "select3", true, false, "", select3map, "id", "text", false, "", "", 0)
selselect3.SetClearable(true)

NB: Watch in HD



AutoCompletes

Dragging and Droping AutoCompletes is the same as selects as the same component is being returned i.e. VMSelect. One just drags and drops it in the designer and uses the similar process as completing the Select property bag.

Combo boxes

Dragging and Droping Combos is the same as selects as the same component is being returned i.e. VMSelect. One just drags and drops it in the designer and uses the similar process as completing the Select property bag.

You can check the Vuetify documentation on the differences of these controls and what they offer.

Ta!
 
Last edited:

Mashiane

Expert
Licensed User
Longtime User
BANanoVuetify - Creating Client Side Excel Reports

We have updated the Excel example to be able for one to generate an excel report for the expenses.


Let's look at the code. We are directly getting the records from the database and then feed them to the BANanoOXML engine.

B4X:
Sub PrintExpenses
    Dim oxml As BANanoOXML
    oxml.initialize("expenses.xlsx")
    Dim rpt As BANanoObject = oxml.WorkSheet("Expenses")
    'create a heading for the report
    oxml.SetText(rpt, 1, 1, "Expenses Report")
    'merge the heading
    oxml.Merge(rpt, "A1:E1")
    Dim rowH As BANanoObject = oxml.GetRow(rpt, 1, 1)
    Dim hstyle As OXMLStyle = oxml.CreateStyle
    hstyle.bold = True
    hstyle.fontSize = 18
    hstyle.hAlignment = "center"
    hstyle.vAlignment = "center"
    oxml.SetStyle(rowH, hstyle)
    'put border on merged rc
    Dim colCnt As Int
    For colCnt = 1 To 5
        Dim colH As BANanoObject = oxml.GetCell(rpt, 1, colCnt)
        oxml.SetStyleBorder(colH, oxml.colors_black, oxml.BorderThin)
    Next
    
    'add the headers
    oxml.SetRow(rpt, 2, 1, Array("Date", "Category", "Type", "Description", "Amount"))
    'get all the expenses we need to report on
    Dim qry As String = "select expenses.id, expenses.expense_date, expenses.expense_description, expenses.expense_amount, expensecategories.text as expense_category,"
    qry = qry & "expensetypes.text As expense_type from expenses, expensecategories, expensetypes where expenses.expense_category = expensecategories.id and expenses.expense_type = "
    qry = qry & "expensetypes.id order by expenses.expense_date desc"
    Dim dbsql As BANanoMySQL
    dbsql.Initialize(Main.dbase, "expenses", "id")
    dbsql.Execute(qry)
    dbsql.json = BANano.CallInlinePHPWait(dbsql.methodname, dbsql.Build)
    dbsql.FromJSON
    If dbsql.OK Then
        Dim rowCnt As Int = 3
        'loop through each expense record
        For Each expmap As Map In dbsql.result
            Dim sexpense_date As String = expmap.Get("expense_date")
            Dim sexpense_description As String = expmap.get("expense_description")
            Dim sexpense_amount As String = expmap.get("expense_amount")
            Dim sexpense_category As String = expmap.get("expense_category")
            Dim expense_type As String = expmap.get("expense_type")
            '
            Dim rptLine As List
            rptLine.initialize
            rptLine.AddAll(Array(sexpense_date, sexpense_category, expense_type, sexpense_description, sexpense_amount))
            oxml.SetRow(rpt, rowCnt, 1, rptLine)
            rowCnt = rowCnt + 1
        Next
        'add a total for the amount
        oxml.SetFormula(rpt, rowCnt + 1, 5, $"SUM(E3:E${rowCnt})"$)
        'apply borders to all the rows
        Dim rowStart As Int
        Dim rstyle As OXMLStyle = oxml.CreateStyle
        rstyle.borderColor = oxml.colors_black
        rstyle.borderthickness = oxml.BorderThin
        For rowStart = 2 To rowCnt
            rstyle.bold = False
            Dim rptr As BANanoObject = oxml.GetRow(rpt, rowStart, 1)
            If rowStart = 2 Then rstyle.bold = True
            oxml.setstyle(rptr, rstyle)
        Next
        'number format column from where amounts start
        Dim amt As BANanoObject = oxml.GetColumn(rpt, 3, 5)
        Dim cstyle As OXMLStyle = oxml.CreateStyle
        cstyle.numberFrmat = "#,##0.00 ;[Red](#,##0.00)"
        cstyle.borderColor = oxml.colors_black
        cstyle.borderthickness = oxml.BorderThin
        oxml.SetStyle(amt, cstyle)
    Else
        Log("modExpenses.Refresh: Error - " & dbsql.error)
    End If
    
    
    oxml.download(Me, "onDownload")
    
End Sub

Sub onDownload
    vm.ShowSnackBar("Expenses report downloaded!")
End Sub
 

Mashiane

Expert
Licensed User
Longtime User
Exciting!!! Exciting!!! Exciting!!! A new thread about initializing and handling events!!

 

Mashiane

Expert
Licensed User
Longtime User
Drag and drop a Container

A container is the root layout of all designs. When you design your page, the underlying component that you create is a container and controls are added to it and the grid is designed based on your requirements.

In all instances of the components we designed above, the underlying root component would have been the container. Now this is how we will create the container with the designer. When we specified the matrix of R1C1, we were indicating that that respective component will be placed on that particular location of the container.

A container is a div with a container class added to it. It can be fluid, have elevation etc etc. Let's watch.



NB: The designer is working in static mode and does not page refresh. As a result we have a known issue of the datetimepicker (not showing, a bug we will sort soon)
 

Mashiane

Expert
Licensed User
Longtime User
Drag and Drop the Toolbar - Part 1 (This applies for AppBar, ToolBar and SystemBar)

Download

In this part 1 of this toolbar thread, we explore how we can drag and drop a toolbar to our stage to create our code. There are 3 types of toolbars for Vuetify, these are

1. The AppBar
2. The ToolBar and
3. The SystemBar

Using a radio group, one is able to select any type of toolbar they need.

In Part 2 we will look at adding iconbuttons, search, menus and other buttons. Watch this space! Above all else.. Enjoy!

NB: Watch in HD



PS: You can directly run the designer without installation directly from this github link
 

Mashiane

Expert
Licensed User
Longtime User
@Rubsanpe Thanks for your encouragement and appreciation.

Please note that this is how we ask questions about this library. This is indicated on the 1st post.

IMPORTANT: Asking Questions about BANanoVueMaterial

1. Please do not ask questions on this thread as this is about updates and new developments about BANanoVueMaterial.
2. When asking a question, please use the B4J Forum and prefix your question with [BANanoVueMaterial] Your Question
3. As the author of this lib, I would recommend that in the content of your question you also address it to myself with @Mashiane (this will also help me find and attend to your questions faster as it will show in my personal notifications)

If you have followed all the instructions about how to set up your IDE and as indicated in the 1st post, you should not experience any problems.

I cannot reproduce your error on my side. Try and click Project > Clean Project and also Window > Reset

Anyway, this is my configuration and everything is fine. The reported issue about the post processor though is not really an issue.

config.png
 
Top