SlideShare a Scribd company logo
don’t code
   CRAP!!!


for a better 2012
JAVASCRIPT
    is...
...the
FUTURE
and you know!
HTML + JS +
     CSS
sucks!
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?
Don't code CRAP in 2012 (architecture & future)
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 be
the HTMLCSS guy
but I
but changed
javascript only
 You should really
 get/make a frame-
work that generates
  HTML&CSS code.
you get

CLEAN CODE
and she
will like
use 100% ajax
with JSON only,
NO dirty HTML*
ups!
 that’s also
important!
*write duplicate data




for SEO & for the JS
4 SEO
generate HTML to be
  viewed by search
engine spiders ONLY.
4 JS
generate javascript
 code, more exactly
simple objects {key:
       ‘value’}
SERVER
will only serve DIRTY
HTML for/on:
-SEO;
-first page;
-refresh;
SERVER
will 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.
help
  I would need some
help in order to make
it. If you want a better
 web this is one of the
    ways. (ask for it!)
change
please 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

More Related Content

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