La présentation est en train de télécharger. S'il vous plaît, attendez

La présentation est en train de télécharger. S'il vous plaît, attendez

ASP.NET AJAX Control Toolkit

Présentations similaires


Présentation au sujet: "ASP.NET AJAX Control Toolkit"— Transcription de la présentation:

1 ASP.NET AJAX Control Toolkit
Pierre Lagarde blogs.developpeur.org/fox Microsoft France

2 Agenda Positionnement de « Ajax Control Toolkit »
Utilisation des « Control Toolkit » Développement d’un « Control Toolkit » Shared Source

3 Le but Pour le développeur utilisant des contrôles
4/13/2017 6:18 PM Le but Pour le développeur utilisant des contrôles Rester dans un mode de développement côté serveur tout en bénéficiant de technologie client (Ajax) Pour le développeur qui développe des contrôles Rendre le développement côté client plus facile Redonner envie de développer des contrôles ASP.NET avec un comportement client Développement transparent dirigé par la communauté Fun © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

4 4/13/2017 6:18 PM Les Toolkit c’est quoi Un framework sur le « Microsoft Ajax Framework » Permet d’étendre le comportement d’un contrôle de base de ASP.NET v2 côté client Permet de développer un contrôle ASP.NET tirant parti de Ajax Un projet en « Shared Source » 3 personnes de Microsoft ~10 contributeurs externes Hébergé sur Nouvelle version téléchargeable à chaque Check-In Nécessite une permission pour avec les droits sur la gestion de source Utilisation de Team Foundation Server © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

5 Positionnement ASP.NET AJAX Extensions Value-Add CTP
4/13/2017 6:18 PM Positionnement ASP.NET AJAX Extensions Value-Add CTP ASP.NET AJAX Toolkit ASP.NET AJAX Extensions Community Co-Development Rapid Innovation and Experimentation Server Side Client Side Microsoft AJAX Library © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

6 4/13/2017 6:18 PM Toolkit Architecture Les Toolkit sont développés sur Microsoft Ajax Core ASP.NET AJAX Control Toolkit Components Visual Studio 2005 Templates ASP.NET AJAX Control Toolkit Base Classes (.NET & JavaScript) ASP.NET AJAX Server Extensions Components ASP.NET AJAX Library Framework ASP.NET 2.0 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

7 Les bases Cross-browser comme Microsoft Ajax
4/13/2017 6:18 PM Les bases Cross-browser comme Microsoft Ajax IE 6.x, IE 7 Firefox Safari (Opera) Cohabitation possible avec d’autres framework Ajax Extendeurs et Contrôles © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

8 Pour le développeur de page
4/13/2017 6:18 PM Pour le développeur de page Utilisation facile même sur un site existant Plus de 30 contrôles disponibles Connaissance JavaScript pas nécessaire Drag – Drop dans Visual Studio Déploiement simple Copie de la DLL dans le répertoire bin de l’application Source dispo pour une personnalisation plus fine  © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

9 Utilisation des “Control Toolkit” sur un site existant
4/13/2017 6:18 PM Démo Utilisation des “Control Toolkit” sur un site existant © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

10 Le développeur de Contrôle
4/13/2017 6:18 PM Le développeur de Contrôle Template d’extendeur dans Visual Studio Behaviors (JavaScript) Ajoute ou modifie les fonctionnalités d’un élément de la page Modifie le HTML / DOM Extenders (Server) Composant ASP.NET Associé avec un Contrôle ASP.NET et un behavior Déposé en design côté serveur Designer (Visual Studio) Contrôle Composant ASP.NET autonome avec un behavior JavaScript rattaché © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

11 4/13/2017 6:18 PM JavaScript OOP Le Javascript est un langage « object-base » et non « object-oriented » Ajout de type étendu Array – add, contains, remove… Boolean Number - Parse Object – getType, getTypeName String – format, endsWith, startWith, trim … Microsoft Ajax Framework ajoute Namespaces Classes Héritage Interface Type Enumérés © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

12 L’Extender Extender [ClientScript(“…”)]
4/13/2017 6:18 PM L’Extender Extender [ClientScript(“…”)] [TargetControlType(typeof(Control))] public class MyExtender : ExtenderControlBase { [ExtenderProperty] public string MyStringProp{} public int MyIntProp{} } © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

