Don't code CRAP in 2012 (architecture & future)

Post on 01-Nov-2014

1.165 views 0 download

Tags:

description

Describing a new architecture pattern/view

Transcript of Don't code CRAP in 2012 (architecture & future)

don’t code CRAP!!!

for a better 2012

JAVASCRIPTis...

...the FUTURE

and you know!

sucks!

HTML + JS + CSS

and you know why!!!

but... wait!JS can write HTML!JS can write CSS too!

JS can make it crossbrowser!!

then why do we need to write crossbrowser HTML and CSS?

Cheat!write ugly HTML and get sexy pages

you can really get hot, sexy high performance chicks (apps) too.

YES!

SHE’s HOT!-wanna know her?

her name is javascript

and she hates messy guys like

I used to bethe HTMLCSS guy

but Ibut changed

javascript onlyYou should really

get/make a frame-work that generates

HTML&CSS code.

CLEAN CODE

you get

and she will like

use 100% ajax with JSON only, NO dirty HTML*

ups!that’s also important!

ups!that’s also important!

*write duplicate data

for SEO & for the JS

4 SEOgenerate HTML to be

viewed by search engine spiders ONLY.

4 JSgenerate javascript code, more exactly

simple objects {key: ‘value’}

SERVERwill only serve DIRTY HTML for/on: -SEO; -first page; -refresh;

SERVERwill only serve CLEAN JSON: -for everything else;

SRV.flow()->router->(cache)->service manager->service->model->render

SRV.router()-check if it’s a get/post request;-can return an instant cache result;-can call the service manager;

S.serviceMng()-a singleton;-avoids duplicate service requests;

S.service()-just like a controller in MVC, but I like more to name it a service because returns pure objects no HTML

S.model()-no need to explain;-the cache is managed here and not in the service;-data is filtered here and not in the render()

S.render()-render raw HTML only for SEO;-renders javascript objects;

but to make a change like this is HARD!

you really need good JS stuff; some-

thing like Dojo

or YUI3 but not jQyery!!!

my JS?I’m building a JS

framework that is presented in the other

slide.

helpI would need some

help in order to make it. If you want a better web this is one of the

ways. (ask for it!)

changeplease don’t write

more creepy architectures!

it’s 2012!

and don’t

worry about

the Big guys!100 CRAP

=~1 SMART

function totty(){ if(‘thanks!’){ you = ‘help’ || ‘share’; } return you;}// bye