PB2Web -- A PureBasic to JavaScript-Converter

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Kiffi
Addict
Addict
Posts: 1484
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

PB2Web -- A PureBasic to JavaScript-Converter

Post by Kiffi »

Hello,

i am happy to announce the first public alpha-version of PB2Web.

PB2Web is a PureBasic to JavaScript-Converter so you are able to
write Web-Applications in your favourite programming language. :-)

System requirements:

* Windows OS
* PureBasic V5.20 or greater

If you want to use a direct communication between your client
and a server (so-called Servercode) you need to install also a
webserver (IIS, Apache or similar).

Here you can find an installation tutorial: http://pb2web.de/installation/


Please note, that PB2Web is currently far away to be a complete
solution (~250 from the 1500 PureBasic-Commands are implemented).

The following libraries are not implemented by now:

AudioCD, Cipher, Database, Dialog, Drag & Drop, File, FileSystem, Ftp, Help, Http, Library,
Mail, Memory, Network, OnError, Packer, Printer, Process, Regular Expression, Runtime, Scintilla,
Serial Port, SysTray, Thread, XML, 2D and 3D Games & Multimedia Libraries.

Nevertheless you can already write nice web-applications.

Here there are some Examples: http://pb2web.de/beispiele/


Please note the following rules (for now):

* Do not use event-loops. Better use the new Bind*()-Commands

* Pay attention to name your variables always the same way. Javascript
is case-sensitive; PureBasic not ('myVar' is not equal to 'myvar')

* Initialize your variables (Define myNumber = 0 / Define myString.s = "")

* Do not use Delay(). Better use Timer.


My Website is written in german language, but hey, fortunately
there is google translate ;-) and i am often here.

Moreover PB2Web comes with a lot of sample-code in the example-folder.

Download: http://pb2web.de/download/
Alternative download: http://www.rsbasic.de/backupprogramme/P ... 151214.zip

I'm curious what do you think about PB2Web.

Greetings ... Kiffi
Hygge
User avatar
skywalk
Addict
Addict
Posts: 4210
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: PB2Web -- A PureBasic to JavaScript-Converter

Post by skywalk »

Impressive 8)
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Re: PB2Web -- A PureBasic to JavaScript-Converter

Post by rsts »

Wow -much appreciated.
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: PB2Web -- A PureBasic to JavaScript-Converter

Post by Poshu »

I was following the project on the German forum through google translate (thank god German in a structured enough language so the translation mostly make sense) and I was afraid the project would go down... This might be the biggest PB news since OSX support, thanks a lot!
User avatar
bembulak
Enthusiast
Enthusiast
Posts: 575
Joined: Mon Mar 06, 2006 3:53 pm
Location: Austria

Re: PB2Web -- A PureBasic to JavaScript-Converter

Post by bembulak »

Nice work! Thanks a lot, Kiffi!!!
cheers,

bembulak
User avatar
leonhardt
Enthusiast
Enthusiast
Posts: 220
Joined: Wed Dec 23, 2009 3:26 pm

Re: PB2Web -- A PureBasic to JavaScript-Converter

Post by leonhardt »

nice work! keep on going!
poor English...

PureBasic & Delphi & VBA
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: PB2Web -- A PureBasic to JavaScript-Converter

Post by srod »

Outstanding work Kiffi. This looks fantastic.

Am looking forward to having a tinker with this. :)
I may look like a mule, but I'm not a complete ass.
User avatar
falsam
Enthusiast
Enthusiast
Posts: 632
Joined: Wed Sep 21, 2011 9:11 am
Location: France
Contact:

Re: PB2Web -- A PureBasic to JavaScript-Converter

Post by falsam »

Fantastic !!!! Thank you so much for sharing. I love it. I hope to show an example. :)

➽ Windows 11 64-bit - PB 6.21 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti

Sorry for my bad english and the Dunning–Kruger effect 🤪
User avatar
GG
Enthusiast
Enthusiast
Posts: 266
Joined: Tue Jul 26, 2005 12:02 pm
Location: Lieusaint (77), France

