ASP.NET MVC com jQuery (Retome o controle da sua aplicação web)

2.847 visualizações

Publicada em

Palestra ministrada no TechEd Brasil 2009.

Publicada em: Tecnologia
0 comentários
2 gostaram
Estatísticas
Notas
  • Seja o primeiro a comentar

Sem downloads
Visualizações
Visualizações totais
2.847
No SlideShare
0
A partir de incorporações
0
Número de incorporações
583
Ações
Compartilhamentos
0
Downloads
0
Comentários
0
Gostaram
2
Incorporações 0
Nenhuma incorporação

Nenhuma nota no slide
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 1m:30s
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 2m:30s 4m total
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 2 mins 6 mins total
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 2 mins 8 mins total
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 2 mins 10 mins total
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 2 min 12 min total
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 2 mins 14 mins total
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 1m30s 15m30s total
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 2 min 17m30s total
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 2 mins 19:30 total
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 1 min
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 2 mins
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 2 mins
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 3 mins
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 2 mins
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 2 mins
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 08/29/09 01:43 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • ASP.NET MVC com jQuery (Retome o controle da sua aplicação web)

    1. 2. ASP.NET MVC com jQuery Retome o controle da sua aplicação web Giovanni Bassi (giggio@giggio.net) Arquiteto de software independente www.giovannibassi.com unplugged.giggio.net WEB302
    2. 3. Agenda <ul><li>Porque está se falando tanto de ASP.Net MVC? </li></ul><ul><li>Motivações para o ASP.Net MVC </li></ul><ul><li>Controlando a arquitetura </li></ul><ul><li>Controlando seu HTML </li></ul>
    3. 4. Porque está se falando tanto de ASP.Net MVC? The good, the bad and the ugly
    4. 5. Porque tanto barulho? <ul><li>Mudança forte de paradigma </li></ul><ul><li>Muita gente achando que é o ASP.Net 4.0 ou o WebForms 4.0 (e não é) </li></ul><ul><li>Foco em boas práticas </li></ul><ul><li>Fim do “arrasta e solta” no designer visual </li></ul><ul><li>O desenvolvedor tem que conhecer HTML, Javascript e CSS </li></ul><ul><li>Diversas comunidades diferentes estão aplaudindo a iniciativa </li></ul>
    5. 6. The good <ul><li>Total controle sobre o HTML </li></ul><ul><li>Páginas menores (e sem viewstate) </li></ul><ul><li>Dois formulários na mesma página </li></ul><ul><li>Controle sobre cada pedaço do framework </li></ul><ul><li>Routing já no .Net 3.5 </li></ul><ul><li>Excelente integração com frameworks Javascript </li></ul><ul><li>Aliás, já vem com jQuery </li></ul><ul><li>É um framework mais “opinativo” </li></ul><ul><li>Boas práticas facilitadas </li></ul><ul><li>Testes facilitados </li></ul>
    6. 7. The bad <ul><li>Não há controles visuais (não?) </li></ul><ul><li>Mais difícil de integrar com o designer (dependendo do ponto de vista) </li></ul><ul><li>O time precisa conhecer HTML, Javascript, CSS, HTTP, XML (isso é ruim?) </li></ul><ul><li>Não há a ilusão de manutenção de estado presente no Webforms (isso é ruim?) </li></ul><ul><li>Integração com o Sharepoint não é nativa </li></ul>
    7. 8. The ugly <ul><li>Ainda é baseado em HTML </li></ul><ul><li>Não deixem de ver as palestras de Silverlight: </li></ul><ul><ul><li>Novidades do Silverlight 3 (26/08 13:15) </li></ul></ul><ul><ul><li>Explorando o Silverlight Toolkit (26/08 16:45) </li></ul></ul><ul><ul><li>Construindo uma aplicação com Silverlight 3 (27/08 13:15) </li></ul></ul>
    8. 9. Motivações para o ASP.Net MVC Porque inventar outro framework web para o ASP.Net?
    9. 10. Motivações <ul><li>O mercado pede facilidade de aplicação de padrões reconhecidos (SOLID, etc) </li></ul><ul><li>O mercado pede mais controle sobre o HTML </li></ul><ul><li>O mercado pede o fim da ilusão de manutenção de estado </li></ul><ul><li>Forte crítica dos desenvolvedores de outras plataformas </li></ul>
    10. 11. Controlando a arquitetura Criando uma aplicação para durar com boas práticas de desenvolvimento, OO e arquitetura
    11. 12. O papel do arquiteto (IMHO) <ul><li>Criar aplicações que resistam ao teste do tempo... </li></ul><ul><li>... que atendam os requisitos de negócio... </li></ul><ul><li>... os requisitos técnicos... </li></ul><ul><li>... e que tornem o processo de desenvolvimento mais fácil e agradável. </li></ul>
    12. 13. Com boas práticas <ul><li>Reusabilidade </li></ul><ul><li>Confiabilidade </li></ul><ul><li>Extensibilidade </li></ul><ul><li>Facilidade de manutenção </li></ul><ul><li>Diminuição da complexidade geral do sistema </li></ul>
    13. 14. E se trabalharmos sem boas práticas? <ul><li>Fácil de fazer, difícil de manter </li></ul><ul><li>Bugs, bugs, bugs </li></ul><ul><li>Produtividade cai </li></ul><ul><li>Testes ficam praticamente impossíveis </li></ul><ul><li>Gambiarras </li></ul><ul><li>Código espaguete </li></ul>
    14. 15. Produtividade com boas práticas
    15. 16. Produtividade sem boas práticas
    16. 17. Princípios SOLID S ingle Responsibility principle O pen Closed Principle L iskov substitution principle I nterface segregation principle D ependency Injection Robert C. Martin, a.k.a. Uncle Bob http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
    17. 18. Single Responsibility Principle Princípio da responsabilidade única <ul><li>“ Nunca deve haver mais de uma razão para uma classe mudar” – Uncle Bob (década de 90) </li></ul><ul><li>Uma classe deve ter só uma responsabilidade, só deve fazer uma coisa </li></ul><ul><li>Exemplos de responsabilidades: </li></ul><ul><ul><li>Log </li></ul></ul><ul><ul><li>Persistência </li></ul></ul><ul><ul><li>Exibição para o usuário (interface gráfica) </li></ul></ul><ul><ul><li>Tratamento de erro </li></ul></ul>
    18. 19. Cenários
    19. 20. Cenários
    20. 21. SRP Quebrado Giovanni Bassi Arquiteto de Software GiovanniBassi.com
    21. 22. Open Closed Principle Princípio aberto fechado <ul><li>“ Entidades de software (classes, módulos, funções, etc) devem ser abertas para extensão mas fechadas para modificações” – Bertrand Meyer (1988) </li></ul><ul><li>Você deve ser capaz de estender uma classe sem modificá-la </li></ul><ul><li>Separe o pode mudar do que não deve mudar </li></ul><ul><li>Só é possível com abstrações </li></ul>
    22. 23. OCP Quebrado Giovanni Bassi Arquiteto de Software GiovanniBassi.com
    23. 24. Liskov Substitution Principle Princípio de substituição de Liskov <ul><li>“ Se para cada objeto o1 de tipo S existe um objeto o2 do tipo T sendo que para todos os programas P definidos em termos de T, o comportamento de P não é alterado quando o1 é substituído por o2 então S é um subtipo de T.” – Barbara Liskov (1987) </li></ul><ul><li>Princípio da “habilidade de substituição” </li></ul><ul><li>Define exatamente como funciona a herança </li></ul><ul><li>Lembre-se das pré e pós condições </li></ul>
    24. 25. LSP Quebrado Giovanni Bassi Arquiteto de Software GiovanniBassi.com
    25. 26. Interface Segregation Principle Princípio da segregação de interfaces <ul><li>Clientes não devem ser forçados a depender em interfaces que não utilizam </li></ul><ul><li>Crie interfaces detalhadas que são específicas para um cliente </li></ul>
    26. 27. ISP Quebrado Giovanni Bassi Arquiteto de Software GiovanniBassi.com
    27. 28. Dependency Inversion Principle <ul><li>“ Princípio da inversão de dependência” </li></ul><ul><li>“ A) Módulos de alto nível não devem depender de módulos de baixo nível. Ambos devem depender de abstrações.” “B) Abstracões não devem depender de detalhes. Detalhes devem depender de abstrações.” – Uncle Bob (1996) </li></ul><ul><li>Dependa de abstrações e não de classes concretas </li></ul><ul><li>Use interfaces ou abstract classes </li></ul><ul><li>Dependência é transitiva </li></ul>
    28. 29. Dependency Inversion Principle Serviço Interface gráfica
    29. 30. Dependency Inversion Principle Abstração serviço Serviço Interface gráfica
    30. 31. Dependency Inversion Principle Serviço Acesso a dados Utilidades Interface gráfica
    31. 32. Dependency Inversion Principle Abstração serviço Abstração de acesso a dados Abstração de utilidades Serviço Acesso a dados Utilidades Interface gráfica
    32. 33. DI Quebrado e arrumando tudo Giovanni Bassi Arquiteto de Software GiovanniBassi.com
    33. 34. Controlando seu HTML Quem precisa de controles web?
    34. 35. HTML sob controle <ul><li>Não há controles: todo o HTML é feito manualmente </li></ul><ul><li>Com HTML, jQuery e CSS você consegue oferecer a mesma experiência que o Webforms proporcionava, inclusive com Ajax Toolkit </li></ul>
    35. 36. E a produtividade? <ul><li>A maior parte do código inicial é gerada para você </li></ul><ul><li>Altamente customizado com uso de T4 (Text Template Transformation Toolkit) </li></ul><ul><li>A ilusão de manutenção de estado se torna desnecessária diante do ciclo de vida do MVC </li></ul>
    36. 37. Controlando o HTML Giovanni Bassi Arquiteto de Software GiovanniBassi.com
    37. 39. Recursos <ul><li>www.microsoft.com/teched </li></ul><ul><ul><li>Tech·Talks Tech·Ed Bloggers </li></ul></ul><ul><ul><li>Live Simulcasts Virtual Labs </li></ul></ul><ul><li>http://www.technetbrasil.com.br </li></ul><ul><ul><li>Avaliação de produtos finais e betas, conteúdo técnico em português e MUITO MAIS! </li></ul></ul><ul><li>http://www.msdnbrasil.com.br </li></ul><ul><ul><li>Developer’s Kit, conteúdo técnico em português, e MUITO MAIS! </li></ul></ul>
    38. 40. <ul><li>Mais informações: http://giovannibassi.com/Cursos </li></ul>ASP.Net MVC (2ª turma) 2 e 3 de Outubro (sexta e sábado) Padrões de projeto e princípios SOLID 23 e 24 de Outubro (sexta e sábado) Cursos
    39. 41. Sessões Relacionadas <ul><li>WEB201 - Novidades do Microsoft ASP.NET 4.0 </li></ul><ul><li>WEB301 - Microsoft ASP.NET AJAX 4.0: Leve seu conhecimento com AJAX para o próximo nível </li></ul><ul><li>WEB308 - Como Criar uma Aplicacão WEB de Alta Performance com Cache Distribuído </li></ul><ul><li>WEB305 - Novidades do Microsoft Silverlight 3 </li></ul>
    40. 42. Outros Recursos Relacionados <ul><li>Site do ASP.Net MVC: </li></ul><ul><li>www.asp.net/mvc </li></ul><ul><ul><li>Scott Hanselman (Microsoft – inglês): </li></ul></ul><ul><ul><li>www.hanselman.com/blog/CategoryView.aspx?category=ASP.NET+MVC </li></ul></ul><ul><li>Phil Haack (Microsoft – inglês) : </li></ul><ul><li>haacked.com/Tags/ASP.NET%20MVC/default.aspx </li></ul><ul><li>Giovanni Bassi (MVP – português): </li></ul><ul><li>unplugged.giggio.net/?tag=/asp.net+mvc </li></ul>
    41. 43. Por favor preencha a avaliação
    42. 44. Giovanni Bassi Email: [email_address] Site: www.giovannibassi.com Blog: unplugged.giggio.net Twitter: @giovannibassi
    43. 45. © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

    ×