SlideShare a Scribd company logo
ClojureScript Ilegra – LDC By Jackson dos Santos - @cyber_jso
What is It? A  Clojure API that allow us generate Javascript code from clojure code.
How it Works? Download API git clone git://github.com/clojure/clojurescript.git cd clojurescript ./script/bootstraP (ns hello) (defn ^:export greet [n] (str "Hello " n)) Do some Clojure Code ./bin/cljsc samples/ldc/src/hello-ldc/hello-ldc.cljs  > hello.js Compilie IT
How it Works? Download API git clone git://github.com/clojure/clojurescript.git cd clojurescript ./script/bootstraP (ns hello) (defn ^:export greet [n] (str "Hello " n)) Do some Clojure Code ./bin/cljsc samples/ldc/src/hello-ldc/hello-ldc.cljs  > hello.js Compilie IT
More About Compilation Phase In order Clojurescript transforms clojure code in JS code. Google closure does It provides dependency management Minification Javascript code. Reduce the code size as small it can Kill dead code
Some Examples core.cljs (ns hello.core (:require [hello.foo.bar :as bar])) (defn ^{:export greet} greet [n] (str "Hello " n)) (defn ^:export sum [xs] (bar/sum xs))
Some Examples foo.cljs (ns hello.foo.bar) (defn sum [xs] (reduce + 0 xs))
Some Examples Compile your code: ./bin/cljsc samples/hello/ > samples/hello/hello.js Or use the optimized format  ./bin/cljsc samples/hello/ '{:optimizations :advanced}' > samples/hello/hello.js
Some Examples Setup your view: <html> <head> <title>Hello ClojureScript</title> </head> <body> <h1>Hello ClojureScript!</h1> <script type=&quot;text/javascript&quot; src=&quot;hello.js&quot;></script> <script> alert(greet(&quot;Everybody know that Jeff is a gay Fish&quot;)); alert(&quot;The sum of [1,2,3,4,5,6,7,8,9] is: &quot; + hello.core.sum([1,2,3,4,5,6,7,8,9])); </script> </body> </html>
And Then...
The generated JS Code The optimized format
The Generated JS Code The unoptimized format
More Examples Calling an external JS library Clojure-side.cljls (ns hello.extern-example) (defn ^:export foo [] 42) (external.lib/send_alert &quot;ClojureScript calling a function defined in an externed JavaScript library&quot;)
More Examples Calling an external JS library Library.js external = {}; external.lib = { send_alert : function (msg) { alert(&quot;Sending Alert via &quot; + msg + &quot;!&quot;); } };
More Examples Calling an external JS library View.html <html> <head> <title>Hello Externed JavaScript Library</title>  </head> <body> <script type=&quot;text/javascript&quot; src=&quot;out/goog/base.js&quot;></script> <script type=&quot;text/javascript&quot; src=&quot;library.js&quot;></script> <script type=&quot;text/javascript&quot; src=&quot;hello-extern.js&quot;></script> <script> goog.require('hello.extern_example'); </script>
What Can I Do With Clojurescript? An application that has dependency to others name spaces. Use clojure data structures Integrate it with Nodejs Use the DOM (event handling, build components)
What Can't i Do With Clojurescript? Clojure transactions feature Agents, Atoms Protocol handling
What Are the Benefits In Use It? Mix the JS flexibility with the Clojure power Target the web like application plataform Build complex client web applications
Witch Kind Of Problems Can I've For Starting With It? The application can get complex to test It's alpha Integrate it with JQUERY and others JS libraries. Problems to build the compiled JS Code (Setup your $CLOJURESCRIPT_HOME! Read the all documentation before starting)

More Related Content

PPT
Ggug spock
PDF
Typescript is the best by Maxim Kryuk
PDF
Typescript is the best
PDF
Justjava 2007 Arquitetura Java EE Paulo Silveira, Phillip Calçado
PDF
Discovering functional treasure in idiomatic Groovy
PPT
Javaone2008 Bof 5101 Groovytesting
PPT
Javaone2008 Bof 5102 Groovybuilders
PDF
Designing with Groovy Traits - Gr8Conf India
Ggug spock
Typescript is the best by Maxim Kryuk
Typescript is the best
Justjava 2007 Arquitetura Java EE Paulo Silveira, Phillip Calçado
Discovering functional treasure in idiomatic Groovy
Javaone2008 Bof 5101 Groovytesting
Javaone2008 Bof 5102 Groovybuilders
Designing with Groovy Traits - Gr8Conf India

