The lack of template in b4x, could be its achilles heel?

Alejandro Moyano

Member
Licensed User
Hi i 💕 B4X , but thinking about how we work I see some pattern.. as b4x community lack of templates:

For example, at work (where i backend dev), when must to do an app:

1) we get requirements, define the colors, modules and use cases, define kanban, etc
2) we go to themeforest an choose a beautiful template.
3) we do an compile on cordova (i know is a quite old school but most people unknow)
4) we compile as pwa

Next example, we must do an site:

1) we get requirements, define the colors, modules and use cases
2) we go to themeforest an choose a beautiful template based on bootstrap and laravel
3) we develop
4) deploy on shared or vps

What i see is as developer we always use templates for gui, most small teams do it as can't afford a full time designer.
Plus users wanna awesome interfaces, with animations, shadows, etc.

How we can get gui beating apps like framework7 or Bootstrap with same work?
I know its possible as some forum gui project are nice, but can't beat a 19 dollar template with 100 controls!
 

Alejandro Moyano

Member
Licensed User
It IS possible to create Template for B4X IDEs (see this post) but it seems that, if someone has created some, apart from EREL, no one is sharing...
What i means full templates with styles and premade pages like this:


Most time u only need buy one and develop using their interface then u app looks beautiful besides u as dev have bad taste.
I would love to see an integrated store on this page where u can browser designs preview a video buy it and create the app on top of it, as we do on work.
 

oparra

Well-Known Member
Licensed User
Estimated,

I know what you mean by B4X templates.

I have developed a view or component framework B4X (similar to Bootstrap), which we use to create our projects or templates.

as in your example:


If you want you can contact me.

Regards.
 

HAH

Well-Known Member
Licensed User
Easily you can do it with B4X ..
1) we get requirements, define the colors, modules and use cases, define kanban, etc
2) we go to themeforest an choose a beautiful template (html template).
3) we do an embedding html template in B4X webview
4) we compile as pwa (Progressive Web Application: HTML files with thier assets cached to web browser on first opening online then can be worked offline)
5) we compile as apk (android), api (iOS) or exe (Desktop)
DONE

see example created within 5 minutes using B4A webview ..
 

Attachments

Last edited:

HAH

Well-Known Member
Licensed User
@LucaMs I agree with you, but post creator search about fatest development approach with exist pwa template (i.e. themeforest repository)
 

Alejandro Moyano

Member
Licensed User
Easily you can do it with B4X ..
1) we get requirements, define the colors, modules and use cases, define kanban, etc
2) we go to themeforest an choose a beautiful template (html template).
3) we do an embedding html template in B4X webview
4) we compile as pwa (Progressive Web Application: HTML files with thier assets cached to web browser on first opening online then can be worked offline)
5) we compile as apk (android), api (iOS) or exe (Desktop)
DONE

see example created within 5 minutes using B4A webview ..
Yes you could do, u can even use BANANO con Vuetify to avoid the pain of use JS.

I'm not sure (I don't think) he wants to use templates for the web.
Yes what I means is for professional use (apps to sell as freelancer or startup) the regular B4X UI lose against PWA frameworks with cheap templates like Framework7, and performance is not bad (but far for B4X performance)
For example if u go to https://framework7.io/ the design is a quite ugly, but u can buy an template with beautiful style, that saves hour and hours of design and let you focus on the app, with limited taste using those framework your app looks competitive.

I'm not saying that B4X could not have the potential, what I means is that the lack of ready made design may been a reason for drop the use of most professional scenarios where time is limited and are mostly CRUD based apps where performance is not so important.
 

Alejandro Moyano

Member
Licensed User
The question is different, using WebViews is not the solution (4. ???)

Having a method, templates to customize the appearance of the XUI Views, for example, which are common to the 3 platforms, would be useful/pleasant, but not easy.
An performance on desktop will be a nigthmare as the javafx webview rendering is not good.
 

Enrique Gonzalez R

Well-Known Member
Licensed User
How we can get gui beating apps like framework7 or Bootstrap with same work?
Hi Alejandro! i have sucessfully paired Boostrap templates (any template actually, it doesnt need to be a jquery based template) with B4J, i was inspired with other languages and web frameworks so i created a framework of mine based on the Server Side Rendering technique (a la Rails and Django).

Currently i am trying to implement Tailwind CSS, its just a matter of time before i do it!

My dream is to pair this framework with an ORM based model because as of now i use raw sql queries.
 

Alejandro Moyano

Member
Licensed User
Hi Alejandro! i have sucessfully paired Boostrap templates (any template actually, it doesnt need to be a jquery based template) with B4J, i was inspired with other languages and web frameworks so i created a framework of mine based on the Server Side Rendering technique (a la Rails and Django).

Currently i am trying to implement Tailwind CSS, its just a matter of time before i do it!

My dream is to pair this framework with an ORM based model because as of now i use raw sql queries.
Yes but my main idea was the trouble of get competitive native UI on B4X without have a designer, something that u can address in another hybrid frameworks trough templates.

Another topic are server side pages!

That CSS framework seems great. Do u server side rendering use jinga2 style?
 

Enrique Gonzalez R

Well-Known Member
Licensed User
Yes but my main idea was the trouble of get competitive native UI on B4X
Sorry when i saw you wrote Bootstrap i thought you meant web development.
I couldnt say much about webview apps, i wouldnt use anything related to cordova but there are other approaches that does better like the Hotwire approach.

Do u server side rendering use jinga2 style?
yes thats correct!

it looks like this:
B4X:
Dim root As Map
        root.Initialize
        root.Put("name",req.GetSession.GetAttribute("name"))
        root.Put("id",id)
   
        If id = "0" Then
            root.Put("verbo","Crear")
        Else
            root.Put("verbo","Modificar")
        End If
   
        Dim recurrente As Map = getRecurrente(req,id)
        utils.JavaMapMerge(root,recurrente)
   
        Dim t As Template = Main.templates.getTemplate("recurrente.html")
        resp.CharacterEncoding = "utf-8"
        resp.Write(t.stdOut(root))
each key of the root map is a variable i can use in the templates, it supports complex types like list and maps.
1623686660947.png


and the template looks:
1623686531459.png

as you can see i recycle the views calling them from their own files.

Anyway, Allain (abmaterial creator) saw the same problem as you and created his own designer, it is about on how much you love the language and how much time you are willing to invest.
 
Top