static sites - bringing web 1.0 back

58
STATIC SITES BRINGING WEB 1.0 BACK!

Upload: raymond-camden

Post on 12-Aug-2015

383 views

Category:

Internet


2 download

TRANSCRIPT

Page 1: Static Sites - Bringing Web 1.0 Back

STATIC SITESBRINGING WEB 1.0 BACK!

Page 2: Static Sites - Bringing Web 1.0 Back

WHO AM I?Raymond CamdenDeveloper Advocate for IBMMobileFirst, Bluemix,Cordova/PhoneGap, Web StandardsBlogging at raymondcamden.com@raymondcamden

Page 3: Static Sites - Bringing Web 1.0 Back

ASSETShttps://github.com/cfjedimaster/Static-Sites

Page 4: Static Sites - Bringing Web 1.0 Back

GENERAL GAME PLANWhyHowBringing Dynamic Back

Not as good as bringing sexy backHosting Options

Page 5: Static Sites - Bringing Web 1.0 Back

WHY?

Page 6: Static Sites - Bringing Web 1.0 Back

ColdFusion, PHP, Node, Groovy, SQL Server, MySQL, Oracle(shudder), all kind of other super-fancy dynamic crap!

Page 7: Static Sites - Bringing Web 1.0 Back

WHY?

Page 8: Static Sites - Bringing Web 1.0 Back
Page 9: Static Sites - Bringing Web 1.0 Back

REASON ONE:CRAP BREAKS

Page 10: Static Sites - Bringing Web 1.0 Back
Page 11: Static Sites - Bringing Web 1.0 Back

REASON TWO:YOU NEED LESS

Page 12: Static Sites - Bringing Web 1.0 Back
Page 13: Static Sites - Bringing Web 1.0 Back

REASON THREE:MOBILE PHONES + APPS

Page 14: Static Sites - Bringing Web 1.0 Back
Page 15: Static Sites - Bringing Web 1.0 Back

REASON FOUR:WEB BROWSERS DON'T SUCK!

As much...

Page 16: Static Sites - Bringing Web 1.0 Back

MODERN WEB DEVELOPMENTMultiple web serversMultiple application serversMultiple db serversMultiple caching serversMultiple servers

Page 17: Static Sites - Bringing Web 1.0 Back

OR

Page 18: Static Sites - Bringing Web 1.0 Back

FILES

Page 19: Static Sites - Bringing Web 1.0 Back

NO SERIOUSLY - FILES

Page 20: Static Sites - Bringing Web 1.0 Back
Page 21: Static Sites - Bringing Web 1.0 Back

HOW?

Page 22: Static Sites - Bringing Web 1.0 Back

STATIC SITE OPTIONSDesktop ProgramsGenerators

Page 23: Static Sites - Bringing Web 1.0 Back

Typically they...

GENERATORS

They give you a template languageThey give you a data languageThey give you a way to previewThey give you a way to generate files

Page 24: Static Sites - Bringing Web 1.0 Back

OPTIONShttps://staticsitegenerators.nethttps://www.staticgen.com

Page 25: Static Sites - Bringing Web 1.0 Back

FOR TODAYHarp

Page 26: Static Sites - Bringing Web 1.0 Back

HARP

Page 27: Static Sites - Bringing Web 1.0 Back

DETAILSharpjs.comworks everywheretemplates: EJS, Jade, Markdownpreprocessers: LESS, Sass, Stylus, CoffeeScript

Page 28: Static Sites - Bringing Web 1.0 Back

INSTALLATIONsudo npm install -g harp

Page 29: Static Sites - Bringing Web 1.0 Back

CLIinit - new projectserver - developcompile - generate

Page 30: Static Sites - Bringing Web 1.0 Back

DEMOS (INITIAL)

Page 31: Static Sites - Bringing Web 1.0 Back

ORGANIZATIONHarp lets you create hidden assets, files, etcAnything with an _ in front is hiddenYou can use a "public" folder for your site

Page 32: Static Sites - Bringing Web 1.0 Back

DEMOS

Page 33: Static Sites - Bringing Web 1.0 Back

DATAGlobal dataMetadata

Page 34: Static Sites - Bringing Web 1.0 Back

GLOBAL DATAharp.json in Public Mode_harp.json in "Root Style" Mode

Page 35: Static Sites - Bringing Web 1.0 Back

EXAMPLE{ "globals":{ "sitename":"Ray's World", "email":"[email protected]" }}

Page 36: Static Sites - Bringing Web 1.0 Back

DEMOS (DATA 1)

Page 37: Static Sites - Bringing Web 1.0 Back

METADATA_data.json in a folderAssociated with current folderIf you use an object w/ keys that match file names,something special happens

Page 38: Static Sites - Bringing Web 1.0 Back

DEMOS (DATA 2)

Page 39: Static Sites - Bringing Web 1.0 Back

MORE STUFFProd/Dev code (via environment)"Current" scope (for nav)Directory contents404 support (?)

Page 40: Static Sites - Bringing Web 1.0 Back

MORE MORE STUFFMultihost modeNon-HTML files (ie, rss.xml.ejs)Run within NodeBasic Authentication

Page 41: Static Sites - Bringing Web 1.0 Back

PRODUCTION SITEScoldfusioncookbook.comwhatthethundersaid.org

Page 42: Static Sites - Bringing Web 1.0 Back

SUMMARYLearn more at harpjs.comCheck out the recipes at http://harpjs.com/recipes/

Page 43: Static Sites - Bringing Web 1.0 Back

BRINGING DYAMICBACK

Page 44: Static Sites - Bringing Web 1.0 Back

DYNAMIC STUFFFormsCommentsSearchCalendars"Data"

Page 45: Static Sites - Bringing Web 1.0 Back

FORMSWuFoo ($)Google DocFormKeepmailto

Page 46: Static Sites - Bringing Web 1.0 Back

DEMORay, since I know you'll forget, use the form on JSCB.

Page 47: Static Sites - Bringing Web 1.0 Back

COMMENTSDisqusLivefye

Page 48: Static Sites - Bringing Web 1.0 Back

DEMORay, since I know you'll forget this too, use

coldfusioncookbook.

Page 49: Static Sites - Bringing Web 1.0 Back

SEARCHGoogle Custom Search Engine

Page 50: Static Sites - Bringing Web 1.0 Back

DEMORay, since I know you'll forget this too, use

coldfusioncookbook.

Page 51: Static Sites - Bringing Web 1.0 Back

CALENDARSGoogle CalendarFullCalendarEventBrite

Page 52: Static Sites - Bringing Web 1.0 Back

DEMOcal.html

Page 53: Static Sites - Bringing Web 1.0 Back

"DATA"ParseFirebaseAnd more I don't know about

Page 54: Static Sites - Bringing Web 1.0 Back

DEPLOYING

Page 55: Static Sites - Bringing Web 1.0 Back

OPTIONSTraditional Web ServerAmazon S3 Web Hosting (coldfusioncookbook.com,louisianawatercolors.com, whatthethundersaid.org,cajunipsum.com, static.raymondcamden.com)

Google Cloud Storage(http://githubhealth.raymondcamden.com/)

Link (General)Link (Specific)

Link

Page 56: Static Sites - Bringing Web 1.0 Back

ANOTHER OPTION

Surge

Page 57: Static Sites - Bringing Web 1.0 Back

WRAP UP

Page 58: Static Sites - Bringing Web 1.0 Back

COOL LINKS

My Sites:https://github.com/remotesynth/Static-Site-Samples

http://static.raymondcamden.com/cfuitherightway/http://www.cajunipsum.comhttp://www.coldfusioncookbook.comhttp://www.louisianawatercolors.comhttp://www.whatthethundersaid.orghttp://githubhealth.raymondcamden.com