Page 1 of 7

PB2Web -- A PureBasic to JavaScript-Converter

Posted: Sun Jan 12, 2014 11:40 pm
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

Re: PB2Web -- A PureBasic to JavaScript-Converter

Posted: Mon Jan 13, 2014 12:30 am
by skywalk
Impressive 8)

Re: PB2Web -- A PureBasic to JavaScript-Converter

Posted: Mon Jan 13, 2014 1:23 am
by rsts
Wow -much appreciated.

Re: PB2Web -- A PureBasic to JavaScript-Converter

Posted: Mon Jan 13, 2014 4:41 am
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!

Re: PB2Web -- A PureBasic to JavaScript-Converter

Posted: Mon Jan 13, 2014 7:15 am
by bembulak
Nice work! Thanks a lot, Kiffi!!!

Re: PB2Web -- A PureBasic to JavaScript-Converter

Posted: Mon Jan 13, 2014 9:45 am
by leonhardt
nice work! keep on going!

Re: PB2Web -- A PureBasic to JavaScript-Converter

Posted: Mon Jan 13, 2014 9:54 am
by srod
Outstanding work Kiffi. This looks fantastic.

Am looking forward to having a tinker with this. :)

Re: PB2Web -- A PureBasic to JavaScript-Converter

Posted: Mon Jan 13, 2014 11:31 am
by falsam
Fantastic !!!! Thank you so much for sharing. I love it. I hope to show an example. :)

Re: PB2Web -- A PureBasic to JavaScript-Converter

Posted: Mon Jan 13, 2014 11:57 am
by GG
Thanks a lot ! Let's try immediatly...
Great work, keep on going, waiting for some not implemented yet commands. :wink:

Re: PB2Web -- A PureBasic to JavaScript-Converter

Posted: Mon Jan 13, 2014 2:26 pm
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)

Re: PB2Web -- A PureBasic to JavaScript-Converter

Posted: Mon Jan 13, 2014 4:20 pm
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:

Re: PB2Web -- A PureBasic to JavaScript-Converter

Posted: Mon Jan 13, 2014 4:40 pm
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

Re: PB2Web -- A PureBasic to JavaScript-Converter

Posted: Mon Jan 13, 2014 5:15 pm
by rudz
Looks pretty good so far, very impressive :)

Re: PB2Web -- A PureBasic to JavaScript-Converter

Posted: Mon Jan 13, 2014 6:33 pm
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

Re: PB2Web -- A PureBasic to JavaScript-Converter

Posted: Mon Jan 13, 2014 7:43 pm
by idle
looks very interesting thanks.