Building Server Behaviors Tom Muck co-author Building Dreamweaver 4 and Dreamweaver UltraDev 4 Extensions.

Slides:



Advertisements
Similar presentations
Tridion 5.3 Templates.
Advertisements

JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
 Copyright Wipro Technologies JSP Ver 1.0 Page 1 Talent Transformation Java Server Pages.
Ch. 5 Web Page Design – Templates and Style Sheets Mr. Ursone.
Using JavaServer Pages Harry R. Erwin, PhD CIT304/CSE301.
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Microsoft ASP.NET AJAX - AJAX as it has to be Presented by : Rana Vijayasimha Nalla CSCE Grad Student.
Website Development with PHP and MySQL Introduction.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Mgt 240 Lecture Website Construction: Software and Language Alternatives March 29, 2005.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
Overview of JSP Technology. The need of JSP With servlets, it is easy to – Read form data – Read HTTP request headers – Set HTTP status codes and response.
1 Forms for the Web Tom Muck
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
PHP : Hypertext Preprocessor
Lesson 13: Building Web Forms Introduction to Adobe Dreamweaver CS6 Adobe Certified Associate: Web Communication using Adobe Dreamweaver CS6.
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
CSCI 6962: Server-side Design and Programming
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
WorkPlace Pro Utilities.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Dynamic Action with Macromedia Dreamweaver MX Barry Sosinsky Valda Hilley.
Tutorial 10 Adding Spry Elements and Database Functionality Dreamweaver CS3 Tutorial 101.
1 Test Automation For Web-Based Applications Selenium HP Web Test Tool Training Portnov Computer School.
Selenium Web Test Tool Training Using Ruby Language Discover the automating power of Selenium Kavin School Kavin School Presents: Presented by: Kangeyan.
09/28/ Cascade Server User's Conference1 Smart Cascade Server Implementations & Strategies 2009 Cascade Server User’s Conference Justin Klingman,
DATABASE PROGRAMMING Lecture on 16 – 05 – PREVIOUS LECTURE QUIZ: - Some students were very creative in transforming 2NF to 3NF. Excellent! - Some.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
COLD FUSION Deepak Sethi. What is it…. Cold fusion is a complete web application server mainly used for developing e-business applications. It allows.
University of Sunderland CDM105 Session 5 Web Authoring Tools The past and present A history of web authoring tools and an overview of Macromedia Dreamweaver.
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
1 In the good old days... Years ago… the WWW was made up of (mostly) static documents. –Each URL corresponded to a single file stored on some hard disk.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
Session 1 SESSION 1 Working with Dreamweaver 8.0.
© 2010 Delmar, Cengage Learning Chapter 8 Collecting Data with Forms.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Introduction to ASP.NET T.Ahlam Algharasi. The Visual Studio IDE Start page 2.
Web User Controls This presentation will cover the basics of defining, creating and using a web user control. Presented to Twin Cities.NET user group By.
Overview: 1. Discussion of the basic architecture of a web application. 2. Discussion of the relevance of using MySQL and PHP in a web application.
Dreamweaver 8 Introduction What you can do with Dreamweaver 8 What's new in Dreamweaver 8.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Dudok de Wit David.  Documents management in a deskless company  SharePoint Online as a solution  Redesigning the documentary organization  Interoperability.
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
Copyright © 2012 UNICOM Systems, Inc. Confidential Information z/Ware Product Overview illustro Systems International A Division of UNICOM Global.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
Syntegra Logo Slide Increasing Productivity By Using Homesite + Jo Belyea-Doerrman CFFUN 03 June 22, 2003.
Tutorial 3 Adding and Formatting Text with CSS Styles.
An Introduction to JavaServer™ Pages Prepared by Nicole Swan.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
An Introduction to JavaServer™ Pages Prepared by Nicole Swan.
1 Introduction to Servlets. Topics Web Applications and the Java Server. HTTP protocol. Servlets 2.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
WEB SERVER SOFTWARE FEATURE SETS
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Overview of the Spring Framework Introducing.
Text INTRODUCTION TO ASP.NET. InterComm Campaign Guidelines CONFIDENTIAL Simply Server side language Simplified page development model Modular, well-factored,
Java Server Pages. 2 Servlets The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
Dreamweaver - Forms questionnaire, register, login, etc.
Struts 2 Development. Topics  Roles in Struts Development  Control Flow  Actions  Struts 2 Views and Target  Struts 2 Custom Tags  Validation 
Introduction to.
Business rules.
Dreamweaver MX Lesson 14: Using Find and Replace.
The Online Smith Family Recipe Program
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Grauer and Barber Series Microsoft Access Chapter One
Enterprise Web Services
Presentation transcript:

