LIS5362 - Languages and HTML
When people think of..
COMPUTER LANGUAGES.
(though I'll modify this a bit)
What is programming?
Changing your screensaver
Writer/Word
Calc/Excel
HTML/CSS
Bash
PHP/MYSQL/Javascript
Python/Perl/Ruby interpreted/scripted
C compiled
Assembly (00 4E A3 77 8C 0A etc)
On classic "Languages"
A few things 95% of languages have in common:
- this is important to remember:
Written BY humans FOR humans.
Most everything you see isn't some weird computer artifact: it's a choice.
A few things 95% of languages have in common:
- Punishingly difficult and picky syntax.
(One character wrong and the whole thing explodes*)
*But not HTML or CSS!
Things people debate about over languages:
- Human readability?
- How do you "run" it?
- Compiled/interpreted/ or scripted?
- "Paradigm?" What's the language's main "style?"
- What was it originally designed to do?
- How does it get changed?
- What does it do now?
Many of these boil down to: SIMPLE vs EASY
Or, I should probably say, a particular couple of ways to
redefine SIMPLE and EASY.
SIMPLE: (Think "command line")
- Few assumptions
- You can see "everything"
- Usually text-only
- Rigid Framework
- "Mathematical"
- Few abstractions - simple data types.
- Programmer must be MORE verbose,
EASY: (Think "iPhone" or "Siri")
- Many assumptions
- A lot is hidden to simplify the view
- Not always text-only
- Multiple Pre-Loaded Frameworks
- "Visual"
- Many abstractions - simple data types.
- Less language to get something up and running.
Recap
Simple like a Command line =
"Unfriendly, but a great deal of power and possibility through simplicity"
Easy like Siri /Alexa =
"Friendly, lots of complexity, but it only lets you do like seven things" ☺
Before I descend into more "classic language" stuff
Consider, e.g. Excel, which many would call
the best computer language ever created,
and perhaps a very good balance between
Simple and Easy
Human Readability
Old school - Human readability is not important
- Short abstractions are concise and thus quicker
- Forced whitespace is limiting
- There should be MANY ways to do a thing
Human Readability
New school -Hey, looks like human readability is at least a little important:
- Multiple people working on projects
- Older code needs to be understandable
- There is value in forcing people to do things only one way
"Important" real life Categories.
(these are fuzzy and non-exclusive)
Procedural/Imperative ("default")
Do things step by step
Important "real life" Categories.
Functional
Turn it into straight up math. No variables, no
"procedures"
Important "real life" Categories.
Object Oriented
Everything uses an "object" metaphor.
("Black Box Approach")..
Important "real life" Categories.
Declarative:
Uncommon, because very hands-off.
You don't say "how" - you just tell what to do over a limited set of possibilities.
(This is HTML and MySQL, and increasingly a lot more things..)
e.g. YAML is used to define things. This is EASY (not SIMPLE)
Examples of classic languages
C
Rust
Go
- Low level, Compiled, Native
Newer Examples
Java
Python
(Midrange, Python's honestly probably the best all around, let the fights begin)
..And then the holy mess that is the web.
Here goes: This ONLY makes sense if you remember that the web grew and accreted on itself, and encouraged to do so primarily by "market forces"...
as opposed to "designed."
Text
Plain ol' text. BBS and the like
HTML
"Lets make this look better than the Matrix, SEMANTICALLY"
CSS
"Still kind of ugly, now let's go VISUAL"
Okay but we need interactivity...
OKAY, how about, lets just reach into the computer and run random programs
cgi-bin
This actually worked for a while when we were oh so innocent...
..but honestly, i think we've come full circle.
Server-Side
PHP.
Click a menu and get back some generated HTML. Cool!
Combine with MySQL for even more power!
Client-side
uhoh.
"Okay, so we want things to move around. And maybe more..."
Client-side
We've got this thing people are using to literally make cartoons...
..so I guess we're going to use it for EVERYTHING.
Flash
Javascript
Clearly, we can do better than Flash. I mean, we could slap that together in a weekend and name it something similar to something that already exists because okay
Javascript part deux
Okay, maybe that wasn't a great idea...
but too bad, here we are.
More on HTML
DECLARATIVE - so it won't break.
SEMANTIC - describes WHAT THINGS DO, not HOW THEY LOOK
HTML Versions?
Important things to know:
HTML 4.0
:aka XHTML Decided to "formalize" the language, meaning that badly written HTML would fail and break...
HTML 4.0
:aka XHTML Decided to "formalize" the language, meaning that badly written HTML would fail and break...
...yeah just kidding that'll never work
HTML 5.0 -
No more formalization.
integration with JS, more media stuff. Mostly a good deal.
Backlinks: FSU Courses:LIS5362:RawSlides