Git Product home page Git Product logo

glimpse's Introduction

Glimpse Build Status

This project is no longer maintained

When I was a child
I caught a fleeting glimpse
Out of the corner of my eye.

I turned to look but it was gone
I cannot put my finger on it now
The child is grown,
The dream is gone.


— Pink Floyd, "Comfortably Numb"

Glimpse is a view composition library in Clojure supporting a view-first workflow. It is inspired by Pakyow.

Installation

Add the following dependency to your project.clj file:

Clojars Project

Supported Clojure Versions

Glimpse requires Clojure 1.7+.

Usage

Following is the interesting portion of a small Ring/Compojure application using Glimpse.

<h1>Hello from Glimpse</h1>

<article data-scope="post">
  <header data-prop="title">Post Title</header>
  <p data-prop="text">Post text goes here</p>
  <span data-prop="author">Author</span>
</article>
(ns hello-world.core
  (:require [compojure.core :refer :all]
            [glimpse.views :as glimpse]))

(defroutes app
  (GET "/" [] (-> (glimpse/view "/")
                  (glimpse/bind :post {:author "Abraham Lincoln"
                                       :title "The Gettysburg Address"
                                       :text "Four score and seven years ago..."})
                  (glimpse/render))))

Please refer to the warmup for a complete example. You can find the API documentation here and other documentation here.

License

Copyright © 2015 Thomas C. Taylor and contributors.

Distributed under the Eclipse Public License, the same as Clojure.

glimpse's People

Contributors

tessellator avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

glimpse's Issues

Add support of CSRF prevention

This would likely be a function that transforms forms to include a hidden field given a value, and a middleware to generate the value, call the xform, and associate the value with the session. It should be compatible with ring-anti-forgery.

Add data-version binding

Add a data-version binding that allows a user to select different renderings of objects at runtime.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.