What's hot (20)

ODP
AST Transformations at JFokus
PDF
ClojureScript: The Good Parts
PPTX
Building native Android applications with Mirah and Pindah
PPTX
Why TypeScript?
PDF
ConFess Vienna 2015 - Metaprogramming with Groovy
PPTX
Introduction to kotlin and OOP in Kotlin
KEY
Mirah Talk for Boulder Ruby Group
PDF
All things that are not code
ZIP
Lisp Macros in 20 Minutes (Featuring Clojure)
ODP
AST Transformations
PPT
Groovy for Java Developers
ODP
Ast transformations
PDF
(ThoughtWorks Away Day 2009) one or two things you may not know about typesys...
PDF
Groovy for java developers
PDF
re-frame à la spec
PDF
Practical REPL-driven Development with Clojure
PDF
Introduction to clojure
PDF
On Web Browsers
ODP
Groovy Ast Transformations (greach)
PPT
GTAC Boosting your Testing Productivity with Groovy
AST Transformations at JFokus
ClojureScript: The Good Parts
Building native Android applications with Mirah and Pindah
Why TypeScript?
ConFess Vienna 2015 - Metaprogramming with Groovy
Introduction to kotlin and OOP in Kotlin
Mirah Talk for Boulder Ruby Group
All things that are not code
Lisp Macros in 20 Minutes (Featuring Clojure)
AST Transformations
Groovy for Java Developers
Ast transformations
(ThoughtWorks Away Day 2009) one or two things you may not know about typesys...
Groovy for java developers
re-frame à la spec
Practical REPL-driven Development with Clojure
Introduction to clojure
On Web Browsers
Groovy Ast Transformations (greach)
GTAC Boosting your Testing Productivity with Groovy
Ad

Viewers also liked (8)

PDF
Clojure functions midje
PPSX
Jboss AS7 New Main Features
PDF
Introduction to HashiCorp Consul
Ad

Similar to Presentation about ClosureScript fraemework (20)

PPT
GWT Extreme!
PPT
Eugene Andruszczenko: jQuery
PPT
jQuery Presentation - Refresh Events
PPT
Think jQuery
PDF
Living With Legacy Code
PPT
Demystifying Maven
PPTX
Wt unit 5
PPT
Introduction To Groovy 2005
PDF
Using Dojo
PPT
A Life of breakpoint
PPTX
Speed up your developments with Symfony2
KEY
Mojolicious - A new hope
PPT
my test
ODP
ActiveWeb: Chicago Java User Group Presentation
PPTX
High Performance JavaScript (CapitolJS 2011)
PPT
jQuery Fundamentals
PPT
Even Faster Web Sites at The Ajax Experience
PPT
Effecient javascript
PPT
Teflon - Anti Stick for the browser attack surface
ODP
Extjs Howto
GWT Extreme!
Eugene Andruszczenko: jQuery
jQuery Presentation - Refresh Events
Think jQuery
Living With Legacy Code
Demystifying Maven
Wt unit 5
Introduction To Groovy 2005
Using Dojo
A Life of breakpoint
Speed up your developments with Symfony2
Mojolicious - A new hope
my test
ActiveWeb: Chicago Java User Group Presentation
High Performance JavaScript (CapitolJS 2011)
jQuery Fundamentals
Even Faster Web Sites at The Ajax Experience
Effecient javascript
Teflon - Anti Stick for the browser attack surface
Extjs Howto

More from Jackson dos Santos Olveira (20)

PDF
AWS Control Tower
PDF
PDF
An introduction to predictionIO
PDF
Apache mahout - introduction
PDF
Managing computational resources with Apache Mesos
PDF
Introduction to CFEngine
PDF
PDF
Jboss Teiid - The data you have on the place you need
PDF
Apache PIG introduction
PPSX
Celery Introduction
PPT
Elastic search introduction
PDF
Clojure functions 4
PDF
Jython Presentation
PDF
Clojure functions 3
PDF
Clojure functions examples
PDF
Clojure functions
AWS Control Tower
An introduction to predictionIO
Apache mahout - introduction
Managing computational resources with Apache Mesos
Introduction to CFEngine
Jboss Teiid - The data you have on the place you need
Apache PIG introduction
Celery Introduction
Elastic search introduction
Clojure functions 4
Jython Presentation
Clojure functions 3
Clojure functions examples
Clojure functions

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
KodekX | Application Modernization Development
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Cloud computing and distributed systems.
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Electronic commerce courselecture one. Pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Modernizing your data center with Dell and AMD
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Advanced IT Governance
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
NewMind AI Monthly Chronicles - July 2025
Unlocking AI with Model Context Protocol (MCP)
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Machine learning based COVID-19 study performance prediction
KodekX | Application Modernization Development
Diabetes mellitus diagnosis method based random forest with bat algorithm
Cloud computing and distributed systems.
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Reach Out and Touch Someone: Haptics and Empathic Computing
Electronic commerce courselecture one. Pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Modernizing your data center with Dell and AMD
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Advanced IT Governance
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
NewMind AI Monthly Chronicles - July 2025

