15
MISC Topics Hosting vs. Server Deprecation Always think semantics before style

MISC Topics

  • Upload
    hung

  • View
    42

  • Download
    0

Embed Size (px)

DESCRIPTION

MISC Topics. Hosting vs. Server Deprecation Always think semantics before style. Running your own server vs. paying for hosting. A common dilemma. Server Setup. Dedicated Computer ($100-???) Linux + Apache (free) Internet Service with static IP ( approx $100/month) - PowerPoint PPT Presentation

Citation preview

Page 1: MISC Topics

MISC Topics

Hosting vs. ServerDeprecation

Always think semantics before style

Page 2: MISC Topics

Running your own server vs. paying for hosting

A common dilemma

Page 3: MISC Topics

Server Setup

• Dedicated Computer • ($100-???)

• Linux + Apache • (free)

• Internet Service with static IP • (approx $100/month)

• Server upgrades require your attention• (I think I’m worth $125/hour)

Page 4: MISC Topics

Hosting• Economy

– massively shared server on cloud– shared IP, folder redirects via provider DNS– $5/month

• Dedicated/Managed – Real machine (rack mounted) with processor, memory, and static IP– $150+/month

• Virtual & Cloud– Scalable – add more processors, memory, bandwidth– Virtual static IP, recycled via provider DNS– $40+/month

Page 5: MISC Topics

Facebook

• PHP application run on Harvard server• Moved to economy host to become independent• Economy host would not scale up.• Switched to massive dedicated hosts• Currently, runs their own servers with custom

architecture– “insourcing”– Probably about 30,000 high-end rack-mounted

machines that are geo-distributed in at least 5 locations

Page 6: MISC Topics

Deprecation is a good thing

Why certain tags turned bad and why one tag has made a comeback

Page 7: MISC Topics

The worst offenders

• <font>• <blink>• <center>• <applet>• <frame> and <frameset>

Page 8: MISC Topics

The elusive <u> tag

• http://www.martinrinehart.com/frontend-engineering/engineers/html/html-tag-history.html

• Deprecated HTML 4.01

• CSS makes it obsolete, but <u> actually has semantic meaning– Indicates proper Chinese name– Widely used to indicate a misspelled word

Page 9: MISC Topics

The nightmare of Frames

Page located at www.citi.com.zzz.net<!DOCTYPE html><html>

<frameset rows="25%,*"> <frame src=“http://www.citi.com”> <frame src=“phishing_login.html”></frameset>

</html>

Page 10: MISC Topics

The nightmare of Frames

<!DOCTYPE html><html>

<frameset rows="25%,*"> <frame src=“menu.html”> <frame name=“content”></frameset>

</html>

Page 11: MISC Topics

Semantics over Style

What is it? vs. how it should look?

Page 12: MISC Topics

The worst offenders

• In marking up content with HTML or creating HTML structure, always ask yourself:–What is this content?

• Never even consider this question:–What should this content look like?

Page 13: MISC Topics

Exercise

• How should this be marked up?

Boston Celtics Boston, MA TD Garden 1946Brooklyn Nets Brooklyn, New York City, NY Barclays Center 1976New York Knicks Manhattan, New York City, NY Madison Square Garden

1946Philadelphia 76ers Philadelphia, PA Wells Fargo Center 1949Toronto Raptors Toronto, ON Air Canada Centre1995

Page 14: MISC Topics

CSS

Cascading Style Sheets.

What does “Cascading” really mean?

Page 15: MISC Topics

The Cascade

• The most specific rules are applied first at the source (top of waterfall)

• Any unspecified attributes cascade to the lower level, i.e., less specific, more general rules

• Repeat until all CSS rules are examined• Any unspecified attribute gets the “default style” (the

base of the waterfall)• Content flows down the cascade and the rules (like the

rocks of the cliff) shape the presentation of the content (i.e., shapes how the waterfall will look).