SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformIntroduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformAlfresco Software
 
ColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introductionColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introductionSaravanaMuthu Jayaraj
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011Bachkoutou Toutou
 
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 DeveloperChandra Patel
 
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 worldColdFusionConference
 
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 ShareAlfresco Software
 
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 ShareAlfresco Software
 
ITB2016 - Building ColdFusion RESTFul Services
ITB2016 - Building ColdFusion RESTFul ServicesITB2016 - Building ColdFusion RESTFul Services
ITB2016 - Building ColdFusion RESTFul ServicesOrtus Solutions, Corp
 
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-CLIDiana Thompson
 
Railswaycon 2009 - Summary
Railswaycon 2009 - SummaryRailswaycon 2009 - Summary
Railswaycon 2009 - Summarydaniel.mattes
 
Unpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc TechnologiesUnpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc TechnologiesEastBanc Tachnologies
 
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 SyncDavid Wang
 
BP-7 Share Customization Best Practices
BP-7 Share Customization Best PracticesBP-7 Share Customization Best Practices
BP-7 Share Customization Best PracticesAlfresco Software
 
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 11ColdFusionConference
 
Integration with Mule
Integration with MuleIntegration with Mule
Integration with MuleRyan Hoegg
 
Bosh Links Visualization
Bosh Links VisualizationBosh Links Visualization
Bosh Links VisualizationSaman Alvi
 

Was ist angesagt? (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
 

Ähnlich wie Cascade

Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.FormsBrad Pillow
 
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 AppsJames Montemagno
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsPablo Godel
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework BasicMario Romano
 
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 AdministrationAlfresco by fme AG
 
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 GutenbergFelix Arntz
 
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 AppFITC
 
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.jsAlex Blom
 
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 EngineYared Ayalew
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails DevsDiacode
 
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 arrivedGil Fink
 
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 devicesWesley Hales
 
The Dojo Build System
The Dojo Build SystemThe Dojo Build System
The Dojo Build Systemklipstein
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Sadaaki HIRAI
 
Maven introduction in Mule
Maven introduction in MuleMaven introduction in Mule
Maven introduction in MuleShahid Shaik
 
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 2009Christopher Judd
 
cdac@parag.gajbhiye@test123
cdac@parag.gajbhiye@test123cdac@parag.gajbhiye@test123
cdac@parag.gajbhiye@test123Parag 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
 

Ähnlich wie 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...
 

Mehr von Howard Lewis Ship

Testing Web Applications with GEB
Testing Web Applications with GEBTesting Web Applications with GEB
Testing Web Applications with GEBHoward Lewis Ship
 
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 TestHoward Lewis Ship
 
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 BrowserHoward Lewis Ship
 
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 BootstrapHoward 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 JavaHoward Lewis Ship
 
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)Howard Lewis Ship
 
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 PerspectiveHoward Lewis Ship
 
Practical Clojure Programming
Practical Clojure ProgrammingPractical Clojure Programming
Practical Clojure ProgrammingHoward Lewis Ship
 
Clojure: Towards The Essence of Programming
Clojure: Towards The Essence of ProgrammingClojure: Towards The Essence of Programming
Clojure: Towards The Essence of ProgrammingHoward Lewis Ship
 
Tapestry 5: Java Power, Scripting Ease
Tapestry 5: Java Power, Scripting EaseTapestry 5: Java Power, Scripting Ease
Tapestry 5: Java Power, Scripting EaseHoward Lewis Ship
 
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 CappuccinoHoward Lewis Ship
 
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)Howard Lewis Ship
 
Tapestry: State of the Union
Tapestry: State of the UnionTapestry: State of the Union
Tapestry: State of the UnionHoward Lewis Ship
 
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)Howard Lewis Ship
 

Mehr von 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)
 

Kürzlich hochgeladen

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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 FresherRemote DBA Services
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 

Kürzlich hochgeladen (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 

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