Building Server Behaviors Tom Muck co-author Building Dreamweaver 4 and Dreamweaver UltraDev 4 Extensions

The Dreamweaver Extensibility Model Objects Objects Behaviors Behaviors Commands Commands Server Behaviors Server Behaviors Data Sources Data Sources Toolbars Toolbars

Server Behaviors Used to insert code that needs to be processed at the Server Used to insert code that needs to be processed at the Server Important to the integration of custom code into the Dreamweaver environment Important to the integration of custom code into the Dreamweaver environment Supported for all of the Dreamweaver Server Models Supported for all of the Dreamweaver Server Models ASP, PHP, CF, JSP, ASP.NET ASP, PHP, CF, JSP, ASP.NET Can include one or more models Can include one or more models

Constructing Server Behaviors Assemble working code Assemble working code Build the Server Behavior Build the Server Behavior Hand Coding Hand Coding The Server Behavior Builder The Server Behavior Builder Test the Server Behavior Test the Server Behavior Package and Distribute the Server Behavior Package and Distribute the Server Behavior

The Server Behavior Builder Designed to simplify the addition of custom Server Behaviors Designed to simplify the addition of custom Server Behaviors Requires that you know two things Requires that you know two things The final code needed to do the job The final code needed to do the job Where the code needs to go Where the code needs to go Handles the construction of the various functions within a Server Behavior Handles the construction of the various functions within a Server Behavior Has significantly increased the number of available behaviors Has significantly increased the number of available behaviors

Response.Redirect Server Behavior Assemble the working code Assemble the working code Construct the Server Behavior Construct the Server Behavior Touring the Server Behavior BuilderTouring the Server Behavior Builder Testing the Server BehaviorTesting the Server Behavior Packaging and Distributing the Server Behavior Packaging and Distributing the Server Behavior MXI files MXI files MXP files MXP files The Dreamweaver Exchange The Dreamweaver Exchange

A Conditional Region Server Behavior More complex code More complex code Requires multiple code blocks Requires multiple code blocks Can be applied to a variety of objects Can be applied to a variety of objects Can be built to check for a number of conditions Can be built to check for a number of conditions

Part 2 Going Beyond the Server Behavior Builder

Limitations of the SBB Doesn’t provide input validation Doesn’t provide input validation Creates regular expressions that match the code exactly -- no fuzzy matches possible Creates regular expressions that match the code exactly -- no fuzzy matches possible Doesn’t manipulate the selection Doesn’t manipulate the selection

SBB-generated Server Behaviors Can Be Extended SBB builds HTML, JS, and XML extensions -- no mystery here. They can be extended. SBB builds HTML, JS, and XML extensions -- no mystery here. They can be extended. SBB files located in three places: SBB files located in three places: HTML files located in ServerBehaviors folder HTML files located in ServerBehaviors folder XML files located in ServerBehaviors folder XML files located in ServerBehaviors folder Controls located in Shared > Controls > Scripts folder Controls located in Shared > Controls > Scripts folder

