code.talks 2019 - No Pain, no Gain: Using Clojure for Web Applications

Поделиться
HTML-код
  • Опубликовано: 15 сен 2024
  • by Dr. Tobias Schröder
    Many of us are really into the paradigms of functional programming. Whether we like streams, mappings, pure functions or just the immutability of variables and objects. But can you use a modern functional programming language like Clojure for web applications? How does it feel when you write HTML with a functional language and which benefits is the backend going to have?
    This talk provides a look at a web framework called Component in Clojure, dives into the world of lambda expression, and shows how to develop a To-Do web app with this framework. A live demo and coding will complete our functional lookout.
    #clojure #lisp #korma #hiccup #ring #pedestal #carebears #codetalks

Комментарии • 18

  • @ronindevninja
    @ronindevninja 3 месяца назад

    thanks this explean a lot very clear, thanks your so much

  • @chillbro2275
    @chillbro2275 2 года назад

    Very useful for me. Thanks.

  • @ruslanhlaznov2100
    @ruslanhlaznov2100 3 года назад +1

    Would good to get link in source code

  • @thomasmeyer9625
    @thomasmeyer9625 4 года назад +3

    How did you do the flashlight thing? With what software/hardware?

    • @tobiass6556
      @tobiass6556 4 года назад +9

      Hey Thomas, I used the Logitech Spotlight presenter with the open source software github.com/jahnf/Projecteur (cause I am on Linux).

  • @pryflack3646
    @pryflack3646 4 года назад +3

    15:16 are you not open to SQL injection here?

    • @CvetanSimsic
      @CvetanSimsic 3 года назад

      Mate he said those are prepared statements, those are probably escaped if library controlls that.

    • @pryflack3646
      @pryflack3646 3 года назад

      @@CvetanSimsic damn a year later, I think I've lost the context ;) He refers to reset! as a "raw statement" so it sounds and looks dangerous. You sound unsure about it too.

    • @skyleite2065
      @skyleite2065 2 года назад

      @@pryflack3646 The second snippet is definitely not a prepared statement. It's using Clojure's own "format" function, so you're correct in that it's vulnerable to SQL Injection. The first snippet is a properly prepared statement though.

  • @YisraelDovL
    @YisraelDovL 4 года назад +7

    Driving me crazy that you keep calling parentheses, "brackets"

    • @TwoLovesAndLou
      @TwoLovesAndLou 4 года назад

      Thats the norm in European English.

    • @WalterPelissero
      @WalterPelissero 3 года назад +2

      Bekause zat ist ze vay ve speak Englisch owuer hier

  • @YisraelDovL
    @YisraelDovL 4 года назад

    No, not everything in clojure is a list. There are other data-structures, maps, vectors, sets. You will very rarely actually be working with lists. I think clojure is more accurately described as LISP inspired, or LISP like.

    • @zoom0211
      @zoom0211 3 года назад +4

      1. I know your comment is old but I have to respond to it...
      2. "No, not everything in clojure is a list." - Yes, you're right.
      3. "You will very rarely actually be working with lists." - No, you're wrong. Every time when you define or call a function you create a list. (defn me [] "me") is a list, (me) is also a list. Please, note that every function definition or fn call is a data structure itself that is read later when you compile it.

    • @rostislavsvoboda7013
      @rostislavsvoboda7013 3 года назад

      Actually when you work (i.e. write or use) with something like '(defn me [] "me")' you don't really think of it as a list. You perceive it to be a function with a certain type signature. I.e. you abstract away, that means you don't care if the thing which defines your function is a string or a list of expression which themselves are strings or something else.
      (Notable exception to this "you abstract away" are situations in which you write macros. But 99% of the time you won't be writing macros.)

    • @HinaTan250
      @HinaTan250 Год назад

      Actually, you are all wrong.
      Everything in clojure is data.

    • @YisraelDovL
      @YisraelDovL Год назад

      @@HinaTan250 Not sure if you are trolling, but all programs are data in every language

    • @johngibson4874
      @johngibson4874 7 месяцев назад

      Native support for vectors and maps doesn't mean that Clojure isn't a Lisp. Common Lisp has arrays and hash maps and it is a Lisp right?