Jump to content
xisto Community
Sign in to follow this  
EricDrinkard

Learning Java By The Book

Recommended Posts

I travel alot so I get a chance to catch up on my reading. I bought a book today about javascripts. I hope this will help me in creating my site which is currently being worked on. I want my site to look professional and effective. I am hoping that this will help in creating this. Next I plan on learning PHP, but since php is harder I will learn this first. I am a fast reader and I hope that I can learn this fast since having a site down for a long time looks bad on the owner. One reason I want to learn Javascript is to protect my site. I want to add a username and passoword protection page to my site that I can use to talk to my members with and allow them access to certain parts of the site that you will not find to entered correctly. Javascript has a lot to offer and I can't wait to learn more about what all it can do. Well got to go. The more time on here the less I can read.ThanksEric Drinkard* Please note that all suggestions are welcome and I would like to thank any one who helps me.

Share this post


Link to post
Share on other sites

First: Java is not JavaScript.

 

You use Java for programming, you will need to compile Java code. JavaScript is a scripting language, most used for clients-ide scripting in webpages. If you want to password-protect things on your website, you really have to use something server-side, either PHP (or similar) or HTTP authentication. JavaScript won't help you protect things.

 

I wish you the best of luck in whatever you want to learn, but if you bought a book about JavaScript, you won't learn any Java, or anything to password protect your site.

 

 

Edit: Please note that JavaScript can be very useful when building websites.

Share this post


Link to post
Share on other sites

I partly agree with bjrn that javascript will not help you with website protection much but it's not totally true that you can't password protect your site with javascript. Because you can make a script to ask for the password before letting someone access it. But there are several flaws:1) People can still look at the source of the page and find the password.2) If they can't find the password they can always save the page on their comp and then delete the script from the source.3) People will always be able to see your souce unless you scramble it)4) If you scramble your souce than you won't be able to edit that site unless you have a backup of that site, edit it, scramble it, and replace the old site with the new site.So I suggest using PHP because PHP is not coded directly into the the source. Which means it would protect your site a lot better than java script. One last thing. bjrn said that Java is for programming and Javascript is a scripting language. That's not true. You can use both Java and Javascript as a programming language. But you can't use java as a scripting language (correct me if i am wrong).

Share this post


Link to post
Share on other sites

I'm pretty sure you can't use Java for scripting, but I'm new to it (started attempting to teach myself through tutorials this week). You can embed Java applets in web pages and do some pretty neat things, though.And if you're going to have a protected part of your site with users and whatnot, PHP is definitely the best. Since it does it's stuff before you load the page (or before you reload, depending on what it's doing), you can't see it in the source. The only way to look at the PHP is if you're on a system with a bunch of users. For example, my school gives us a little bit of webspace with PHP hosted on a UNIX/Linux server and since we can SSH into it, anyone that has the right permissions can go through and look at it in VI. However, I don't think many hosts really do that so PHP is best if you want to have authentication.

Share this post


Link to post
Share on other sites

First: Java is not JavaScript.

 

You use Java for programming, you will need to compile Java code. JavaScript is a scripting language, most used for clients-ide scripting in webpages. If you want to password-protect things on your website, you really have to use something server-side, either PHP (or similar) or HTTP authentication. JavaScript won't help you protect things.

 

I wish you the best of luck in whatever you want to learn, but if you bought a book about JavaScript, you won't learn any Java, or anything to password protect your site.

 

 

Edit: Please note that JavaScript can be very useful when building websites.


Okay if Java is not Javascript then what is the difference?I've been thinking its one and the same thing for a long time now! lol!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.