Edted 2010 Dicas de Web
Upcoming SlideShare
Loading in...5
×
 

Edted 2010 Dicas de Web

on

  • 2,346 views

Algumas Dicas de Desenvolvimento Web com um pouco de Ruby. Mostrando YSlow! e Solr. EDTED, Rio de Janeiro.

Algumas Dicas de Desenvolvimento Web com um pouco de Ruby. Mostrando YSlow! e Solr. EDTED, Rio de Janeiro.

Statistics

Views

Total Views
2,346
Views on SlideShare
2,329
Embed Views
17

Actions

Likes
1
Downloads
53
Comments
0

1 Embed 17

http://www.slideshare.net 17

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Edted 2010 Dicas de Web Edted 2010 Dicas de Web Presentation Transcript

  • A apresentação já vai começar ... Wednesday, April 14, 2010
  • AkitaOnRails.com Wednesday, April 14, 2010
  • ~ 30 min ~ 70 slides Wednesday, April 14, 2010
  • www.slideshare.net/akitaonrails www.akitaonrails.com/ les/entendendo-a-web-movies.zip fabioakita@gmail.com Wednesday, April 14, 2010
  • Entendendo a Web Dicas sobre Desenvolvimento Web com Ruby Fabio Akita Wednesday, April 14, 2010
  • Recapitulando ... Wednesday, April 14, 2010
  • Ruby é Lento (TM) Wednesday, April 14, 2010
  • Existem mentiras, mentiras malditas e estatísticas. Wednesday, April 14, 2010
  • Existem mentiras, mentiras malditas e estatísticas. Wednesday, April 14, 2010
  • Existem mentiras, mentiras malditas e estatísticas. Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • x mais lento que C++ Wednesday, April 14, 2010
  • x mais lento que C++ 0 32.5 65 97.5 130 Python 2 Ruby 1.9 JRuby Perl Python 3 PHP Ruby 1.8 Wednesday, April 14, 2010
  • Homepage: 331 ms Wednesday, April 14, 2010
  • Homepage: 331 ms Total: 5.45 s Wednesday, April 14, 2010
  • Exemplo Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • 6 Técnicas Wednesday, April 14, 2010
  • Menos Requisições Wednesday, April 14, 2010
  • Mini que CSS e Javascript Wednesday, April 14, 2010
  • Juicer http://github.com/cjohansen/juicer/ Wednesday, April 14, 2010
  • gem install juicer script/plugin install git://github.com/ktheory/juicer-rails.git Wednesday, April 14, 2010
  • gem install juicer script/plugin install git://github.com/ktheory/juicer-rails.git Wednesday, April 14, 2010
  • juicer install yuicompressor juicer install jslint juicer install closure_compiler Wednesday, April 14, 2010
  • juicer install yuicompressor juicer install jslint juicer install closure_compiler Wednesday, April 14, 2010
  • juicer install yuicompressor juicer install jslint juicer install closure_compiler Wednesday, April 14, 2010
  • /app/views/layouts/application.html.erb <%= juiced_tag '/stylesheets/application.css' %> <%= yield(:head) %> </head> <body> ... <%= juiced_tag '/javascripts/application.js' %> </body> Wednesday, April 14, 2010
  • /app/views/layouts/application.html.erb <%= juiced_tag '/stylesheets/application.css' %> <%= yield(:head) %> </head> <body> ... <%= juiced_tag '/javascripts/application.js' %> </body> Wednesday, April 14, 2010
  • /public/stylesheets/application.css @import url("reset.css"); @import url("base.css"); @import url("fonts.css"); ... /public/javascripts/application.js /* @depends jquery-1.4.min.js @depends jquery.edit_in_place.js @depends jqueryamail.js */ ... Wednesday, April 14, 2010
  • /public/stylesheets/application.css @import url("reset.css"); @import url("base.css"); @import url("fonts.css"); ... /public/javascripts/application.js /* @depends jquery-1.4.min.js @depends jquery.edit_in_place.js @depends jqueryamail.js */ ... Wednesday, April 14, 2010
  • juicer merge public/stylesheets/application.css public/stylesheets/application.min.css juicer merge -i public/javascripts/application.js public/javascripts/application.min.js Wednesday, April 14, 2010
  • juicer merge public/stylesheets/application.css public/stylesheets/application.min.css juicer merge -i public/javascripts/application.js public/javascripts/application.min.js Wednesday, April 14, 2010
  • juicer merge public/stylesheets/application.css public/stylesheets/application.min.css juicer merge -i public/javascripts/application.js public/javascripts/application.min.js Wednesday, April 14, 2010
  • juicer merge public/stylesheets/application.css public/stylesheets/application.min.css juicer merge -i public/javascripts/application.js public/javascripts/application.min.js Wednesday, April 14, 2010
  • DEVELOPMENT Wednesday, April 14, 2010
  • PRODUCTION Wednesday, April 14, 2010
  • Asset Hosts Navegadores abrem poucas conexões simultâneas por domínio Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • /app/controllers/hello_controller.rb def gallery gallery_path = File.join(Rails.root, "public/images/gallery/") @images = Dir.glob(gallery_path + "*").map{ |f| f.gsub(gallery_path, "") } end Wednesday, April 14, 2010
  • /app/controllers/hello_controller.rb def gallery gallery_path = File.join(Rails.root, "public/images/gallery/") @images = Dir.glob(gallery_path + "*").map{ |f| f.gsub(gallery_path, "") } end /app/views/hello/gallery.html.erb <% title "Gallery" %> <% @images.each do |image| -%> <%= image_tag "gallery/#{image}" %> <% end -%> Wednesday, April 14, 2010
  • /app/controllers/hello_controller.rb def gallery gallery_path = File.join(Rails.root, "public/images/gallery/") @images = Dir.glob(gallery_path + "*").map{ |f| f.gsub(gallery_path, "") } end /app/views/hello/gallery.html.erb <% title "Gallery" %> <% @images.each do |image| -%> <%= image_tag "gallery/#{image}" %> <% end -%> Wednesday, April 14, 2010
  • DEVELOPMENT Wednesday, April 14, 2010
  • DEVELOPMENT Wednesday, April 14, 2010
  • /con g/environments/production.rb config.action_controller.asset_host = Proc.new do |source, request| protocol = if request.ssl? request.headers["USER_AGENT"] =~ /(Safari)/ ? "http" : "https" else "http" end "#{protocol}://asset#{rand(6) + 1}.akitaonrails.local:3000" end Wednesday, April 14, 2010
  • /con g/environments/production.rb config.action_controller.asset_host = Proc.new do |source, request| protocol = if request.ssl? request.headers["USER_AGENT"] =~ /(Safari)/ ? "http" : "https" else "http" end "#{protocol}://asset#{rand(6) + 1}.akitaonrails.local:3000" end Wednesday, April 14, 2010
  • /etc/hosts ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost 127.0.0.1 asset1.akitaonrails.local asset2.akitaonrails.local asset3.akitaonrails.local asset4.akitaonrails.local asset5.akitaonrails.local asset6.akitaonrails.local www.akitaonrails.local Wednesday, April 14, 2010
  • PRODUCTION Wednesday, April 14, 2010
  • PRODUCTION Wednesday, April 14, 2010
  • Javascript embaixo! Wednesday, April 14, 2010
  • /app/views/layouts/application.html.erb <head> <title><%= h(yield(:title) || "Untitled") %></title> <%= stylesheet_link_tag 'application' %> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/ CFInstall.min.js" type="text/javascript"></script> <%= yield(:head) %> </head> <body> ... Wednesday, April 14, 2010
  • /app/views/layouts/application.html.erb <head> <title><%= h(yield(:title) || "Untitled") %></title> <%= stylesheet_link_tag 'application' %> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/ CFInstall.min.js" type="text/javascript"></script> <%= yield(:head) %> </head> <body> ... Wednesday, April 14, 2010
  • /app/views/layouts/application.html.erb ... <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/ CFInstall.min.js" type="text/javascript"></script> <script type="text/javascript"> // meu javascript customizado ... </script> </body> </html> Wednesday, April 14, 2010
  • /app/views/layouts/application.html.erb ... <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/ CFInstall.min.js" type="text/javascript"></script> <script type="text/javascript"> // meu javascript customizado ... </script> </body> </html> Wednesday, April 14, 2010
  • Gzip Wednesday, April 14, 2010
  • a2enmod de ate editar /etc/apache2/mods-available/de ate.conf Wednesday, April 14, 2010
  • a2enmod de ate editar /etc/apache2/mods-available/de ate.conf Wednesday, April 14, 2010
  • /etc/apache2/mods-available/de ate.conf <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE image/x-icon AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/x-httpd-php AddOutputFilterByType DEFLATE application/x-httpd-fastphp AddOutputFilterByType DEFLATE application/x-httpd-eruby DeflateCompressionLevel 9 # Netscape 4.X has some problems BrowserMatch ^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch ^Mozilla/4.0[678] no-gzip # MSIE masquerades as Netscape, but it is fine BrowserMatch bMSIE !no-gzip !gzip-only-text/html </IfModule> Wednesday, April 14, 2010
  • Cabeçalhos de Expiração Wednesday, April 14, 2010
  • a2enmod expires editar /etc/apache2/mods-available/expires.conf Wednesday, April 14, 2010
  • a2enmod expires editar /etc/apache2/mods-available/expires.conf Wednesday, April 14, 2010
  • /etc/apache2/mods-available/expires.conf <IfModule mod_expires.c> ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType application/pdf "access plus 1 year" ExpiresByType audio/x-wav "access plus 1 year" ExpiresByType audio/mpeg "access plus 1 year" ExpiresByType video/mpeg "access plus 1 year" ExpiresByType video/mp4 "access plus 1 year" ExpiresByType video/quicktime "access plus 1 year" ExpiresByType video/x-ms-wmv "access plus 1 year" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType text/css "access plus 1 year" ExpiresByType text/javascript "access plus 1 year" </IfModule> Wednesday, April 14, 2010
  • Cache Busters Wednesday, April 14, 2010
  • /app/views/layouts/application.html.erb <%= stylesheet_link_tag 'application' %> <%= javascript_include_tag 'application' %> <%= image_tag "logo.png" %> Wednesday, April 14, 2010
  • /app/views/layouts/application.html.erb <link href="/stylesheets/application.css?1264345891" media="screen" rel="stylesheet" type="text/css" /> <script src="/javascripts/application.js?1264345058" type="text/javascript"></script> <img alt="Logo" src="/images/logo.png?1268943058" /> Wednesday, April 14, 2010
  • /app/views/layouts/application.html.erb <link href="/stylesheets/application.css?1264345891" media="screen" rel="stylesheet" type="text/css" /> <script src="/javascripts/application.js?1264345058" type="text/javascript"></script> <img alt="Logo" src="/images/logo.png?1268943058" /> Wednesday, April 14, 2010
  • Use CDNs Wednesday, April 14, 2010
  • /app/views/layouts/application.html.erb <script src="/javascripts/jquery-1.4.min.js" type="text/javascript"></script> <script src="/javascripts/jquery-ui-1.7.2.min.js" type="text/javascript"></script> <script src="/javascripts/swfobject-2.2.js" type="text/javascript"></script> <script src="/javascripts/CFInstall-1.0.2.min.js" type="text/javascript"></script> Wednesday, April 14, 2010
  • /app/views/layouts/application.html.erb <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js" type="text/javascript"></script> Wednesday, April 14, 2010
  • /app/views/layouts/application.html.erb <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js" type="text/javascript"></script> Wednesday, April 14, 2010
  • Search Wednesday, April 14, 2010
  • select * from ... where ... like “%...%” Wednesday, April 14, 2010
  • select * from ... where ... like “%...%” or ... like “%...%” or ... like “%...%” or ... like “%...%” or ... like “%...%” Wednesday, April 14, 2010
  • select * from ... where ... like “%...%” or ... like “%...%” or ... like “%...%” or ... like “%...%” or ... like “%...%” Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • Open Source Enterprise Search Platform Baseado no famoso Lucene Full Text Search, com relevância Indexa documentos (Word, PDF, etc) Interface REST Roda em containers de Servlet (Tomcat) Wednesday, April 14, 2010
  • Open Source Enterprise Search Platform Baseado no famoso Lucene Full Text Search, com relevância Indexa documentos (Word, PDF, etc) Interface REST Roda em containers de Servlet (Tomcat) Wednesday, April 14, 2010
  • Open Source Enterprise Search Platform Baseado no famoso Lucene Full Text Search, com relevância Indexa documentos (Word, PDF, etc) Interface REST Roda em containers de Servlet (Tomcat) Wednesday, April 14, 2010
  • Open Source Enterprise Search Platform Baseado no famoso Lucene Full Text Search, com relevância Indexa documentos (Word, PDF, etc) Interface REST Roda em containers de Servlet (Tomcat) Wednesday, April 14, 2010
  • Open Source Enterprise Search Platform Baseado no famoso Lucene Full Text Search, com relevância Indexa documentos (Word, PDF, etc) Interface REST Roda em containers de Servlet (Tomcat) Wednesday, April 14, 2010
  • Open Source Enterprise Search Platform Baseado no famoso Lucene Full Text Search, com relevância Indexa documentos (Word, PDF, etc) Interface REST Roda em containers de Servlet (Tomcat) Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • select * from ... where ... like “%...%” or ... like “%...%” or ... like “%...%” or ... like “%...%” or ... like “%...%” Wednesday, April 14, 2010
  • select * from ... where ... like “%...%” or ... like “%...%” or ... like “%...%” or ... like “%...%” or ... like “%...%” Wednesday, April 14, 2010
  • Aprendendo Mais Wednesday, April 14, 2010
  • RAILS LABS Wednesday, April 14, 2010
  • RAILSCASTS.com Wednesday, April 14, 2010
  • caelum.com.br Wednesday, April 14, 2010
  • egenial.com.br Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • Entenda os browsers Entenda HTTP Arquiteturas Mundo Assíncrono Mundo não Relacional Wednesday, April 14, 2010
  • Entenda os browsers Entenda HTTP Arquiteturas Mundo Assíncrono Mundo não Relacional Wednesday, April 14, 2010
  • Entenda os browsers Entenda HTTP Arquiteturas Mundo Assíncrono Mundo não Relacional Wednesday, April 14, 2010
  • Entenda os browsers Entenda HTTP Arquiteturas Mundo Assíncrono Mundo não Relacional Wednesday, April 14, 2010
  • Entenda os browsers Entenda HTTP Arquiteturas Mundo Assíncrono Mundo não Relacional Wednesday, April 14, 2010
  • Wednesday, April 14, 2010
  • Thx! www.slideshare.net/akitaonrails http://dl.dropbox.com/u/1732133/dicas-de-desenvolvimento-web-com-rails.zip fabioakita@gmail.com Wednesday, April 14, 2010