Hi,

As a follow-up to my talk at EuroClojure 2014, I have deployed the latest 
modular and cylon releases to clojars.

Both of these projects contain pre-built components to get up-and-running 
quickly with a component-based application as described by Stuart Sierra :-

[1] https://github.com/stuartsierra/component
[2] https://www.youtube.com/watch?v=13cmHf_kt-Q
[3] http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded

You don't need to download anything because the functionality is built into 
Leiningen already. For example, to create a simple website, do this :-

$ cd /tmp
$ lein new modular myapp
$ cd myapp
$ lein run

You can also add various options to determine what kind of project gets 
generated (and lots more will be added in the future). For example, here's 
how to generate the same site with a login page, and run using the repl :-

$ cd /tmp
$ lein new modular my-secure-app +cylon/login
$ cd myapp
$ lein repl
nREPL server started on port 56307 on host 127.0.0.1
REPL-y 0.3.0
Clojure 1.6.0
Type (dev) to start
user=> (dev)
#<Namespace dev>
dev=> (go)
Adding user 'dev' with password: Zl6OrGs
:ok
dev=> (reset) ; <- and repeat, as per Stuart's 'reloaded' workflow in [3]

Now browse to http://localhost:3000 and you should see a Login link in the 
menu bar. Login with user 'dev' and with the password shown in the repl 
(the dev user is only added when you run a dev system).

In the future we are planning to make all the modular components available 
via lein new generation options.

Bear in mind that unlike most template generated projects, projects are 
based on the component pattern are easy to change post-generation via the 
system.clj namespace, so the 'lein new modular' step is merely to help 
beginners get started more quickly.

As I mentioned in my talk, we have a Google discussion group called 
'modularity' for discussion about this and other component-related topics, 
all welcome.

Malcolm

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to