Clojure Lang

26 Feb 2020 - Jake Na

Introduction

Basic References

Build & Debugging Tools

Language Extension Libraries

Asynchronous Abstraction Libraries

Application Framework & Libraries

Database as a value

SQL for Clojure(Script)

(require '[next.jdbc :as jdbc])
(def db {:dbtype "mssql"
         :dbname "database-name"
         :host "host" ;;optional
         :port "port" ;;optional
         :user "sql-authentication-user-name"
         :password "password"})
(def con (jdbc/get-connection db))
(jdbc/execute! con ["select * from sys.objects  where type = 'U'"])

; leiningen configuration
:dependencies [[seancorfield/next.jdbc "1.0.13"]
               [com.microsoft.sqlserver/mssql-jdbc "7.4.1.jre11"]]

Reloaded Workflow [Application State Management]

A component is a collection of functions or procedures which share some runtime state. Some examples of components:

Commponents are intended to help manage stateful resources within a function paradigm.

Data visualization Library & Tool

Logging in Clojure https://spin.atomicobject.com/2015/05/11/clojure-logging/

 :dependencies [...
                 [org.clojure/tools.logging "0.3.1"]
                 ; No need to specify slf4j-api, it’s required by logback
                 [ch.qos.logback/logback-classic "1.1.3"]
                 ...]
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <!-- encoders are assigned the type
         ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
    <encoder>
      <pattern>%d{ISO8601,Europe/London} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>

  <!-- Show debug logs that originate from our namespace -->
  <property name="level" value="DEBUG"/>
  <logger name="nsp.core" level="${level}"/>
  <logger name="org.eclipse.jetty.server" level="WARN"/>
  <logger name="org.eclipse.jetty.util.log" level="WARN"/>

  <root level="INFO">
    <appender-ref ref="STDOUT"/>
  </root>
</configuration>

clojure cljfx for desktop applications

E1: 데이터 기반 어플리케이션 개발에 대한 가능성 탐색

E2: Migration from SQL to Datomic

Who did a great work on clojure development, specially thanks mentioned in the community: