SlideShare ist ein Scribd-Unternehmen logo
1 von 67
Downloaden Sie, um offline zu lesen
DirectToWeb 2.0
     Ravi Mendis
Why
Web 2.0?
Problem
•   Fragile

    •   Large EOModel

    •   ~10^3 Rules

    •   ~10^2 Page Configs

    •   ~10^2 Custom Components
Solution
•   Tests

    •   Selenium Support

•   Consolidate Codebase

    •   Custom Components

    •   Rules
Objectives
Objectives
•   Hooks

    •   Selenium

    •   Ajax

•   Themed UI
How?
DirectToWeb 2.0

•   Semantic HTML

    •   Table-less

    •   Well-formed

        •   xHTML5 Validated

•   CSS3
DirectToWeb 2.0
•   Semantic HTML

•   CSS3

•   Ajax

    •   Dynamic D2W

•   Scriptaculous

•   Selenium
Semantic HTML
Semantic HTML
Semantic HTML - Example
Semantic HTML - Example
// Look Ma - No tables!
<h2>Menu</h2>
<ul>
	     <li class="home">
	     	     <a class="current" href="/cgi-bin/WebObjects/slowmation.woa/wa/default">Home</a>
	     </li>
	     <li class="public">
	     	     <a href="/cgi-bin/WebObjects/slowmation.woa/wa/galleryPage">Example slowmations</a>
	     </li>
	     <li class="resources">
	     	     <a href="/cgi-bin/WebObjects/slowmation.woa/wa/resourcesPage">Teaching resources</a>
	     </li>
	     <li class="software">
	     	     <a href="/cgi-bin/WebObjects/slowmation.woa/wa/softwarePage">Useful software</a>
	     </li>
	     <li class="instructions">
	     	     <a href="/cgi-bin/WebObjects/slowmation.woa/wa/instructionsPage">Instructions</a>
	     </li>
	     <li class="publications">
	     	     <a href="/cgi-bin/WebObjects/slowmation.woa/wa/researchPage">Research</a>
	     </li>
	     <li class="contact">
	     	     <a href="/cgi-bin/WebObjects/slowmation.woa/wa/contactsPage">Contact</a>
	     </li>
</ul>
Semantic HTML
•   No Tables!
    ...only for Tabular Data

•   Use:

    •   <div>, <span>

    •   Lists: <ul>, <ol>

    •   Text: <p>

•   No Images
CSS3
•   ALL Layout

    •   Positions & Margins

    •   Columns

•   Colours & Fonts

•   Images

•   2D Effects
Well Formed
Well-Formed HTML
// Closed Elements.
// E.g:
<div>...</div>

<br />

// proper nesting
<ul>
   <li>...</li>
</ul>
Well-Formed HTML
// Unique IDs
<div id=”a”>Hey, i’m unique...</div>
Validate
WO - elementID
<form name="f_1_1" method="post" action="/cgi-bin/WebObjects/MyApp.woa/wo/vrsdatqeeGoxo1tAggnGoM/0.1.1">
      <div>Username: <input type="text" name="1.1.1" /> </div>
      <div>Password: <input type="password" name="1.1.3" /> </div>
      <div><input title="Login" name="1.1.4" type="submit" /></div>
</form>
Default Assignments
•   PageConfig → UID

    •   <entity, task>

•   D2W Context → UID

    •   <entity, task, key>
Default Assignments
•   idForPageConfiguration

•   idForProperty

•   nameForProperty (Forms)
Default Assignments
•   Hooks

    •   CSS3

    •   Ajax

    •   Selenium
D2W + Semantic HTML
=
CSS3 - Customizations


•   Title

•   Buttons
CSS3 - Pseudo-Classes
div#a h2.entity:after {
	    content: " Management";
}
CSS3 - Pseudo-Classes
// Back
div#a ul.batch_nav_bar li.back a.return span:before {
	    content: "< ";
}

// Add
div#a #ListActivityType ul.batch_nav_bar li.add a:after {
	    content: " a New Activity";
}
CSS3 - Web Inspector
Custom UI
Rules + CSS

•   ERD2WDisplayString

•   D2W Delayed Assignment

    •   Key “class”

•   CSS

    •   Image Replacement
D2W Rules
CSS - Image Replacement
/* D2WDisplayBoolean2.css */

span.true, span.false {
    text-indent: -5000px;
    display: block;
    width: 16px;
    height: 16px;
}

span.true {
    background: url(/WebObjects/Frameworks/JavaDirectToWeb.framework/WebServerResources/CheckboxOn.gif);
}

span.false {
    background: url(/WebObjects/Frameworks/JavaDirectToWeb.framework/WebServerResources/CheckboxOff.gif);
}
Ajax
Ajax




Rich Client
                     Stateless Services:
                            XML,
                            JSON

                     Stateless Servers:
http://




Thin-client
                        Stateful Servers:

                             WebObjects
Demo
Ajax




  .show()
                  .toggle()
   .hide()

Element.show
               Element.toggle
Element.hide
Embrace Statelessness!
Ajax Actions




 jQuery.get()
                 .load()
jQuery.post()

Ajax.Request
                .update()
Ajax.Updater
Ajax Actions
Web Page




             Page Fragment
Web Actions
Web Page




            Web Page
Web State




            WebObjects
Ajax State




             WebObjects
No Backtrack Too Far!
Dynamic D2W
Demo
Dynamic D2W

•   NO Custom Components!

•   Embedded List

•   Ajax

•   Delayed Assignment
Dynamic D2W - Rules
Dynamic D2W - Example


•   restrictedChoiceKey

•   Ajax updater
Scriptaculous
Effect - Toggle


•   Effect.toggle

    •   ID

    •   slide
Effect - Toggle
// WOD

CollapseLink: WOHyperlink {
	    href = "#";
	    onclick = onClick;
}
Effect - Toggle
// Java - detail toggle
public String onClick() {
    return "Effect.toggle($('" + tbodyID() + "'), 'slide', {duration: 0.8}); return false;";   // tbodyID = Customer2_detail
}
Effect - Toggle
// HTML
<tr class = "detail">
    <td class = "detail">
        <div id = "Customer2_detail">
            <div>....</div>                           // Second div nesting necessary for scriptaculous
        </div>
    </td>
</tr>
Selenium
XPath
/* Save button */
//button[@class='save ERXSubmitButton-submitAction']

/* Password field */
//div[@id='Student_edit_password_container']/input

/* Error message */
//div[@id='messages']/span[@class='error']
Demo
Q: How Do I Modernize My D2W
         Application?
lite
Diva
Migration - Phase #1
•   HTML5 & CSS3

    •   Strip Tables

    •   Themes

•   Selenium Tests
Migration - Phase #2
•   Ajax

    •   Widgets

    •   Effects

•   Selenium Tests (Update)
Migrating to DirectToWeb 2.0


            Page                  Custom
                        Rules
        Configurations           Components


            34          126         2

            40          183         4

            67          180         0
Q&A
References

•   Semantic HTML
    http://en.wikipedia.org/wiki/Semantic_HTML

•   What is Diva Look?
    http://wiki.objectstyle.org/confluence/display/WO/ERDivaLook

•   Podcast - Test Driven Development with WebObjects
    http://www.wocommunity.org/podcasts/WOWODCW09-TDD.mov

Weitere ähnliche Inhalte

Was ist angesagt?

How I Learned to Stop Worrying and Love jQuery (Jan 2013)
How I Learned to Stop Worrying and Love jQuery (Jan 2013)How I Learned to Stop Worrying and Love jQuery (Jan 2013)
How I Learned to Stop Worrying and Love jQuery (Jan 2013)
David Giard
 
Unobtrusive javascript with jQuery
Unobtrusive javascript with jQueryUnobtrusive javascript with jQuery
Unobtrusive javascript with jQuery
Angel Ruiz
 

Was ist angesagt? (19)

MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!
 
WebApps e Frameworks Javascript
WebApps e Frameworks JavascriptWebApps e Frameworks Javascript
WebApps e Frameworks Javascript
 
How I Learned to Stop Worrying and Love jQuery (Jan 2013)
How I Learned to Stop Worrying and Love jQuery (Jan 2013)How I Learned to Stop Worrying and Love jQuery (Jan 2013)
How I Learned to Stop Worrying and Love jQuery (Jan 2013)
 
Getting started with jQuery
Getting started with jQueryGetting started with jQuery
Getting started with jQuery
 
Styling components with JavaScript
Styling components with JavaScriptStyling components with JavaScript
Styling components with JavaScript
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
22 j query1
22 j query122 j query1
22 j query1
 
Contextual jQuery
Contextual jQueryContextual jQuery
Contextual jQuery
 
JQuery
JQueryJQuery
JQuery
 
SharePointfest Denver - A jQuery Primer for SharePoint
SharePointfest Denver -  A jQuery Primer for SharePointSharePointfest Denver -  A jQuery Primer for SharePoint
SharePointfest Denver - A jQuery Primer for SharePoint
 
Harness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkHarness jQuery Templates and Data Link
Harness jQuery Templates and Data Link
 
