A place where i can store interesting libs by category.
work in progress
When I was messing around with reagent I found this lib inside the re-frame framework. It looks to be a pretty strong cljs routing lib, with some neat features around Route matchers and actions.
####Quick Look
Route matcher | URI | Parameters |
---|---|---|
"/:x/:y" |
"/foo/bar" |
{:x "foo" :y "bar"} |
"/:x/:x" |
"/foo/bar" |
{:x ["foo" "bar"]} |
"/files/*.:format" |
"/files/x.zip" |
{:* "x" :format "zip"} |
"*" |
"/any/thing" |
{:* "/any/thing"} |
"/*/*" |
"/n/e/thing" |
{:* ["n" "e/thing"]} |
"/*x/*y" |
"/n/e/thing" |
{:x "n" :y "e/thing"} |
#"/[a-z]+/\d+" |
"/foo/123" |
["/foo/123"] |
#"/([a-z]+)/(\d+)" |
"/foo/123" |
["foo" "123"] |
####Quick links
This is a reagent framework built ontop of reactjs. It's been pretty interesting so far but the main readme is very long.
-
Install Leiningen (plus Java).
-
Get the re-frame repo
git clone https://github.com/Day8/re-frame.git
-
cd to the right example directory
cd re-frame/examples/todomvc
-
Clean build
lein do clean, figwheel
-
Run You'll have to wait for step 4 to do its compile, but then:
open http://localhost:3450
-
Compile
lein do clean, with-profile prod compile
-
Open the following in your browser
resources/public/index.html
This is a web app framework I played around with a while ago.
Positives | Negatives |
---|---|
Very easy to use | tbc |
- Can I use re-frame as the front end part of luminus?
$ lein new luminus my-app
$ cd my-app
$ lein run
Started server on port 3000
- Your First Application
- REPL Driven Development
- Application Profiles
- HTML Templating
- ClojureScript
- Routing
- RESTful Services
- Request types
- Response types
- Websockets
- Middleware
- Sessions and Cookies
- Input Validation
- Security
- Database Access
- Database Migrations
- Logging
- Internationalization
- Testing
- Environment Variables
- Deployment
- Useful Libraries
- Sample Applications
- Upgrading
- Clojure Resources
I found out about this lib when I was using re-frame / Luminus. Pretty sure its industry standard for representing HTML in Clojure.
Installation
Add the following dependency to your project.clj file:
[hiccup "1.0.5"] ;;Check for more recent depenency versions
;Next
user=> (use 'hiccup.core)
nil
user=> (html [:span {:class "foo"} "bar"])
"<span class=\"foo\">bar</span>"
Libs I want to look at next.