ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21...
-
Upload
xavier-hammond -
Category
Documents
-
view
217 -
download
1
Transcript of ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21...
![Page 1: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/1.jpg)
ASP.NET MVC v2Cosa c’è di nuovo
Simone ChiarettaSolution Developer, Avanadehttp://codeclimber.net.nzTwitter: @simonech
21 Ottobre 2009
![Page 2: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/2.jpg)
Un ringraziamento agli Sponsors
![Page 3: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/3.jpg)
Who the hell am I?
► Simone Chiaretta► Lavoro per Avanade Italy► Microsoft MVP ASP.NET► Blogger – http://codeclimber.net.nz ► Fondatore di UGIALT.NET► OpenSource developer► Climber► All Around Nice Guy
![Page 4: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/4.jpg)
Agenda
► Intro► Area► Html Templated Helpers► Model Validation► Client Side Validation► Q&A
![Page 5: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/5.jpg)
Intro
► Migliorare la produttività► Essere pronto per lo sviluppo Enterprise
![Page 6: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/6.jpg)
Areas
![Page 7: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/7.jpg)
Area
► Permette di partizionare meglio un’applicazione– Più aree nello stesso progetto– Un’area per progetto
![Page 8: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/8.jpg)
Area
► Folder Controllers/View per area
► Routes.cs con registrazione area
► Global.asax– AreaRegistration.RegisterAllAreas()
![Page 9: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/9.jpg)
Templated Helpers
![Page 10: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/10.jpg)
Templated Helpers
► Html.EditorFor( m => m.Title);► Html.LabelFor( m => m.Title);► Html.DisplayFor( m => m.Title);
![Page 11: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/11.jpg)
Templated Helpers
► Controllati tramite DataAnnotation– [UIHint("Category")]– [DisplayName("Post Category")]– [DataType(DataType.EmailAddress)]
![Page 12: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/12.jpg)
Templated Helpers
► BYO► Shared\DisplayTemplates► Shared\EditorTemplates
![Page 13: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/13.jpg)
Model Validation
![Page 14: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/14.jpg)
Model Validation
► Controllato tramite Model Validation Provider
► Default usa DataAnnotations– [Required]– [Range(0,100)]– [StringLength(100)]– [RegularExpression(regEx)]
![Page 15: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/15.jpg)
Client Side Validation
![Page 16: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/16.jpg)
Client Side Validation
► Usa il Model Validation Provider► Basato su jQuery Validate► Per attivarlo basta:
– <% Html.ClientValidationEnabled = true; %>
![Page 17: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/17.jpg)
Beginning ASP.NET MVC
► Simone Chiaretta e Keyvan Nayyeri
► TOC:– MVC– Testing– And more...
► Compratelo con lo sconto oggi da Hoepli
http://bit.ly/BeginningASPNETMVC
![Page 18: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/18.jpg)
Contatti – Simone Chiaretta
► MSN: [email protected]► Blog:
– English: http://codeclimber.net.nz/– Italiano: http://blogs.ugidotnet.org/piyo/
► Twitter: @simonech
18
![Page 19: ASP.NET MVC v2 Cosa cè di nuovo Simone Chiaretta Solution Developer, Avanade Twitter: @simonech 21 Ottobre 2009.](https://reader035.fdocumenti.com/reader035/viewer/2022062417/55161b9e55034694308b5772/html5/thumbnails/19.jpg)
Q&A
19