SlideShare a Scribd company logo
1 of 20
Download to read offline
Cascade
Howard M. Lewis Ship
Director of Open Source Technology, Formos
howard.lewis.ship@formos.com
                                             © 2009 Formos Software Development
What is Cascade?




                   © 2009 Formos Software Development
Cascade Web Framework
• Pure Clojure

• Functional

• Share Nothing

• Action Oriented (not component based)

• Tapestry-style Templates

• Status: alpha, incomplete



                                          © 2009 Formos Software Development
Views and Fragments
 app/views/index.cml

 <html xmlns:c="cascade">
   <body>
     The current time is:
     <c:format-date c:date="(env :current-time)"/>
   </body>
 </html>




                       app/fragments.clj

                       (ns app.fragments
                         (:import (java.util Date)
                                  (java.text DateFormat)))

                       (defn format-date
                         [env params]
                         (let [#^Date date (params :date)
                               #^DateFormat fmt (DateFormat/getDateTimeInstance
                                                  DateFormat/MEDIUM DateFormat/MEDIUM)]
                               (.format fmt date)))




                                                                           © 2009 Formos Software Development
Expansions
app/views/index.cml

<html xmlns:c="cascade">
  <c:loop c:source="(range 5 0 -1)" c:value=":i">
    $(env :i) ...
  </c:loop>
</html>




 Output

<html xmlns:c="cascade">
  5 ... 4 ... 3 ... 2 ... 1 ...
</html>




• In text

• In attribute values


                                                    © 2009 Formos Software Development
Fragments can be Templates

                                            A bit awkward ...

  app/views/index.cml
                                                          1
  <c:layout xmlns:c="cascade" c:title='"Current Date"'>

    The current time is:                            4

    <c:format-date c:date="(env :current-time)"/>

  </c:layout>        6




  fragments/layout.cml

                                      2
  <html xmlns:c="cascade">
    <head>
      <title>$(params :title)</title>
    </head>
    <body>
      <h1>$(params :title)</h1>
                           3
        <c:render-body/>


  </html>      5




                                                                © 2009 Formos Software Development
Actions




          © 2009 Formos Software Development
Actions
• Coming Soon! :-)

• Functional:

  •env in (:request, :response, etc.)

  •result:

     •keyword ➠ render this view

     •URL ➠ send redirect for URL

     •false ➠ didn't handle request after all

     •true ➠ sent response directly

                                                © 2009 Formos Software Development
Actions
• Functions to generate callback URLs

  • To an action

  • To a view

• Pass query parameters

• Extra data in path

• Built-in fragments to generate URLs



                                        © 2009 Formos Software Development
URLs
• Actions

  • /action/name

• Views

  • /name

• Configurable?




                   © 2009 Formos Software Development
What's Missing?




                  © 2009 Formos Software Development
Servlet Integration
• Run Cascade as servlet

• Embedded mode: Start Jetty up with Cascade configured




                                                 © 2009 Formos Software Development
Document Generation
• DOCTYPEs not supported yet

• <![CDATA[]]> not supported yet

• Control: HTML(SGML) vs. XML output

• Filtering characters to entities (i.e., < ➠ &lt;)

• Output namespace support




                                                      © 2009 Formos Software Development
Template Features
• Server-side Comments

• Root <c:fragment> element (for templates that render
  multiple elements)

• Better way to pass literal strings as parameters

• Tapestry-style blocks:

  • Encapsulate a section of template as a closure

  • Pass as parameter to a fragment


                                                     © 2009 Formos Software Development
Unimplemented Ideas
• Parallelization

  • Render fragments in parallel across threads

  • Multiple simultaneous database queries

• Pipelines

  • Declarative command chains around views and actions

• Meta-data

  • Declare pipelines, required parameters, etc.

                                                   © 2009 Formos Software Development