Handlebars and Require.js
Handlebars and Require.jsHandlebars and Require.js
Handlebars and Require.js
 
Web Components + Backbone: a Game-Changing Combination
Web Components + Backbone: a Game-Changing CombinationWeb Components + Backbone: a Game-Changing Combination
Web Components + Backbone: a Game-Changing Combination
 
Unobtrusive javascript with jQuery
Unobtrusive javascript with jQueryUnobtrusive javascript with jQuery
Unobtrusive javascript with jQuery
 
Js Saturday 2013 your jQuery could perform better
Js Saturday 2013 your jQuery could perform betterJs Saturday 2013 your jQuery could perform better
Js Saturday 2013 your jQuery could perform better
 
J query
J queryJ query
J query
 
SPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuideSPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuide
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
The Complementarity of React and Web Components
The Complementarity of React and Web ComponentsThe Complementarity of React and Web Components
The Complementarity of React and Web Components
 

Ähnlich wie DirectToWeb 2.0

SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014
Mark Rackley
 
建立前端開發團隊 - 2011 中華電信訓練所版
建立前端開發團隊 - 2011 中華電信訓練所版建立前端開發團隊 - 2011 中華電信訓練所版
建立前端開發團隊 - 2011 中華電信訓練所版
Joseph Chiang
 
Soa development using javascript
Soa development using javascriptSoa development using javascript
Soa development using javascript
DsixE Inc
 
An Introduction to Tornado
An Introduction to TornadoAn Introduction to Tornado
An Introduction to Tornado
Gavin Roy
 
D2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRollerD2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRoller
WO Community
 

Ähnlich wie DirectToWeb 2.0 (20)

Web Components v1
Web Components v1Web Components v1
Web Components v1
 
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationLotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
 
CUST-1 Share Document Library Extension Points
CUST-1 Share Document Library Extension PointsCUST-1 Share Document Library Extension Points
CUST-1 Share Document Library Extension Points
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
 
Enough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas ZakasEnough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas Zakas
 
SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014
 
HTML5 Hacking - Yahoo! Open Hack Day
HTML5 Hacking - Yahoo! Open Hack DayHTML5 Hacking - Yahoo! Open Hack Day
HTML5 Hacking - Yahoo! Open Hack Day
 
Jquery fundamentals
Jquery fundamentalsJquery fundamentals
Jquery fundamentals
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
 
建立前端開發團隊 - 2011 中華電信訓練所版
建立前端開發團隊 - 2011 中華電信訓練所版建立前端開發團隊 - 2011 中華電信訓練所版
建立前端開發團隊 - 2011 中華電信訓練所版
 
J query module1
J query module1J query module1
J query module1
 
Enough with the JavaScript already!
Enough with the JavaScript already!Enough with the JavaScript already!
Enough with the JavaScript already!
 
J query
J queryJ query
J query
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
Soa development using javascript
Soa development using javascriptSoa development using javascript
Soa development using javascript
 
An Introduction to Tornado
An Introduction to TornadoAn Introduction to Tornado
An Introduction to Tornado
 
Semantic UI Introduction
Semantic UI IntroductionSemantic UI Introduction
Semantic UI Introduction
 
Awesome html with ujs, jQuery and coffeescript
Awesome html with ujs, jQuery and coffeescriptAwesome html with ujs, jQuery and coffeescript
Awesome html with ujs, jQuery and coffeescript
 
HTML5: Introduction
HTML5: IntroductionHTML5: Introduction
HTML5: Introduction
 
D2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRollerD2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRoller
 

Mehr von WO Community

In memory OLAP engine
In memory OLAP engineIn memory OLAP engine
In memory OLAP engine
WO Community
 
Using Nagios to monitor your WO systems
Using Nagios to monitor your WO systemsUsing Nagios to monitor your WO systems
Using Nagios to monitor your WO systems
WO Community
 
Build and deployment
Build and deploymentBuild and deployment
Build and deployment
WO Community
 
Chaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real WorldChaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real World
WO Community
 
D2W Stateful Controllers
D2W Stateful ControllersD2W Stateful Controllers
D2W Stateful Controllers
WO Community
 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on Windows
WO Community
 
Unit Testing with WOUnit
Unit Testing with WOUnitUnit Testing with WOUnit
Unit Testing with WOUnit
WO Community
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
WO Community
 
Advanced Apache Cayenne
Advanced Apache CayenneAdvanced Apache Cayenne
Advanced Apache Cayenne
WO Community
 
Migrating existing Projects to Wonder
Migrating existing Projects to WonderMigrating existing Projects to Wonder
Migrating existing Projects to Wonder
WO Community
 
iOS for ERREST - alternative version
iOS for ERREST - alternative versioniOS for ERREST - alternative version
iOS for ERREST - alternative version
WO Community
 
"Framework Principal" pattern
"Framework Principal" pattern"Framework Principal" pattern
"Framework Principal" pattern
WO Community
 
Filtering data with D2W
Filtering data with D2W Filtering data with D2W
Filtering data with D2W
WO Community
 
Localizing your apps for multibyte languages
Localizing your apps for multibyte languagesLocalizing your apps for multibyte languages
Localizing your apps for multibyte languages
WO Community
 

Mehr von WO Community (20)

KAAccessControl
KAAccessControlKAAccessControl
KAAccessControl
 
In memory OLAP engine
In memory OLAP engineIn memory OLAP engine
In memory OLAP engine
 
Using Nagios to monitor your WO systems
Using Nagios to monitor your WO systemsUsing Nagios to monitor your WO systems
Using Nagios to monitor your WO systems
 
Build and deployment
Build and deploymentBuild and deployment
Build and deployment
 
High availability
High availabilityHigh availability
High availability
 
Reenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWSReenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWS
 
Chaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real WorldChaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real World
 
D2W Stateful Controllers
D2W Stateful ControllersD2W Stateful Controllers
D2W Stateful Controllers
 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on Windows
 
Unit Testing with WOUnit
Unit Testing with WOUnitUnit Testing with WOUnit
Unit Testing with WOUnit
 
Life outside WO
Life outside WOLife outside WO
Life outside WO
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
 
Advanced Apache Cayenne
Advanced Apache CayenneAdvanced Apache Cayenne
Advanced Apache Cayenne
 
Migrating existing Projects to Wonder
Migrating existing Projects to WonderMigrating existing Projects to Wonder
Migrating existing Projects to Wonder
 
iOS for ERREST - alternative version
iOS for ERREST - alternative versioniOS for ERREST - alternative version
iOS for ERREST - alternative version
 
iOS for ERREST
iOS for ERRESTiOS for ERREST
iOS for ERREST
 
"Framework Principal" pattern
"Framework Principal" pattern"Framework Principal" pattern
"Framework Principal" pattern
 
Filtering data with D2W
Filtering data with D2W Filtering data with D2W
Filtering data with D2W
 
WOver
WOverWOver
WOver
 
Localizing your apps for multibyte languages
Localizing your apps for multibyte languagesLocalizing your apps for multibyte languages
Localizing your apps for multibyte languages
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

