I got this Idea.

JavaScript and client side scripting.

Moderator: General Moderators

User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

I got this Idea.

Post by JellyFish »

Let say you go to geocities.com, you sign up and create a little web page. From what I know geocities and many other free web hosting sites do not have mySQL and PHP installed on there servers. So what if you create a file called database.html, and then you store many javascript variables/arrays in that along with some functions that all work to interact with that files variables/array (e.g. data storage) thus creating a database.

Now when ever you create a html page. Just import that script to be able to use the javascript functions that are like php functions that work with the database.html. Some functions change the variables to different values like "UPDATE" query in mysql. And some functions are use to select values from that script (database.html).


What do you think? If, that is, you understand?
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Post by daedalus__ »

I think it isn't worth the effort when there is lots of very cheap, quality hosting.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

EasyGoing wrote:What do you think? If, that is, you understand?
Javascript wouldn't work. A web based Java client would.
Daedalus- wrote:I think it isn't worth the effort when there is lots of very cheap, quality hosting.
What if you could sell copies of the script?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

if I'm not mistaken, that's what xml is for dude
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

Yeah I thought that xml might come in to this subject. I don't know much about JavaScript and xml. :(

I appreciate all your guy's notions. I just came up with the idea and though it might be of interest. My oppinion: there could be a lot of people that need a free database. :D

PS: links to xml and any simular project like this that may exist do post.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

Yeah I thought that xml might come in to this subject. I don't know much about JavaScript and xml. :(
Javascript wouldn't work. A web based Java client would.
Why is that? I'd think JavaScript be easier. It's basically a collection of data stored in variables and arrays a file (database.html). And to change/select the data you need to include it into each script that needs to connect to the data. In a ways it's very simple and amateur. :)


I appreciate all your guy's notions. I just came up with the idea and though it might be of interest. My opinion: there could be a lot of people that need a free database. :D

PS: links to xml and any similar project like this that may exist do post.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

I'm no expert at Javascript, but if I understand you correctly, your looking for something that would simulate a PHP/MySQL environment. Remember that Javascript runs in the browser, not server side. The only way you would be able to store data (permanently) is if the script would log into your GeoCities account and update the xml/html database.

I think this is beyond the capabilities of Javascript. Java on the other hand would work, however all your visitors would have to install it if they need the ability to update/modify content. This would also expose you as all your visitors would have the username/password to your account.

Possible = Yes
Practical = No
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

Makes sence. But just one Q. So what you're saying is that there is no fopen(), fwrite() type functions in JavaScript as there is in php?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

Nope... javascript doesn't have access to your server....

BUT:

You may want to look into something called AJAX (Google it). This is becoming pretty popular... there a number of AJAX threads here as well. Pretty interesting stuff.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Right

Here is a list..

http://wp.netscape.com/eng/mozilla/3.0/ ... ef_a-c.htm

EDIT: Ajax won't work if you don't have server side scripting..
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

Haha. Your humor tends to paralyze me. I have Googled Ajax, still trying to stamp it into my brain.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

humor? paralyze? what?
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

Sorry must of took your post wrong. As you may not know it's like 1:00 here and I get a little errie. Going to bed.

Edit: I spelt (sorry -> so)
I gotta go to bed lol night.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

EasyGoing wrote:Sorry must of took your post wrong. As you may not know it's like 1:00 here and I get a little errie. Going to bed.

Edit: I spelt (sorry -> so)
I gotta go to bed lol night.
Take that monstrosity out of your signature please! Thank you. :roll:
Post Reply