(use 'tapestry)
• Libraries of fragments & views
• JAR-packaged resources
• 1st class exception reporting
• JavaScript aggregation / minimization
• Version asset URLs
• Automatic GZIP compression
• Localization
• Live "class" reloading


                                          © 2009 Formos Software Development
Wrap Up




          © 2009 Formos Software Development
http://github.com/hlship/cascade/tree/master




                                               © 2009 Formos Software Development
http://wiki.github.com/hlship/cascade/




                              © 2009 Formos Software Development
Photo Credits
   © 2008 Danny Barron
   http://www.flickr.com/photos/dbarronoss/2454432792/



   © 2006 Chris Walton
   http://www.flickr.com/photos/philocrites/245011706/




                                                        © 2009 Formos Software Development

More Related Content

What's hot

Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
Bachkoutou Toutou
 
Railswaycon 2009 - Summary
Railswaycon 2009 - SummaryRailswaycon 2009 - Summary
Railswaycon 2009 - Summary
daniel.mattes
 
Developing html5 mobile applications using cold fusion 11
Developing html5 mobile applications using cold fusion 11Developing html5 mobile applications using cold fusion 11
Developing html5 mobile applications using cold fusion 11
ColdFusionConference
 

What's hot (20)

Hidden Gems in ColdFusion 2016
Hidden Gems in ColdFusion 2016Hidden Gems in ColdFusion 2016
Hidden Gems in ColdFusion 2016
 
Introduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformIntroduction to Alfresco Surf Platform
Introduction to Alfresco Surf Platform
 
ColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introductionColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introduction
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
 
Restful API's with ColdFusion
Restful API's with ColdFusionRestful API's with ColdFusion
Restful API's with ColdFusion
 
Merb
MerbMerb
Merb
 
WP-CLI - A Good Friend of Developer
WP-CLI - A Good Friend of DeveloperWP-CLI - A Good Friend of Developer
WP-CLI - A Good Friend of Developer
 
10 Reasons ColdFusion PDFs should rule the world
10 Reasons ColdFusion PDFs should rule the world10 Reasons ColdFusion PDFs should rule the world
10 Reasons ColdFusion PDFs should rule the world
 
CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in Share
 
CUST-10 Customizing the Upload File(s) dialog in Alfresco Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco ShareCUST-10 Customizing the Upload File(s) dialog in Alfresco Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco Share
 
This is how we REST
This is how we RESTThis is how we REST
This is how we REST
 
ITB2016 - Building ColdFusion RESTFul Services
ITB2016 - Building ColdFusion RESTFul ServicesITB2016 - Building ColdFusion RESTFul Services
ITB2016 - Building ColdFusion RESTFul Services
 
Take Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLITake Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLI
 
Railswaycon 2009 - Summary
Railswaycon 2009 - SummaryRailswaycon 2009 - Summary
Railswaycon 2009 - Summary
 
Unpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc TechnologiesUnpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc Technologies
 
Keeping Local, Staging & Production Sites In Sync
Keeping Local, Staging & Production Sites In SyncKeeping Local, Staging & Production Sites In Sync
Keeping Local, Staging & Production Sites In Sync
 
BP-7 Share Customization Best Practices
BP-7 Share Customization Best PracticesBP-7 Share Customization Best Practices
BP-7 Share Customization Best Practices
 
Developing html5 mobile applications using cold fusion 11
Developing html5 mobile applications using cold fusion 11Developing html5 mobile applications using cold fusion 11
Developing html5 mobile applications using cold fusion 11
 
Integration with Mule
Integration with MuleIntegration with Mule
Integration with Mule
 
Bosh Links Visualization
Bosh Links VisualizationBosh Links Visualization
Bosh Links Visualization
 

Similar to Cascade

Web, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js AppWeb, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js App
FITC
 
GDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App EngineGDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App Engine
Yared Ayalew
 
cdac@parag.gajbhiye@test123
cdac@parag.gajbhiye@test123cdac@parag.gajbhiye@test123
cdac@parag.gajbhiye@test123
Parag Gajbhiye
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 

Similar to Cascade (20)

Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.Forms
 
Optimizing and Extending Xamarin.Forms iOS, Android, and UWP Apps
Optimizing and Extending Xamarin.Forms iOS, Android, and UWP AppsOptimizing and Extending Xamarin.Forms iOS, Android, and UWP Apps
Optimizing and Extending Xamarin.Forms iOS, Android, and UWP Apps
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework Basic
 
Javascript Konsole für Entwicklung und Administration
Javascript Konsole für Entwicklung und AdministrationJavascript Konsole für Entwicklung und Administration
Javascript Konsole für Entwicklung und Administration
 
Leveraging the Power of Custom Elements in Gutenberg
Leveraging the Power of Custom Elements in GutenbergLeveraging the Power of Custom Elements in Gutenberg
Leveraging the Power of Custom Elements in Gutenberg
 
Web, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js AppWeb, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js App
 
Web Unleashed Toronto 2015: Hybrid Mobile Apps with Ember.js
Web Unleashed Toronto 2015: Hybrid Mobile Apps with Ember.jsWeb Unleashed Toronto 2015: Hybrid Mobile Apps with Ember.js
Web Unleashed Toronto 2015: Hybrid Mobile Apps with Ember.js
 
GDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App EngineGDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App Engine
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails Devs
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
 
The Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devicesThe Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devices
 
The Dojo Build System
The Dojo Build SystemThe Dojo Build System
The Dojo Build System
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
 
Workshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte IWorkshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte I
 
Maven introduction in Mule
Maven introduction in MuleMaven introduction in Mule
Maven introduction in Mule
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009
 
cdac@parag.gajbhiye@test123
cdac@parag.gajbhiye@test123cdac@parag.gajbhiye@test123
cdac@parag.gajbhiye@test123
 
Camel as a_glue
Camel as a_glueCamel as a_glue
Camel as a_glue
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 

More from Howard Lewis Ship

Have Your Cake and Eat It Too: Meta-Programming Techniques for Java
Have Your Cake and Eat It Too: Meta-Programming Techniques for JavaHave Your Cake and Eat It Too: Meta-Programming Techniques for Java
Have Your Cake and Eat It Too: Meta-Programming Techniques for Java
Howard Lewis Ship
 

More from Howard Lewis Ship (17)

Testing Web Applications with GEB
Testing Web Applications with GEBTesting Web Applications with GEB
Testing Web Applications with GEB
 
Spock: A Highly Logical Way To Test
Spock: A Highly Logical Way To TestSpock: A Highly Logical Way To Test
Spock: A Highly Logical Way To Test
 
Backbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The BrowserBackbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The Browser
 
Modern Application Foundations: Underscore and Twitter Bootstrap
Modern Application Foundations: Underscore and Twitter BootstrapModern Application Foundations: Underscore and Twitter Bootstrap
Modern Application Foundations: Underscore and Twitter Bootstrap
 
Have Your Cake and Eat It Too: Meta-Programming Techniques for Java
Have Your Cake and Eat It Too: Meta-Programming Techniques for JavaHave Your Cake and Eat It Too: Meta-Programming Techniques for Java
Have Your Cake and Eat It Too: Meta-Programming Techniques for Java
 
Clojure: Towards The Essence Of Programming (What's Next? Conference, May 2011)
Clojure: Towards The Essence Of Programming (What's Next? Conference, May 2011)Clojure: Towards The Essence Of Programming (What's Next? Conference, May 2011)
Clojure: Towards The Essence Of Programming (What's Next? Conference, May 2011)
 
Arduino: Open Source Hardware Hacking from the Software Nerd Perspective
Arduino: Open Source Hardware Hacking from the Software Nerd PerspectiveArduino: Open Source Hardware Hacking from the Software Nerd Perspective
Arduino: Open Source Hardware Hacking from the Software Nerd Perspective
 
Practical Clojure Programming
Practical Clojure ProgrammingPractical Clojure Programming
Practical Clojure Programming
 
Clojure: Towards The Essence of Programming
Clojure: Towards The Essence of ProgrammingClojure: Towards The Essence of Programming
Clojure: Towards The Essence of Programming
 
Codemash-Clojure.pdf
Codemash-Clojure.pdfCodemash-Clojure.pdf
Codemash-Clojure.pdf
 
Codemash-Tapestry.pdf
Codemash-Tapestry.pdfCodemash-Tapestry.pdf
Codemash-Tapestry.pdf
 
Tapestry 5: Java Power, Scripting Ease
Tapestry 5: Java Power, Scripting EaseTapestry 5: Java Power, Scripting Ease
Tapestry 5: Java Power, Scripting Ease
 
Brew up a Rich Web Application with Cappuccino
Brew up a Rich Web Application with CappuccinoBrew up a Rich Web Application with Cappuccino
Brew up a Rich Web Application with Cappuccino
 
Clojure Deep Dive
Clojure Deep DiveClojure Deep Dive
Clojure Deep Dive
 
Clojure: Functional Concurrency for the JVM (presented at OSCON)
Clojure: Functional Concurrency for the JVM (presented at OSCON)Clojure: Functional Concurrency for the JVM (presented at OSCON)
Clojure: Functional Concurrency for the JVM (presented at OSCON)
 
Tapestry: State of the Union
Tapestry: State of the UnionTapestry: State of the Union
Tapestry: State of the Union
 
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
 

Recently uploaded

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
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

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
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
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
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
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
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Cascade

  • 1. Cascade Howard M. Lewis Ship Director of Open Source Technology, Formos howard.lewis.ship@formos.com © 2009 Formos Software Development
  • 2. What is Cascade? © 2009 Formos Software Development
  • 3. Cascade Web Framework • Pure Clojure • Functional • Share Nothing • Action Oriented (not component based) • Tapestry-style Templates • Status: alpha, incomplete © 2009 Formos Software Development
  • 4. Views and Fragments app/views/index.cml <html xmlns:c="cascade"> <body> The current time is: <c:format-date c:date="(env :current-time)"/> </body> </html> app/fragments.clj (ns app.fragments (:import (java.util Date) (java.text DateFormat))) (defn format-date [env params] (let [#^Date date (params :date) #^DateFormat fmt (DateFormat/getDateTimeInstance DateFormat/MEDIUM DateFormat/MEDIUM)] (.format fmt date))) © 2009 Formos Software Development
  • 5. Expansions app/views/index.cml <html xmlns:c="cascade"> <c:loop c:source="(range 5 0 -1)" c:value=":i"> $(env :i) ... </c:loop> </html> Output <html xmlns:c="cascade"> 5 ... 4 ... 3 ... 2 ... 1 ... </html> • In text • In attribute values © 2009 Formos Software Development
  • 6. Fragments can be Templates A bit awkward ... app/views/index.cml 1 <c:layout xmlns:c="cascade" c:title='"Current Date"'> The current time is: 4 <c:format-date c:date="(env :current-time)"/> </c:layout> 6 fragments/layout.cml 2 <html xmlns:c="cascade"> <head> <title>$(params :title)</title> </head> <body> <h1>$(params :title)</h1> 3 <c:render-body/> </html> 5 © 2009 Formos Software Development
  • 7. Actions © 2009 Formos Software Development
  • 8. Actions • Coming Soon! :-) • Functional: •env in (:request, :response, etc.) •result: •keyword ➠ render this view •URL ➠ send redirect for URL •false ➠ didn't handle request after all •true ➠ sent response directly © 2009 Formos Software Development
  • 9. Actions • Functions to generate callback URLs • To an action • To a view • Pass query parameters • Extra data in path • Built-in fragments to generate URLs © 2009 Formos Software Development
  • 10. URLs • Actions • /action/name • Views • /name • Configurable? © 2009 Formos Software Development
  • 11. What's Missing? © 2009 Formos Software Development
  • 12. Servlet Integration • Run Cascade as servlet • Embedded mode: Start Jetty up with Cascade configured © 2009 Formos Software Development
  • 13. Document Generation • DOCTYPEs not supported yet • <![CDATA[]]> not supported yet • Control: HTML(SGML) vs. XML output • Filtering characters to entities (i.e., < ➠ &lt;) • Output namespace support © 2009 Formos Software Development
  • 14. Template Features • Server-side Comments • Root <c:fragment> element (for templates that render multiple elements) • Better way to pass literal strings as parameters • Tapestry-style blocks: • Encapsulate a section of template as a closure • Pass as parameter to a fragment © 2009 Formos Software Development
  • 15. Unimplemented Ideas • Parallelization • Render fragments in parallel across threads • Multiple simultaneous database queries • Pipelines • Declarative command chains around views and actions • Meta-data • Declare pipelines, required parameters, etc. © 2009 Formos Software Development
  • 16. (use 'tapestry) • Libraries of fragments & views • JAR-packaged resources • 1st class exception reporting • JavaScript aggregation / minimization • Version asset URLs • Automatic GZIP compression • Localization • Live "class" reloading © 2009 Formos Software Development
  • 17. Wrap Up © 2009 Formos Software Development
  • 18. http://github.com/hlship/cascade/tree/master © 2009 Formos Software Development
  • 19. http://wiki.github.com/hlship/cascade/ © 2009 Formos Software Development
  • 20. Photo Credits © 2008 Danny Barron http://www.flickr.com/photos/dbarronoss/2454432792/ © 2006 Chris Walton http://www.flickr.com/photos/philocrites/245011706/ © 2009 Formos Software Development