[ANN] modular 0.5.1 with cylon 0.4.0

74 views
Skip to first unread message

Malcolm Sparks

unread,
Aug 5, 2014, 7:36:21 AM8/5/14
to modul...@googlegroups.com
Hi,

Juan and I have deployed the latest modular and cylon releases to clojars.

Both of these projects contain pre-built components that can be used in a Clojure project following the workflow and component-based approach Stuart Sierra has recommended.

You don't need to download anything, because the functionality is built into Leiningen already. To create a simple Clojure-powered 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. 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=> 

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 and provide more flexibility in the initial project generation step. Also, the Cylon integration has much more in the pipeline, including an OAuth2 client, OAuth2 server, totp-based multi-factor authentication and role-based authorization. 

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

If you have any comments, questions or general feedback, please post to this group.

Thanks,

Malcolm



Martin Trojer

unread,
Aug 5, 2014, 12:51:54 PM8/5/14
to modul...@googlegroups.com
Good getting started post, also you future plans sounds interesting.

I'd add a link to the projects github pages aswell.

Malcolm Sparks

unread,
Aug 5, 2014, 3:48:57 PM8/5/14
to modul...@googlegroups.com
Thanks for pointing that out.

Here are the github links :-

ex...@expez.com

unread,
Feb 1, 2015, 2:10:20 PM2/1/15
to modul...@googlegroups.com
I realize this thread is quite old, but is there an equivalent way of doing this with recent versions?  I tried to use the lein template to generate an example site to check out cylon.

Running something like :

lein new modular <my-app> <one-of-the-base-templates> +cylon/login +security +datomic etc

doesn't seem to add any of the additional modules.

Malcolm Sparks

unread,
Feb 1, 2015, 2:32:20 PM2/1/15
to ex...@expez.com, modul...@googlegroups.com
Hi - 

Yes, the information on this thread is out of date.

 lein new modular help

will list the available templates that can generate projects using it (incidentally, I updated it this afternoon to include clean-blog, but it doesn't yet have Cylon templates)

Juan has created a project https://github.com/tangrammer/modular-cylon-example demonstrating the OAuth2 parts of Cylon, based on the bootstrap-cover template. See here for more details: http://tangrammer.github.io/posts/13-01-2015-using-cylon-oauth2.html

My own plan is to add a template to demonstrate a simple username/password login form and user management system, before going onto more sophisticated stuff in Cylon including OAuth2, but unfortunately I have more pressing concerns at the moment, so please bear with me.

Regards,

Malcolm



--
You received this message because you are subscribed to the Google Groups "modularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modularity+...@googlegroups.com.
To post to this group, send email to modul...@googlegroups.com.
Visit this group at http://groups.google.com/group/modularity.
To view this discussion on the web, visit https://groups.google.com/d/msgid/modularity/d7776117-1517-44ba-969a-69befe0daba5%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages