Navigation
HomeSearch
Submit A Resource
Contact Us
About Functionn
Subscription Options
Subscribe By Email (265+)
Lists
Archives
Dec 11, 2012
Elm - A Functional Reactive Programming Language Meant To Replace HTML/CSS/JavaScript
Elm is a functional reactive programming language meant to replace HTML/CSS/JavaScript. Elm is optimized for creating web GUIs, supporting complex user input, and avoiding callbacks.
Functional Reactive Programming (FRP) allows rich interaction in a functional setting. It answers the question, “How can I handle user input and update a GUI in a functional way?” FRP ends up making it much easier to create interactive GUIs and to work with complex sequences of synchronous and asynchronous events. Its ideas can be valuable in an imperative setting too.
FRP comes down to one simple idea: some values change over time. In FRP, these time-varying values are called signals and they update automatically.
FRP becomes truly powerful when paired with a good graphics library, making it possible to create interactive pages or design purely functional games.
Functional reactive programming (FRP) is a declarative approach to GUI design. The term declarative makes a distinction between the “what” and the “how” of programming. A declarative language allows you to say what is displayed, without having to specify exactly how the computer should do it.
The term declarative is important only because most current frameworks for graphical user interfaces are not declarative. They mire programmers in the many small, nonessential details of handling user input and manually modifying the display.
So with FRP, many of the irrelevant details are left to the compiler, freeing the programmer to think about things that matter. That means no event handlers, no callbacks, no DOM manipulations. These things simply are not necessary with FRP in Elm.
Coding these examples in a traditional GUI framework – such as HTML/CSS/JavaScript – would require significantly more work and headache. Imagine manually extracting the mouse position from an event, adjusting the value to deal with cross-browser incompatibilities, finding a node in the DOM based on its ID, and finally describing exactly how to destructively modify that node. Not only is that painful to code, but it also requires broad and deep knowledge of inconsequential things.
FRP makes tasks considerably easier by taking care of the messy “how” of events, display, and updates.
Requirements: None
Demo: http://elm-lang.org/Examples.elm
License: BSD3
Trending Posts On Functionn This Week
Other Interesting Resources:
Trending Posts
Popular Posts
- 20 Fresh, High-Quality Free WordPress Themes 2012
- 50 Fresh, High-Quality Free WordPress Themes 2012 - Edition #2
- The Most Comprehensive Index Of Free Icon Fonts/Iconic Web Fonts
- Timeline - A JavaScript Library For Beautifully Crafted Timelines That Are Easy, And Intuitive To Use
- BLUR.JS - A JQUERY PLUGIN PRODUCING PSUEDO-TRANSPARENT BLURRED ELEMENTS
- Selene - A Stunning & Sleek jQuery UI Theme
- jQuery UI Bootstrap Theme - Bootstrap v2.X's Theme For jQuery UI
Recent Posts
Popular Categories
- JavaScript (535)
- JQuery (275)
- Libraries (132)
- CSS (115)
- frameworks (113)
- Tools (112)
- html (86)
- Github (79)
- html5 (71)
- Node.js (58)
- mobile (52)
- Responsive (49)
- CSS3 (47)
- page effects (45)
- Web Design (41)
- Bootstrap (35)
- twitter (31)
- image effets (22)
- MVC (18)
- generators (18)
- CoffeeScript (16)
- graphics (10)
Popular Components
- icons (42)
- Graphs (22)
- popups (19)
- notifications (17)
- web fonts (17)
- visualizations (14)
- sliders (11)
- polyfills (10)
- localstorage (8)
- social media buttons (8)
Popular Licenses
- MIT License (493)
- free (144)
- GPL (64)
- Apache License v2.0 (48)
- CC Attribution 3.0 License (46)
- GPLv2 (20)
- GPLv3 (11)
- Custom License (7)
0 comments:
Post a Comment