Presentation about ClosureScript fraemework

  • 1. ClojureScript Ilegra – LDC By Jackson dos Santos - @cyber_jso
  • 2. What is It? A Clojure API that allow us generate Javascript code from clojure code.
  • 3. How it Works? Download API git clone git://github.com/clojure/clojurescript.git cd clojurescript ./script/bootstraP (ns hello) (defn ^:export greet [n] (str &quot;Hello &quot; n)) Do some Clojure Code ./bin/cljsc samples/ldc/src/hello-ldc/hello-ldc.cljs > hello.js Compilie IT
  • 4. How it Works? Download API git clone git://github.com/clojure/clojurescript.git cd clojurescript ./script/bootstraP (ns hello) (defn ^:export greet [n] (str &quot;Hello &quot; n)) Do some Clojure Code ./bin/cljsc samples/ldc/src/hello-ldc/hello-ldc.cljs > hello.js Compilie IT
  • 5. More About Compilation Phase In order Clojurescript transforms clojure code in JS code. Google closure does It provides dependency management Minification Javascript code. Reduce the code size as small it can Kill dead code
  • 6. Some Examples core.cljs (ns hello.core (:require [hello.foo.bar :as bar])) (defn ^{:export greet} greet [n] (str &quot;Hello &quot; n)) (defn ^:export sum [xs] (bar/sum xs))
  • 7. Some Examples foo.cljs (ns hello.foo.bar) (defn sum [xs] (reduce + 0 xs))
  • 8. Some Examples Compile your code: ./bin/cljsc samples/hello/ > samples/hello/hello.js Or use the optimized format ./bin/cljsc samples/hello/ '{:optimizations :advanced}' > samples/hello/hello.js
  • 9. Some Examples Setup your view: <html> <head> <title>Hello ClojureScript</title> </head> <body> <h1>Hello ClojureScript!</h1> <script type=&quot;text/javascript&quot; src=&quot;hello.js&quot;></script> <script> alert(greet(&quot;Everybody know that Jeff is a gay Fish&quot;)); alert(&quot;The sum of [1,2,3,4,5,6,7,8,9] is: &quot; + hello.core.sum([1,2,3,4,5,6,7,8,9])); </script> </body> </html>
  • 11. The generated JS Code The optimized format
  • 12. The Generated JS Code The unoptimized format
  • 13. More Examples Calling an external JS library Clojure-side.cljls (ns hello.extern-example) (defn ^:export foo [] 42) (external.lib/send_alert &quot;ClojureScript calling a function defined in an externed JavaScript library&quot;)
  • 14. More Examples Calling an external JS library Library.js external = {}; external.lib = { send_alert : function (msg) { alert(&quot;Sending Alert via &quot; + msg + &quot;!&quot;); } };
  • 15. More Examples Calling an external JS library View.html <html> <head> <title>Hello Externed JavaScript Library</title> </head> <body> <script type=&quot;text/javascript&quot; src=&quot;out/goog/base.js&quot;></script> <script type=&quot;text/javascript&quot; src=&quot;library.js&quot;></script> <script type=&quot;text/javascript&quot; src=&quot;hello-extern.js&quot;></script> <script> goog.require('hello.extern_example'); </script>
  • 16. What Can I Do With Clojurescript? An application that has dependency to others name spaces. Use clojure data structures Integrate it with Nodejs Use the DOM (event handling, build components)
  • 17. What Can't i Do With Clojurescript? Clojure transactions feature Agents, Atoms Protocol handling
  • 18. What Are the Benefits In Use It? Mix the JS flexibility with the Clojure power Target the web like application plataform Build complex client web applications
  • 19. Witch Kind Of Problems Can I've For Starting With It? The application can get complex to test It's alpha Integrate it with JQUERY and others JS libraries. Problems to build the compiled JS Code (Setup your $CLOJURESCRIPT_HOME! Read the all documentation before starting)