Web Control Framework PowerPoint deck

Download Report

Transcript Web Control Framework PowerPoint deck

The
West Wind Web Connection 5.0
Web Control Framework
An overview of the new Web Control Framework
in Web Connection 5.0
Rick Strahl
West Wind Technologies
www.west-wind.com
Design Goals for Web Control Framework


Richer Application Development Model
 Control based framework for more natural coding
 Event based model – client actions fire server events
 Using ASP.NET compatible Page syntax
 Visual Designer support with .NET 2.0 Tools
 No .NET *runtime* requirements for deployed apps
Extensibility
Allow developers to hook into framework pipeline
 Allow custom control development to extend functionality
Minimal Impact on existing Apps
 Designed for maximum backwards compatibility
 Note: Minor changes are required for pre-5.0 apps
 New Web Control Framework usage OPTIONAL


Web Control Framework

Html as Objects: Rich Object Oriented Framework






FoxPro Centric





You write FoxPro code for all logic
Supports easy two way databinding (FoxPro data and objects)
Automatic error management for forms based on databinding
No runtime dependence on .NET!
Automatic Page State Management




Control based metaphor: Page class with contained controls
You access control properties to read and write page content
Page actions fire events into your FoxPro code
Fully extensible – you can create your own controls
Visual User Control support allows reuse of ‘compositions’
PostBack values are automatically assigned back to controls
Viewstate can be used to persist non-POST values across Postbacks
Declaratively store values in the page between Postbacks (PreserveProperty)
Visual Designer Support


You can use .NET 2.0 compatible designers: VS.NET and Visual Web Developer
Page markup is just text - you can use NotePad, DreamWeaver, FrontPage, FoxPro
Web Control Framework

Object Oriented





Event Driven




All controls inherit from wwWebControl
Common set of features to all controls
Create new controls by subclassing
New controls are automatically script enabled*
Server Events map to methods in your Page Class
In your script markup:
<ww:wwWebButton … click="this.Page.btnSubmit_Click"/>
In your FoxPro class:
Function btnSubmit_Click()
this.lblMessage.Text = "Hello World " + TRANS(DateTime())
ENDFUNC
Container Support




Intrinsic support for nested components
Container nesting is supported both visually and via code
Controls have ChildControls, Parent and Page properties
Panels can host controls, DataGrids can host DataColumns etc.
* Visual Designer support requires creation of a .NET wrapper component
Web Control Hierarchy
some common controls
wwWebControl
Containers
Core Controls
List Controls
wwWebPage
wwWebTextBox
wwWebDropDownList
wwWebPanel
wwWebButton
wwWebListBox
Extended Controls
wwWebLabel
wwWebRadioButtonList
wwErrorDisplay
wwWebCheckBox
wwWebDataGrid
wwFckEditor
wwWebRadioButton
Ajax
wwWebTabControl
wwWebImageButton
wwAjaxMethodCallback
wwWebLogin
wwWebHyperLink
wwHoverPanel
wwWebFileUpload
wwWebLinkButton
wwModalDialog
wwDragPanel
From Markup Design to FoxPro Code

Rich Markup Scripts





Uses ASP.NET compatible control syntax (Html + Controls)
Supports basic stock ASP.NET controls
Web Connection provides specific controls
Specific controls are FoxPro centric
Code Generation and Compilation




WebPageParser convert scripts to pure VFP PRG code
Converts each server tag to a VFP object
Maps attributes to properties or events/methods
2 classes are generated in a single source file
 Generated class with control definitions (regenerated often)
 User class contains your page logic (never updated by generator)

Automatic Page Conversion/Compilation



When Page is executed compilation occurs automatically
Compilation only with debug mode enabled
Manual compilation using the WebPageParser class
Web Control Event Pipeline

Page Lifecycle







Requests cause Page to 'Run()'
Page is just another WebControl
Run() causes Page Event Sequence to fire
Each control fires a set of fixed events
Each control fires events into any child controls
Events deal with Initialization, State,
Operation and Rendering
Controls are fully self contained

Each control manages its own state






Retrieves ViewState
Retrieves POST data
Saves its own ViewState
Each control Renders itself
Controls render in non-PageFramework pages!
Some features like ViewState work in conjunction with the Page object
Visual Studio Designer Support
Script Page Code
Generated Class from Script (same file as your custom class)
Your Custom Class
(same file as generated class)
Other Features of Page Framework

Control based Caching
 All Controls can be cached once rendered
 Once cached Cached control is not rendered again

Client Script Management
 You can add script code to the ClientScript collection
 Framework manages rendering of the script code

ViewState Persistence Management
 Stores Page specific content
 Control.PreserveProperty() save and restores property values

Security
 Integration of wwUserSecurity Class
 FoxPro table based authentication
 Integrated into Process class in addition to Basic
 wwWebLogin control for Control based Login
AJAX Features





JSON Method Callbacks
 Call page methods or any class method
 wwAjaxMethodCallback control makes it EASY
 wwJsonService for classic WWWC
 Converts objects and Tables/Cursors to JSON
wwHoverPanel
 Easy Popup window with server data
 Optional Iframe Popup support
wwDragPanel
 Draggable and Closable Client Window/Panels
wwModalPopup
 Popup windows that block out background
 Easy way to require client top operation
Client AJAX Library
 Based on jQuery – rewritten for WWWC 5.40
 Many jQuery plug-ins provided
 Easy to use convenience methods
.NET Managed Module


Replaces ISAPI DLL with .NET Module
 Easier code base to maintain
 Proper moving forward path for IIS support
 Many more opportunities to improve features
 Already includes a number of enhancements
 Possible support for Linux through Mono
Many Benefits
 Can run natively in IIS 7
 Allows operating under 64 bit servers
 Allows operating without IIS (VS WS, Cassini)
 Cassini server shipped with Web Connection
Web Connection Cassini Web Server

Local Web Server
 Allows running Web Connectionwithout IIS/Apache
 Used in locked down IT environments
 Used for 'local' Web applications
 Uses the .NET Managed Module

Offline Applications
 Server is a self contained EXE (requires 2 support dlls)
 Server can be distributed with your applications
 Server can be nstalled on client machines
 Allows running Web apps 'offline'
(still needs data and code, but can run locally)
Pricing

Pricing and Upgrades
 Full Version Pricing: $399.00
 Upgrade Pricing: $299.00

Shareware version available
 Fully functional
 Precompiled (some options can’t be set)
 Shareware Nag screen

More info:
www.west-wind.com/webconnection

Support
www.west-wind.com/wwThreads
