Help with web programming

For everything that's not in any way related to PureBasic. General chat etc...
Bonne_den_kule
Addict
Addict
Posts: 841
Joined: Mon Jun 07, 2004 7:10 pm

Help with web programming

Post by Bonne_den_kule »

Hi all!

I working on making a active web page/site, a web page with a kind of script.
But I don't know which scripting lanuage to use. Tried vbscript, but that is only supported with IE. The scripting language must be basic-like.

Any ideas?
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Post by Rescator »

There is a ton out there. VB (think that is called ASP for server side scripting)
Then there is Java, PHP, PERL, python, um Ruby. there's a ton.

Personaly I prefer PHP.
and in one of my current projects, I found it very easy to code the same encryption procedure in both PB and PHP.
PB and PHP has severral similarities. altough most hard is getting used to
PHP defining variables as $variable and PB defining it as variable$ *laughs*
One cool thing tough. PHP commands7lines are terminated with ;
So if you use comments in a PHP script
blabla code here ; // this is a comment


Then copying that straight over to PB you don't have to edit/change the comment.
Same the other way too. if you copy code across a lot,
then getting the habit of using ;// in PB makes it darn easy to copy code between the two for editing/adaption.

check what features your webserver has,
most likely it support PHP + a few other scripting languages.
If it support no scripting languages, then you'll have a hard time
as any scripting then would have to be purely client side which is a pain for large things.
Bonne_den_kule
Addict
Addict
Posts: 841
Joined: Mon Jun 07, 2004 7:10 pm

Post by Bonne_den_kule »

Thanks, but it is a good client side script language?
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post by Beach »

As long as you are not integrating ActiveX components, VBScript/ASP will work fine on alternative browsers. But, if I get to choose, it will be PHP. Once you get the hang of PHP, you can fly through projects... For example, compare the two methods for creating a dynamic array in VBscript and PHP:

VBScript:

Code: Select all

<%@ Language=VBScript %>
<%option explicit
Dim MyArray()
redim MyArray(0)
for i = 0 to 10
  MyArray(i) = "Number: " & i & "<br>"
  redim preserve MyArray(i+1)
next
%>
PHP:

Code: Select all

<?php
for ($i=0;$i<10;$i++) $MyArray[$i] = "Number: ".$i."<br>"; 
?>
It is all going to boil down to a matter of preference, I think you will find PHP is the better option though.
-Beach
Bonne_den_kule
Addict
Addict
Posts: 841
Joined: Mon Jun 07, 2004 7:10 pm

Post by Bonne_den_kule »

The problem is that PHP is a server side scripting, means that I need a web host with php support, and I havent that.

VBScript dosent work on Opera or Firefox/Mozilla/Netscape.
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post by Beach »

If you are looking for a "Client" side language then look no further than JavaScript. In fact, JavaScript works on both server and client. Just choose Javascript as the language in your ASP code or use it directly in a stand-alone page. I think all browsers will talk JavaScript (some of them better than others). :)

I personally use FireFox when testing my JavaScript code. It comes with a JavaScript console that makes it easier to debug.
-Beach
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Javascript is pretty crippled from doing much of anything useful, though.

It depends on what kind of stuff you want to do. VBScript, Flash and Java come to mind. Each have their limitations.
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Post by Rescator »

Bonne, seeing as you live in Norway. I can recommend http://www.domeneshop.no they got some pretty darn cheap hosting solutions. 29,- NOK per month is the cheapest. There's a few competitors that has similar rates. I host both my site at domeneshop, and also my domain name. never had a complaint yet :) They are a pretty stable hoster to.

That is the only suggestion I can give. a "active" website really require
serverside scripting, you will have great difficulty in finding any
active/automatic/selfmainting website out there that does NOT use a serverside script language!

You could always put up your own server at home tough.
Apache, mySQL and PHP works great on Windows too even.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

K Soft (my company) is starting to sell web hosting to the public now. I'll set you up with a developer account (all the goodies!) for $10 per month. Just email sales@ksoftware.net if you're interested.
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Post Reply