LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Web Programming Language for Beginner (https://www.linuxquestions.org/questions/programming-9/web-programming-language-for-beginner-587869/)

glock19 09-27-2007 08:25 PM

Web Programming Language for Beginner
 
My goal is to write a personal homepage. I will register my own domain and host it on a server that I physically own and operate.

I am a programming beginner. The only "programming" experience I have is some bash scripting.

For this purpose, what do you suggest? Thank you for your advice!

GrapefruiTgirl 09-27-2007 08:27 PM

HTML and PHP :)

Well OK, HTML isn't an actual 'programming language' per se, but for a beginner wanting a personal home page, PHP & HTML will do pretty much whatever you want.

RE: Post #3 below -- JavaScript's great, very functional, but only when allowed to run on someone's browser. With few exceptions, it doesn't get to run on my browser.

RHLinuxGUY 09-27-2007 08:27 PM

HTML? I'm not joking, is that the type of language you are referring to? If not, then I suggest you look into the next best thing which is JavaScript for programming on the web.

glock19 09-27-2007 08:42 PM

Quote:

Originally Posted by RHLinuxGUY (Post 2906020)
HTML? I'm not joking, is that the type of language you are referring to?

Actually, I did not mean to refer to any type of language. Like I said, I have no experience with programming.

Quote:

Originally Posted by RHLinuxGUY (Post 2906020)
If not, then I suggest you look into the next best thing which is JavaScript for programming on the web.

Is javascript FOSS? My home page will be running on Debian GNU/Linux. I will not have a shred of closed-source, non-free, or proprietary software on my server.

Thanks again!

pixellany 09-27-2007 08:53 PM

We're splitting hairs here, but Javascript is simply code that you write. The interpreter lives in a browser and is free (not sure if it is open source).

But---start with HTML + CSS. When you are comfortable creating a simple page, then Javascript will make more sense.

sundialsvcs 09-27-2007 08:54 PM

If your goal is learning, you might experiment with any number of possible languages. But if you want a site, remember the mantra:
Quote:

Originally Posted by a wise sage:

Dictum Ne Agas

"Do Not Do A Thing Already Done"


glock19 09-27-2007 08:57 PM

Quote:

Originally Posted by GrapefruiTgirl (Post 2906019)
HTML and PHP :)
RE: Post #3 below -- JavaScript's great, very functional, but only when allowed to run on someone's browser. With few exceptions, it doesn't get to run on my browser.

This is another requirement: My home page must be written so that any browser*, in it's default configuration, will display it correctly.

*any browser--Gecko, KHTML, WebKit, Opera, and Internet Explorer.

pixellany 09-27-2007 09:04 PM

Quote:

Originally Posted by glock19 (Post 2906041)
This is another requirement: My home page must be written so that any browser*, in it's default configuration, will display it correctly.

Now you are into the meat....If you code according to the standards, everything will work nicely---except IE. I'm not a web professional, so grab your salt shaker for this one: I spend maybe 30% of my web page efforts just making it work in IE.

MS gets flak for a lot of things, but somehow their flagrant abuse of html and CSS standards stays under the radar.

GrapefruiTgirl 09-27-2007 09:08 PM

Web coding.
 
Quote:

Originally Posted by glock19 (Post 2906041)
This is another requirement: My home page must be written so that any browser*, in it's default configuration, will display it correctly.

*any browser--Gecko, KHTML, WebKit, Opera, and Internet Explorer.

For the most part, this will be the case with all three languages offered here so far. Internet browsers are all *theoretically* coded to display certain common things among themselves.
CSS (cascading style sheets) and HTML (hyper-text markup language) when written according to the HTML Standard(s) are designed to be interoperable and render correctly on ANY machine, and with ANY browser. However, there are ALWAYS some tidbits, whether in layout, scripting, tags, or whatever, which don't display *perfectly* in every browser. Usually, this is because of bugs or shoddy programming on the part of the browser-programmer. It can also be attributed to advances or improvements in the standards, which have not yet been implemented in a given browser.

Basically, for your intent and purpose, you can *for the most part* assume that if you learn by writing HTML, PHP, CSS, and even Javascript, your page will work in *most* browsers on *most* machines. There will always be weird exceptions, especially between internet explorer versions and Firefox versions. Last I checked, Firefox was more standard-compliant than IE.
As for JavaScript, my comment above was because people like me, or anyone who doesn't want executable code being run on their machine, will use such things as 'script blockers' like NoScript for Firefox. With this, Javascript is not able to run in the browser, so if you were to write a webpage using lots of Java (or any Java for that matter) it would not work properly on a browser with Javascripting disallowed. This is largely a carry-over from the Windows world, in which JavaScript (as well as ActiveX) is one of the primary means of installing junk, malware, toolbars, etc., onto peoples Windows computers.

To do dynamic scripting/coding, I find PHP is a VERY powerful, agile language, which can do math, string functions, really anything you want it to. HTML's main 'raison d'etre' is to put text on the screen and perform simple form submission.

phantom_cyph 09-27-2007 09:21 PM

I've been doing sites for a while now. A little advice...

First, HTML is your best bet. It a relatively simple language, very broad, and since its original, all browsers read it. Second, don't use flash as it will slow the site down, and decrease your bandwidth. Third, CSS is not necessary, but helpful. Four, PHP is used for all your forms on a site, I personally don't know it, but am starting to read up on it.

If you like framesets, too bad. Many browsers don't like them very much, and they limit quite substantially the layouts you can have. Go with tables set to relative height and width that adjust to a window size. You can have them look like a frameset, but not be one, and look very nice. Also, they tend to load faster than a frame because a frame is a completely different file.

Essentially, stick to the basic languages and you'll do fine. Just stay away from Javascipt, Flash, and Framesets.

glock19 09-27-2007 09:31 PM

Quote:

Originally Posted by phantom_cyph (Post 2906065)
Second, don't use flash as it will slow the site down, and decrease your bandwidth.

Besides, it's not FOSS.

My web page/site should display correctly from the default browser of a default Debian stable installation.

pixellany 09-28-2007 07:17 AM

Quote:

Originally Posted by phantom_cyph (Post 2906065)
Third, CSS is not necessary, but helpful.
If you like framesets, too bad. Many browsers don't like them very much, and they limit quite substantially the layouts you can have. Go with tables set to relative height and width that adjust to a window size. You can have them look like a frameset, but not be one, and look very nice. Also, they tend to load faster than a frame because a frame is a completely different file.

IMHO, CSS is absolutely the way to go. Having learned it, I now see it as necessary.
Take a look at "Spring into HTML and CSS" by Molly Holzschlag.

theNbomr 09-28-2007 09:32 AM

Quote:

Originally Posted by phantom_cyph (Post 2906065)
Four, PHP is used for all your forms on a site, I personally don't know it, but am starting to read up on it.

Actually, almost any programming language can be used to handle forms or create forms. PHP is designed to do this easily, and web servers are often preconfigured with PHP, but any language that can read & write standard IO should be capable of handling forms. Certainly perl is a very common alternative, and there are many other possibilities, even bash.

--- rod.


All times are GMT -5. The time now is 07:59 PM.