

A Functional Blog In Clojure  - unignorant
http://ethanjfast.com/
Caveat: This was a weekend project, and I am by no means an expert in clojure (or compojure).<p>Also, I'm be curious to know how it runs in IE. And pardon the pun...
======
mahmud
Homework: readable URLs.

    
    
      (concatenate 'string url-prefix
         (substitute #\- #\Space (or subject-line (first-ten-words body))))
    
    

Also, wrap up all those CRUD operations into methods that dispatch on the
content _type_ ; once you have comments, comment creation, update, reading and
deletion will be mostly identical to the posting. A lot of code duplication.
Instead, abstract out the common code (and save yourself from database backend
dependency by writing CREATE, VIEW, UPDATE and DELETE methods.

~~~
unignorant
Thanks for the suggestions -- I agree with you completely.

Much of the code can be refactored in some way, and parts of it can be
significantly abstracted. I wanted to get something up quickly, so the end
result is certainly flawed.

But the nice thing about Clojure is that these kinds of changes can be made
rather painlessly -- at least, in comparison to other languages.

------
unignorant
This was a weekend project, and I am by no means an expert in Clojure (or
Compojure). Also, I would be curious to know how it runs in IE...

~~~
icey
In ie8 on XP SP2 the margins are off.

Your javascript appears to work properly.

<http://imgur.com/yGDLc>

~~~
unignorant
Thanks, I will have to find out what is causing that...

------
vdm
Verbs in URIs smell. show == GET

Thanks for sharing your experience.

------
raju
Nice! I am currently learning Clojure, and I will be sure to follow along.
Thanks, and good job. FWIW, the site looks fine in FF3.5 and Safari on the
Mac. Looking forward to future posts.

------
rw
"Functional" as in...?

~~~
unignorant
It was meant to be a pun.