DirectToWeb 2.0

  • 1. DirectToWeb 2.0 Ravi Mendis
  • 3.
  • 4. Problem • Fragile • Large EOModel • ~10^3 Rules • ~10^2 Page Configs • ~10^2 Custom Components
  • 5. Solution • Tests • Selenium Support • Consolidate Codebase • Custom Components • Rules
  • 7. Objectives • Hooks • Selenium • Ajax • Themed UI
  • 9. DirectToWeb 2.0 • Semantic HTML • Table-less • Well-formed • xHTML5 Validated • CSS3
  • 10. DirectToWeb 2.0 • Semantic HTML • CSS3 • Ajax • Dynamic D2W • Scriptaculous • Selenium
  • 13. Semantic HTML - Example
  • 14. Semantic HTML - Example // Look Ma - No tables! <h2>Menu</h2> <ul> <li class="home"> <a class="current" href="/cgi-bin/WebObjects/slowmation.woa/wa/default">Home</a> </li> <li class="public"> <a href="/cgi-bin/WebObjects/slowmation.woa/wa/galleryPage">Example slowmations</a> </li> <li class="resources"> <a href="/cgi-bin/WebObjects/slowmation.woa/wa/resourcesPage">Teaching resources</a> </li> <li class="software"> <a href="/cgi-bin/WebObjects/slowmation.woa/wa/softwarePage">Useful software</a> </li> <li class="instructions"> <a href="/cgi-bin/WebObjects/slowmation.woa/wa/instructionsPage">Instructions</a> </li> <li class="publications"> <a href="/cgi-bin/WebObjects/slowmation.woa/wa/researchPage">Research</a> </li> <li class="contact"> <a href="/cgi-bin/WebObjects/slowmation.woa/wa/contactsPage">Contact</a> </li> </ul>
  • 15. Semantic HTML • No Tables! ...only for Tabular Data • Use: • <div>, <span> • Lists: <ul>, <ol> • Text: <p> • No Images
  • 16. CSS3 • ALL Layout • Positions & Margins • Columns • Colours & Fonts • Images • 2D Effects
  • 18. Well-Formed HTML // Closed Elements. // E.g: <div>...</div> <br /> // proper nesting <ul> <li>...</li> </ul>
  • 19. Well-Formed HTML // Unique IDs <div id=”a”>Hey, i’m unique...</div>
  • 21. WO - elementID <form name="f_1_1" method="post" action="/cgi-bin/WebObjects/MyApp.woa/wo/vrsdatqeeGoxo1tAggnGoM/0.1.1"> <div>Username: <input type="text" name="1.1.1" /> </div> <div>Password: <input type="password" name="1.1.3" /> </div> <div><input title="Login" name="1.1.4" type="submit" /></div> </form>
  • 22. Default Assignments • PageConfig → UID • <entity, task> • D2W Context → UID • <entity, task, key>
  • 23. Default Assignments • idForPageConfiguration • idForProperty • nameForProperty (Forms)
  • 24. Default Assignments • Hooks • CSS3 • Ajax • Selenium
  • 26. =
  • 27.
  • 28. CSS3 - Customizations • Title • Buttons
  • 29. CSS3 - Pseudo-Classes div#a h2.entity:after { content: " Management"; }
  • 30. CSS3 - Pseudo-Classes // Back div#a ul.batch_nav_bar li.back a.return span:before { content: "< "; } // Add div#a #ListActivityType ul.batch_nav_bar li.add a:after { content: " a New Activity"; }
  • 31. CSS3 - Web Inspector
  • 33. Rules + CSS • ERD2WDisplayString • D2W Delayed Assignment • Key “class” • CSS • Image Replacement
  • 35. CSS - Image Replacement /* D2WDisplayBoolean2.css */ span.true, span.false { text-indent: -5000px; display: block; width: 16px; height: 16px; } span.true { background: url(/WebObjects/Frameworks/JavaDirectToWeb.framework/WebServerResources/CheckboxOn.gif); } span.false { background: url(/WebObjects/Frameworks/JavaDirectToWeb.framework/WebServerResources/CheckboxOff.gif); }
  • 36. Ajax
  • 37. Ajax Rich Client Stateless Services: XML, JSON Stateless Servers:
  • 38. http:// Thin-client Stateful Servers: WebObjects
  • 39. Demo
  • 40. Ajax .show() .toggle() .hide() Element.show Element.toggle Element.hide
  • 42. Ajax Actions jQuery.get() .load() jQuery.post() Ajax.Request .update() Ajax.Updater
  • 43. Ajax Actions Web Page Page Fragment
  • 45. Web State WebObjects
  • 46. Ajax State WebObjects
  • 49. Demo
  • 50. Dynamic D2W • NO Custom Components! • Embedded List • Ajax • Delayed Assignment
  • 51. Dynamic D2W - Rules
  • 52. Dynamic D2W - Example • restrictedChoiceKey • Ajax updater
  • 54. Effect - Toggle • Effect.toggle • ID • slide
  • 55. Effect - Toggle // WOD CollapseLink: WOHyperlink { href = "#"; onclick = onClick; }
  • 56. Effect - Toggle // Java - detail toggle public String onClick() { return "Effect.toggle($('" + tbodyID() + "'), 'slide', {duration: 0.8}); return false;"; // tbodyID = Customer2_detail }
  • 57. Effect - Toggle // HTML <tr class = "detail"> <td class = "detail"> <div id = "Customer2_detail"> <div>....</div> // Second div nesting necessary for scriptaculous </div> </td> </tr>
  • 59. XPath /* Save button */ //button[@class='save ERXSubmitButton-submitAction'] /* Password field */ //div[@id='Student_edit_password_container']/input /* Error message */ //div[@id='messages']/span[@class='error']
  • 60. Demo
  • 61. Q: How Do I Modernize My D2W Application?
  • 63. Migration - Phase #1 • HTML5 & CSS3 • Strip Tables • Themes • Selenium Tests
  • 64. Migration - Phase #2 • Ajax • Widgets • Effects • Selenium Tests (Update)
  • 65. Migrating to DirectToWeb 2.0 Page Custom Rules Configurations Components 34 126 2 40 183 4 67 180 0
  • 66. Q&A
  • 67. References • Semantic HTML http://en.wikipedia.org/wiki/Semantic_HTML • What is Diva Look? http://wiki.objectstyle.org/confluence/display/WO/ERDivaLook • Podcast - Test Driven Development with WebObjects http://www.wocommunity.org/podcasts/WOWODCW09-TDD.mov