This may sound like a rant, but it's not meant to be.  This is just my 
recurring frustration whenever I am led by my strong desire to use Clojure, 
but my typical use case is a basic business web app with authentication.  
Such use case may not at all be the best use of Clojure, but it should be 
perfectly reasonable as Clojure is a powerful general purpose language.

It was not my intent to suggest that Clojure lacked a good solution to any 
particular need (authentication, data persistence, or anything else).  What 
is missing is a complete starter kit with _current_ instructions.

Every year or two I go looking for something like this, or at least a guide 
or tutorial.  And every time, I encounter at least one of the following:
 - A key element of the guide is outdated or depends on a library which is 
outdated (and where in some cases there is a reference made that everyone 
should switch to library Y, but then they're on their own to figure out how 
to use Y in this context)
 - One or more element of the simple app is not illustrated in complete 
detail, but the author points the reader to a tutorial for that element 
elsewhere... except that some of the guides use boot while some use lein 
while some use deps (which itself isn't necessarily a huge deal, but forces 
the beginner to start diving into build/dependency management tools rather 
than getting a first app built)
 - The guide doesn't cover a complete app

For whatever reason, searches for Clojure-related topics tend to 
(largely/only) turn up results that are 5+ years old.  That's an eternity 
in internet time.  Yes there are some great current libraries that probably 
do everything one might need, but still there are roadblocks which 
beginners will encounter where the answers are nonexistent or outdated.  

With respect to database interaction, I know of but haven't used Korma 
(which now appears to be dead?), HugSQL, and others.  Of course there's 
straight JDBC Java use (whereby I should just write my own thin JDBC 
wrappers like I did back in the Java Server Pages days...?).  <- If that's 
the answer, then I have no problem doing it; but I would suspect there's 
some other pattern that leverages some of the strengths of Clojure a bit 
more.  This one current example is basically useless: 
https://devcenter.heroku.com/articles/clojure-web-application .   It 
illustrates enough to show that Clojure can route and respond to http 
requests, and it can touch a database; but surely it is not an example of 
how people actually write Clojure web apps.

In contrast, there are numerous Django and Rails guides which illustrate 
the complete process of building a web app with their language+framework.  
They even tend to include some amount of tests and even 
internationalization (as well as authentication, database interaction, and 
sometimes API/json cases).

Most of us don't get hired into Clojure companies, so any learning and 
doing is more of an evening/solo activity.  Probably many of us who have 
been exposed to Clojure really would love to use it in our day jobs.  But 
often the best way to get a new language or approach accepted is to build 
something useful and relevant to show the company.  That's how Java got 
into C++ shops and how Ruby got into Java shops.

Clojure will remain vital to some big companies regardless of whether the 
cost of entry is reduced; but sadly, the comparative abomination called 
JavaScript will continue to grow - eating the backend now too.  It could be 
Clojure/ClojureScript taking over the world.


On Saturday, March 21, 2020 at 10:51:47 PM UTC+1, Sean Corfield wrote:
>
> > some form of database interface (definitely need not be ORM; just a 
> demonstrated pattern)
>
> I'm curious as to what you feel is missing beyond clojure.java.jdbc / 
> next.jdbc? SQL is the lingua franca for relational databases and those 
> libraries provide the interface between Clojure data -- hash maps and 
> vectors of hash maps -- and rows/resultsets.
>
> On Sat, Mar 21, 2020 at 2:30 PM z9znz <zedni...@gmail.com <javascript:>> 
> wrote:
>
>> This is what primarily keeps me from ever building a first (web) app with 
>> Clojure.  
>>
>> Even the Web Development with Clojure, 3rd edition that I bought (beta) 
>> still does not have the section on this topic filled in. 
>>
>> I'm convinced that part of what prevents Clojure from being adopted more 
>> is the lack of a killer framework.  When I ask about this, the usual answer 
>> is that Clojure people don't like to be constrained and are happier to 
>> choose their own tools and libraries.  This is great if you already know 
>> what you're doing, but it's a vertical wall for newbies.
>>
>> I admit I have not yet looked at Coast on Clojure - and perhaps it has 
>> the potential to be that entry point for newbies.  
>>
>> But apropos to your question, perhaps the Coast docs on authentication 
>> will help you.  They illustrate using Buddy.  Buddy has not been updated 
>> since Q3 2017 (a fact I find discouraging), but perhaps it is still 
>> relevant.  
>> https://github.com/coast-framework/coast/blob/master/docs/authentication.md
>>
>> I keep dreaming of a Clojure-based starter system that includes 
>> authentication and some form of database interface (definitely need not be 
>> ORM; just a demonstrated pattern).  We could begin with that, and once we 
>> have a clue what's what, then we can go the usual Clojure route and hand 
>> select every library.
>>
>>
>> On Saturday, March 21, 2020 at 8:29:04 PM UTC+1, Bost wrote:
>>>
>>> I have difficulties finding up-to-date information, tutorials, articles, 
>>> blog posts etc. concerning WebApp authentication and authorization.
>>>
>>> The most "recent" useful articles I found are from 2015 and 2014:
>>>     https://rundis.github.io/blog/2015/buddy_auth_part2.html
>>>     https://blog.knoldus.com/google-sign-in-using-clojure/
>>>
>>> Uhm, my google-fu is getting weak... can anyone help please? Thanks
>>>
>>> Bost
>>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> <javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clo...@googlegroups.com <javascript:>
>> 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 clo...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/clojure/6d358084-de60-42a7-8893-a118a207bdab%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/clojure/6d358084-de60-42a7-8893-a118a207bdab%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
> World Singles Networks, LLC. -- https://worldsinglesnetworks.com/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/4a7cfcb6-268e-4669-9230-896d77697120%40googlegroups.com.

Reply via email to