Re: PB2Web -- A PureBasic to JavaScript-Converter

Post by GG »

Thanks a lot ! Let's try immediatly...
Great work, keep on going, waiting for some not implemented yet commands. :wink:
Purebasic 6.12 64 bits - Windows 11 Pro 64 bits 23H2
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: PB2Web -- A PureBasic to JavaScript-Converter

Post by Kwai chang caine »

A super idea to replace hard and dirty JAVA, for open the first door at PB for android 8)
Thanks for sharing 8)
ImageThe happiness is a road...
Not a destination
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: PB2Web -- A PureBasic to JavaScript-Converter

Post by Kwai chang caine »

Just for info, i have testing the code "Window test.pb" with IE the windows move with mouse, but on android she's fix :cry:
ImageThe happiness is a road...
Not a destination
User avatar
falsam
Enthusiast
Enthusiast
Posts: 632
Joined: Wed Sep 21, 2011 9:11 am
Location: France
Contact:

Re: PB2Web -- A PureBasic to JavaScript-Converter

Post by falsam »

Kwaï chang caïne wrote:but on android she's fix :cry:
The concept of window exists in android? (Sorry for my english kcc)

Full screen window. Saves this code in the samples folder

Code: Select all

XIncludeFile "..\p2w.pbi"

P2W_Converter_SetProfile("pb2webtest")

Enumeration
  #mainform
  #name
  #button
EndEnumeration

P2W_Converter_Begin_Raw
  ;$('body').attr("id", "w_" + mainform);
P2W_Converter_End_Raw

Procedure Hello()
  MessageRequester("Welcome", "Hello " + GetGadgetText(#name))
EndProcedure

Procedure WindowShow()
  TextGadget(#PB_Any, 20, 20, 80, 25, "Name")
  StringGadget(#name, 100, 20, 200, 22, "")
  ButtonGadget(#button, 310, 20, 80, 22, "Click Here")
  
  TextGadget(#PB_Any, 20, 150, 500, 22, "Proudly powered by Pure Basic & PB2Web") 
  BindGadgetEvent(#button, @Hello())
EndProcedure

WindowShow()
:arrow: see demo : http://s242132022.onlinehome.fr/pb2web/fullscreen.html
Last edited by falsam on Mon Jan 13, 2014 5:23 pm, edited 1 time in total.

➽ Windows 11 64-bit - PB 6.21 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti

Sorry for my bad english and the Dunning–Kruger effect 🤪
rudz
User
User
Posts: 35
Joined: Sun Mar 21, 2010 6:59 am
Location: Denmark
Contact:

Re: PB2Web -- A PureBasic to JavaScript-Converter

Post by rudz »

Looks pretty good so far, very impressive :)
AMD FX-8350 @ ~4.8GHz | 8GB Corsair DDR3-SDRAM @ 1800Mhz | 7even Ult & Manjaro 0.8.7.1 | PB 5.3
Web: rudz.dk
User avatar
falsam
Enthusiast
Enthusiast
Posts: 632
Joined: Wed Sep 21, 2011 9:11 am
Location: France
Contact:

Re: PB2Web -- A PureBasic to JavaScript-Converter

Post by falsam »

two remarks

■ I think P2W_Converter_SetApplicationName (ApplicationName.s) does not exist

■ the size of the characters of TexGadget is smaller than the size of StringGadget or ButtonGadget
Example : http://s242132022.onlinehome.fr/pb2web/fullscreen.html
Last edited by falsam on Mon Jan 13, 2014 9:14 pm, edited 1 time in total.

➽ Windows 11 64-bit - PB 6.21 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti

Sorry for my bad english and the Dunning–Kruger effect 🤪
User avatar
idle
Always Here
Always Here
Posts: 5834
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: PB2Web -- A PureBasic to JavaScript-Converter

Post by idle »

looks very interesting thanks.
Windows 11, Manjaro, Raspberry Pi OS
Image
Locked