13 Behavior Extender Behavior [ClientScript(“…”)]
4/13/2017 6:18 PM Behavior Extender [ClientScript(“…”)] public class MyExtender : ExtenderBase<TextBox> { // … } Behavior MyProject.MyBehavior = function(e) { MyProject.MyBehavior.initializeBase(this, [e]); this._myStringPropValue = null; this._myStringIntValue = 0; } MyProject.MyBehavior.prototype = { initialize function() { … }, get_MyStringProp : function(){}, set_MyStringProp : function(value){}, get_MyIntProp : function(){}, set_MyIntProp : function(value){} © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

14 Utilisation Extender Behavior Utilisation
4/13/2017 6:18 PM Utilisation Extender [ClientScript(“…”)] public class MyExtender : ExtenderBase<TextBox> { // … } Behavior AtlasControlToolkit.MyBehavior = function() { AtlasControlToolkit.MyBehavior.initializeBase(this); var _myStringPropValue; this.initialize = function() { … } this.get_MyStringProp = function(){} this.set_MyStringProp = function(value){} } Utilisation <cc1:MyExtender runat=“server” TargetControlID=“TextBox1” MyStringProp=“Hello” MyIntProp=“23” </cc1:MyExtender> public class MyExtenderProperties : PropertiesBase<TextBox> { public string MyStringProp{ … } public int MyIntProp{ … } } © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

15 Développement d’un Contrôle Toolkit
4/13/2017 6:18 PM Démo Développement d’un Contrôle Toolkit © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

16 La référence technique pour les IT Pros : La référence technique
technet.microsoft.com 4/13/2017 6:18 PM La référence technique pour les développeurs : msdn.microsoft.com Abonnement TechNet Plus : Versions d’éval + 2 incidents support Visual Studio Abonnement MSDN Premium S’informer - Un portail d’informations, des événements, une newsletter bimensuelle personnalisée Se former - Des webcasts, des articles techniques, des téléchargements, des forums pour échanger avec vos pairs Bénéficier de services - Des cursus de formation et de certification, des offres de support technique © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

17 Votre potentiel, notre passion TM
4/13/2017 6:18 PM Votre potentiel, notre passion TM © 2007 Microsoft France © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

18 Demo Concept: FontSizeExtender
4/13/2017 6:18 PM Demo Concept: FontSizeExtender FontSizeExtender: Allows a user to dynamically change the size of text in a Panel. Color Coded Items: Size Control UI Size Decrement Size Increment Control Target Panel © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

19 Creating an Extender Project
4/13/2017 6:18 PM Creating an Extender Project Toolkit package has Visual Studio templates for: Toolkit-enabled website Toolkit component project Toolkit Components VB & C# for each © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

20 Toolkit Serialization and Metadata
4/13/2017 6:18 PM Toolkit Serialization and Metadata Toolkit uses metadata on the Extender class to generate client side hookups via reflection Metadata attributes for your properties ExtenderControlPropertyAttribute (required) ElementReferenceAttribute IDReferenceAttribute ClientPropertyNameAttribute RequiredPropertyAttribute DefaultValue Attribute © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

21 Defining the Extender Class
4/13/2017 6:18 PM Step 1: Defining the Extender Class © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

22 Using other Toolkit Behaviors
4/13/2017 6:18 PM Using other Toolkit Behaviors Server Side Declare dependencies with RequiredScriptAttribute Client Side Create components using $create Setup properties with JSON notation Use client side delegates for event handlers © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

23 Consuming other behaviors Handling events Coding Client-Side Logic
4/13/2017 6:18 PM Step 2: Consuming other behaviors Handling events Coding Client-Side Logic © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

24 Advanced Toolkit Features
4/13/2017 6:18 PM ClientState Available on server side and client side Works for post-backs Does not work across page invocations (but you can access the value to save in SessionState, etc.) Built-in helper functions on client side Animations Library Flexible animation package for client side Fully compositable animations Can be declared using code or XML Easily add professional-grade effects to your components © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

25 Adding animation support
4/13/2017 6:18 PM Step 3: Saving client state Adding animation support © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

26 Toolkit Futures Recruiting Contributors Goal of 50+ components
4/13/2017 6:18 PM Toolkit Futures Recruiting Contributors Goal of 50+ components Eventually handing off to community owner(s) Toolkit will evolve as ASP.NET AJAX continues to evolve © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

27 More Information CodePlex ASP.NET Forums http://blogs.msdn.com/sburke
4/13/2017 6:18 PM More Information CodePlex ASP.NET Forums © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

28 Ask The Experts Get Your Questions Answered
You can find me at the Microsoft Ask the Experts area, located in the Exhibition Hall: Thursday 9 November – 10.45 Thursday 9 November – 15.45

29

30

31 ©. 2006 Microsoft Corporation. All rights reserved
© 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.


Télécharger ppt "ASP.NET AJAX Control Toolkit"

Présentations similaires


Annonces Google