Advanced Zen - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Advanced Zen

Description:

– PowerPoint PPT presentation

Number of Views:157
Avg rating:3.0/5.0
Slides: 24
Provided by: Eliz231
Category:
Tags: advanced | zen

less

Transcript and Presenter's Notes

Title: Advanced Zen


1
Advanced Zen
  • Pat McGibbon, Maxim Vershinin

2
Agenda
  • Templates and Menus
  • Layout and Style
  • Adding Child Records to Parent Objects
  • Zen Security
  • Desktop (Drag Drop)
  • Localization

3
Templates and MenusCreating a Template Page
  • Define an abstract page class from which all your
    other pages will inherit.
  • Inheritance even for XData blocks
  • Style
  • Contents
  • Modularize your pages by using pane components
    that can be substituted in the child page classes.

4
Templates and MenusZen Menus
ltmenu id"menu2" layout"vertical"gt ltmenuItem
caption"Menu A" link"javascript alert('A')"
/gt ltmenuItem caption"Menu B" link"javascript
alert('B')" /gt ltmenu id"menu2B"
caption"Submenu" layout"vertical"
onactivate"zenPage.activateMenu2B()"gt
ltmenuItem caption"Menu A" link"javascript
alert('A')" id"menu2B_A" /gt ltmenuItem
caption"Menu B" link"javascript alert('B')"
/gt ltmenu id"menu2BB" caption"Sub Submenu"
layout"vertical"gt ltmenuItem caption"Menu A"
link"javascript alert('A')" /gt ltmenuItem
caption"Menu B" link"javascript alert('B')"
/gt ltmenuSeparator /gt ltmenuItem caption"Help
Desk" link"ZENApp.HelpDesk.cls"
/gt lt/menugt lt/menugt ltmenuSeparator /gt ltmenuItem
caption"Test Suite" link"ZENTest.HomePage.cls"
/gt ltmenuItem caption"Home link"ZENDemo.Home.cls
" /gt lt/menugt
  • Example of nested menus

5
Exercise 1 Creating a Template Page
  • In this exercise we will review an existing Zen
    Template, modify it and demonstrate template
    panes and menu capabilities that can be used to
    control the look and feel consistently across Zen
    pages. Refer to the Exercise Guide for notes on
    Exercise 1.

6
Layout and StyleZen Style
  • Each component can define a default style using
    standard CSS style definitions.
  • The style can be overridden on an application,
    component, or page level.
  • Cascading action the styles that are defined
    last take precedence.
  • The Style is defined within an XData block called
    Style using a ltstyle typetext/cssgt and a
    closing lt/stylegt tag.

7
Layout and StyleZen Layout
  • XML block describes the layout of the page
  • Zen will automatically generate the HTML
    necessary to display the page in a browser.
  • Components can be grouped together as child
    components of a container component .
  • Create a template page to provide a consistent
    look and feel throughout your application.

8
Exercise 2 Layout and Style
  • In this exercise we will learn how to apply CSS
    styles to Zen elements. Refer to the Exercise
    Guide for notes on Exercise 2.

9
Adding Child RecordsParent Child Relationships -
background
  • Parent Child Relationships are very common in
    application models
  • They can be implemented in Caché using the
    Relationship property type in a class
  • Two main types that behave differently with
    respect to cascade delete
  • One to Many
  • Parent Child

10
Adding Child RecordsParent Child Relationships
Visualizing in Zen
  • Common display mode is to display the appropriate
    child records as the user changes selection of
    parent
  • Second tablePane for child record
  • onselectrow event on parent tablePane triggers
    appropriate code to show child records
  • Also we often need components and supporting code
    to manage create/update/delete of child records

11
Exercise 3 Adding Child Records to Parent Page
  • In this exercise we will add a Comments section
    to the PrivateHome page. Comments must always
    stay attached to the specific blog entry theyre
    entered into. Refer to the Exercise Guide for
    notes on Exercise 3.

12
Behind the ScenesZen Security
  • Application-level security using a combination of
    Zen forms and system configuration settings
  • Special Zen username and password controls
  • CacheUserName
  • CachePassword
  • Modify Home Security Mangement CSP
    Applications in the System Management Portal

13
Behind the ScenesZen Security
  • Control access to pages using RESOURCE class
    parameter
  • Control access to components using the resource
    server-only property
  • Current user must hold USE privileges on this
    resource or the component will not be displayed
    on the page.

14
Exercise 4 Zen Security
  • In this exercise we will build a login page that
    uses Zens built in username and password
    controls. Refer to the Exercise Guide for notes
    on Exercise 4.

15
DesktopZen Drag Drop Functionality
  • Data Drag Drop
  • Components provide dragEnabled and dropEnabled
    attributes
  • Window Drag Drop
  • Client-side Layout Manager enables ltdragGroupgt
    component
  • Styles for drag-able windows are all customizable

16
Exercise 5 Desktop (Drag Drop)
  • We will now demo some of the upcoming Desktop
    features for you! (This wont work in the
    version of Caché which is installed on the
    laptops.)

17
Behind the ScenesZen Localization
  • Create an inventory of text strings in one
    language, and a convention for translating them
    to other languages
  • DOMAIN class-level parameter determines
    localization dictionary
  • Developers use XML format for creating files of
    original language text and translations
  • At runtime, the application chooses what language
    to use based on browsers native language

18
Behind the ScenesZen Localization
  • Message dictionary is a database of text strings
    organized by Domain Name, Language Name, Message
    ID
  • Text macros automatically create message at
    compile time, generates code that retrieves
    messages at runtime
  • ZENLOCALIZE provides automatic translation,
    otherwise you must call Text yourself.
  • All CSP localization practices apply to Zen
    applications

19
Behind the ScenesZen Localization Message
Dictionary
20
Behind the ScenesZen Localization - Text macro
  • At compile time creates entries in CacheMsg
    global
  • At run-time retrieves values from CacheMsg based
    on
  • DOMAIN parameter value
  • Language setting
  • Default for browser
  • session.Language
  • response.Language
  • ID
  • All ZEN components invoke this macro by default
  • Based on value of ZENLOCALIZE
  • Optional id can be supplied for each entry
    otherwise automatic

21
Exercise 6 Localization
  • In this exercise we will localize a web page so
    it is automatically rendered in different
    languages. Refer to the Exercise Guide for notes
    on Exercise 6.

22
Any Questions?
  • Feel free to contact us!
  • Pat McGibbon
  • pat.mcgibbon_at_intersystems.com
  • Maxim Vershinin
  • max.vershinin_at_intersystems.com

23
Advanced Zen
  • Pat McGibbon, Maxim Vershinin
Write a Comment
User Comments (0)
About PowerShow.com