Structure of a Server Behavior initializeIU() -- initializes all controls initializeIU() -- initializes all controls canApplyServerBehavior() -- can the SB be applied? canApplyServerBehavior() -- can the SB be applied? findServerBehaviors() -- finds instances of the SB on the page findServerBehaviors() -- finds instances of the SB on the page applyServerBehavior() -- applies the SB to the page applyServerBehavior() -- applies the SB to the page A Server Behavior is an HTML document with JavaScript functions, API calls, and XML participants

Structure of a Server Behavior - pt 2 More API functions More API functions inspectServerBehavior() -- take the SB apart and populate the interface deleteServerBehavior() -- delete the SB analyzeServerBehavior() -- is the SB whole?

API Functions Not Implemented copyServerBehavior() copyServerBehavior() pasteServerBehavior() pasteServerBehavior() With these two functions defined in your SB, you can copy and paste Server Behaviors between pages. With these two functions defined in your SB, you can copy and paste Server Behaviors between pages. Not implemented, but fully documented in the Extending DW and Dreamweaver documents. Not implemented, but fully documented in the Extending DW and Dreamweaver documents.

Input Validation Generic JavaScript routines can be written to use in your extensions Generic JavaScript routines can be written to use in your extensions Best place to put the validation -- applyServerBehavior() Best place to put the validation -- applyServerBehavior() Use the errStr to create an error message -- this will stop the SB from being applied Use the errStr to create an error message -- this will stop the SB from being applied Benefits of validation Benefits of validation Pitfalls of validation Pitfalls of validation

Pitfalls of Validation Example: Adding a color to a Server Behavior Example: Adding a color to a Server Behavior Can your color look like this? Can your color look like this? #00FF00 #00FF00 Can your color look like this? Can your color look like this? #00ff00 #00ff00 How about this? How about this? Red Red

Pitfalls of Validation Or this? Or this? #Recordset1.UserColorPref# #Recordset1.UserColorPref# Or this? Or this? Answer: Answer: There is no way to validate for every user and every situation. You can’t predict how someone else will use your extension or how you will use it in the future. There is no way to validate for every user and every situation. You can’t predict how someone else will use your extension or how you will use it in the future.

canApplyServerBehavior() -- How to Take Advantage of It What does your SB need as a prerequisite? What does your SB need as a prerequisite? How do you find out if the page has what it needs? How do you find out if the page has what it needs? Thinking ahead. Can this function come back to haunt you? Thinking ahead. Can this function come back to haunt you?

Other Dreamweaver Extensions: Server Formats Server Formats Server Models Server Models Translators Translators Connections Connections Server Behavior Builder Controls Server Behavior Builder Controls Data Sources Data Sources

Server Formats -- Located in the ServerFormats folder Adds a format or function to a server expression Adds a format or function to a server expression Examples: Examples: Money formatting Money formatting Time formatting Time formatting Removing or replacing characters Removing or replacing characters These require that a regular expression to be written inside of the Formats.xml file These require that a regular expression to be written inside of the Formats.xml file

Translators New format for Dreamweaver MX New format for Dreamweaver MX Different than Dreamweaver Translators Different than Dreamweaver Translators -- XML architecture -- XML architecture Located in the ExtensionData > MM > Translations folder Located in the ExtensionData > MM > Translations folder

Connections Connections are extensible also Connections are extensible also JDBC Drivers can be easily added JDBC Drivers can be easily added

Server Behavior Builder Controls SBB is extensible SBB is extensible Controls available on the Web Controls available on the Web Files located in Files located in Configuration > Shared > Controls > String Menu Configuration > Shared > Controls > String Menu Configuration > Shared > Controls > Scripts Configuration > Shared > Controls > Scripts Remember to include the JS file in your extension Remember to include the JS file in your extension

Data Sources Many possibilities for new extensions Many possibilities for new extensions COM objects COM objects CF Tags CF Tags ASP Objects ASP Objects Shopping Carts Shopping Carts These are complex extensions tied in with Server Behaviors and Commands These are complex extensions tied in with Server Behaviors and Commands