Successfully reported this slideshow.
Your SlideShare is downloading. ×

Los lenguajes de la web

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 25 Ad

More Related Content

Similar to Los lenguajes de la web (20)

Advertisement

Recently uploaded (20)

Advertisement

Los lenguajes de la web

  1. 1. “Los  lenguajes     de  la  web”;   Roberto Luis Bisbé - @rlbisbe
  2. 2. ¿Qué hay en la web? Frontend Backend Datos HTML PHP *SQL CSS Java EE Oracle Javascript .NET XML Flash Python JSON Silverlight Ruby Applets… Scala Clojure…
  3. 3. ¿De qué vamos a hablar? Lenguajes de programación menos “serios” Formatos de marcado Formatos de datos
  4. 4. PROGRAMACIÓN
  5. 5. Características comunes Dinámicos Orientados a objetos Licencias Open Source Comunidad
  6. 6. Javascript Nada que ver con Java Frameworks (jQuery, Prototype, Mootools) Implementación en los navegadores web Usado por: –  Todo el mundo…
  7. 7. Client-side javascript: Manejo del DOM function  notEmpty(){          var  myTextField  =  document.getElementById('myText');          if(myTextField.value  ===  "")                  alert(“Introduzca  un  valor  en  el  campo”)   }   <input  type='text'  id='myText'  />   <input  type=’button’  onclick=’notEmpty()’  value=Click’/>  
  8. 8. Server-side Javascript: var  http  =  require('http');          http.createServer(function  (request,  response)  {                  response.writeHead(            200,              {'Content-­‐Type':  'text/plain'}          );                  response.end('Hello  Worldn');          }).listen(8000);     console.log('Server  running  at  http://localhost:8000/');   demo
  9. 9. Multiparadigma Soporte para bibliotecas científicas Usado por: –  Instagram –  SageMath
  10. 10. #!/usr/bin/env  python   import  sys   import  os     def  main():          i  =  open('in.txt')          o  =  open('out.php','w')          o.write("<?php  $data  =  array(n")          counter  =  1          for  line  in  i:                  data  =  line.split("n")                  o.write(  str(counter)  +  '=>  "'  +  data[0]  +  '",n')                  counter  +=1;          o.write(");n?>")     if  __name__  ==  '__main__':          main()  
  11. 11. Alta abstracción y legibilidad Multiples frameworks (Rails, Sinatra) Sistema de paquetes (gemas) Usado por: –  GitHub
  12. 12. class  Anfitrion        def  initialize(nombre  =  "Mundo")          @nombre  =  nombre        end          def  decir_hola            puts  "Hola  #{@nombre}"        end          def  decir_adios        puts  "Adiós  #{@nombre},  vuelve  pronto."        end   end   demo
  13. 13. Programación funcional Rendimiento++ Compatible con bibliotecas java y C# •  Quien lo usa? –  Twitter –  foursquare
  14. 14. def  qsort:  List[Int]  =>  List[Int]  =  {      case  Nil  =>  Nil      case  pivot  ::  tail  =>          val  (smaller,  rest)  =  tail.partition(_  <  pivot)          qsort(smaller)  :::  pivot  ::  qsort(rest)   }    
  15. 15. Alternativa en Java import  java.io.*;              while  (f  <  l)   import  java.util.*;              {                      while  (A[f]  <  pivot)  f++;   public  class  QuickSort                    while  (A[l]  >  pivot)  l-­‐-­‐;   {                    swap  (A,  f,  l);        public  static  void  swap  (int  A[],  int  x,              }   int  y)              return  f;        {        }              int  temp  =  A[x];                A[x]  =  A[y];        public  static  void  Quicksort(int  A[],              A[y]  =  temp;   int  f,  int  l)        }        {                if  (f  >=  l)  return;   public  static  int  partition(int  A[],  int  f,              int  pivot_index  =  partition(A,  f,  l);   int  l)              Quicksort(A,  f,  pivot_index);        {              Quicksort(A,  pivot_index+1,  l);              int  pivot  =  A[f];        }  
  16. 16. MARCADO
  17. 17. !!!   %head          %title  BoBlog          %link{"rel"  =>  "stylesheet",  "href"  =>  "main.css",  "type"  =>   "text/css"}      %body          #header              %h1  BoBlog              %h2  Blog  de  Bob          #content              -­‐  @entries.each  do  |entry|                  .entry                      %h3.title=  entry.title                      %p.date=  entry.posted.strftime("%A  %d  de  %B  de  %Y")                      %p.body=  entry.body          #footer              %p  
  18. 18. Razor <ul>                  @for  (var  i  =  0;  i  <  5;  i++)          {                  <li>@i</li>          }           </ul>     @{        var  name  =  “Gilberto  Salazar”;        <div>            Nombre:  @name        </div>   }  
  19. 19. DATOS
  20. 20. JSON  {"menu":  {        "id":  "file",        "value":  "File",        "popup":  {            "menuitem":  [                {"value":  "New",  "onclick":  "CreateNewDoc()"},                {"value":  "Open",  "onclick":  "OpenDoc()"},                {"value":  "Close",  "onclick":  "CloseDoc()"}            ]        }    }}   demo
  21. 21. Alternativa en XML <menu  id="file"  value="File">      <popup>          <menuitem  value="New"  onclick="CreateNewDoc()"  />          <menuitem  value="Open"  onclick="OpenDoc()"  />          <menuitem  value="Close"  onclick="CloseDoc()"  />      </popup>   </menu>  
  22. 22. Recursos de aprendizaje •  Javascript –  http://www.codecademy.com/courses –  http://nodejs.org/ •  Python –  http://docs.python.org/tutorial/ •  Ruby –  http://www.ruby-lang.org/es/documentation/quickstart/ •  Scala –  http://www.scala-lang.org/docu/files/ScalaByExample.pdf
  23. 23. Gracias http://rlbisbe.net

×