Presentation on how to chat with PDF using ChatGPT code interpreter
Being a pimp without silverlight - ASP.NET MVC 2 and jQuery
1. Bling-bling with MVC and jQuery Being a pimp without Silverlight Maarten Balliauw @maartenballiauw Kris van der Mast @KvdM
2. Who are we? – Maarten Maarten Balliauw Antwerp, Belgium www.realdolmen.com Focus on web ASP.NET, ASP.NET MVC, PHP, Azure, VSTS, … MVP ASP.NET http://blog.maartenballiauw.be http://twitter.com/maartenballiauw
3. Who are we? – Kris Kris van der Mast Antwerp, Belgium www.ordina.be Focus on web technologies ASP.NET, ASP.NET MVC, WCF, Silverlight, ... MVP for ASP.NET ASP Insider http://blog.krisvandermast.com http://www.twitter.com/KvdM
8. ASP.NET WebForms Taken programming model from WinForms Fake stateful model Automatic testing is hard
9. ASP.NET MVC Testability Control over HTML Extensibility It makes you think Learn new concepts “if you are allergic to porc,don’t go work in a sausage factory”
10. Model-View-Controller in ASP.NET MVC Model (“DTO” between C and V) Controller (Input) Request Response Application Logic View (Presentation)
11. Characteristics Maintain Clean Separation of Concerns Easy Testing Red/Green TDD Highly maintainable applications by default Extensible and Pluggable Support replacing any component of system
12. Characteristics Enable clean URLs and SEO SEO friendly URL structures Great ASP.NET integration All providers are supported Membership, Caching, Session, … ASP.NET designer in VS2008/VS2010
13. New in ASP.NET MVC2... Validation Strongly Typed HTML Helpers Templated HTML Helpers Areas Async Controllers
15. jQuery What is jQuery? JavaScript Abstraction “LINQ to DOM” Why use jQuery? Making JavaScript and the DOM suck less Easy to Use Rich Plug-in Ecosystem Cross Browser Support
17. The Basics jQuery() and $() The ready() Function Effective when DOM is ready jQuery(document).ready(main); $(document).ready(main); $(document).ready(function() { … } ); $(function() { … } ); function main() { … }
21. It gives you power! functionvalidateForm() { var f = document.forms[0]; var atLeastOneChecked = false; for (var i = 0; i < document.forms[0].length; i++) { var e = document.forms[0][i]; if (e.type == "checkbox" && e.className == "group1" && e.checked) { atLeastOneChecked = true; } } if (!atLeastOneChecked) { alert("Please check at least one item!"); } return atLeastOneChecked; } functionvalidateForm() { if ($(".group1:checked").length == 0) { alert("Please check at least one item!"); return false; } return true; }
22. Unobtrusive JavaScript Start with “plain old HTML” Layer on some CSS styling providing visual style Layer on some JavaScript providing enhanced behaviour
26. Manipulating HTML html() Gets/sets the innerHTML text() Gets/sets the innerText Method, not property syntax Other Methods append() prepend() appendTo() prependTo() remove
27. Plug-ins Rich Plug-in Ecosystem Thousands available Downloadable .js files You can create your own http://jQuery.com/plugins
MVC is a design pattern that stands for Model-View-Controller. What is strives to do is separate the concerns of an application’s presentation layer by assigning specific roles to the three different components.The Controller is responsible for handling all user input. Once input has been received, the Controller will perform any operations/actions it needs to, which might include interacting with the Model.The Model represents the core concern/logic of the application. Once the Controller retrieves some model data and performs any work with the model/etc it needs to it constructs a presentation model that describes the model in terms the View can understand.The View is the visual representation of the model. It presents the model data to the actual user in a way that is meaningful. In a web application, this would typically be HTML.With these three pieces in place, your presentation layer becomes cleanly separated in such a way that each component can be developed/tested independently.
-Model has onepurpose-Controller has onepurpose-View really handles the view, no business logic in there!-Each part is replacable-Source code availableonCodePlex. Not open source, butenablesyou to buildyourown, private flavour
-Usersexpect clean URLsnowadays-Notreplacing ASP.NET built on top of it
-Usersexpect clean URLsnowadays-Notreplacing ASP.NET built on top of it