3 ms·
Honestly I haven't used Ring/Compojure/Enlive beyond tutorials so at this point I'm very intrigued but don't have much to say yet. My belief though is that the
by fat0wl 13y ago
Honestly I haven't used Ring/Compojure/Enlive beyond tutorials so at this point I'm very intrigued but don't have much to say yet.
My belief though is that there is some peace of mind that comes from the idea of what you might call "page composition" -- that this piece of data sits in this template, that it rides on top of this simple model, that it is in ORM from database. There is a huge amount of linearity and convention throughout the stack and because of the dynamic nature of Ruby lots of gems can be sprinkled throughout without one really understanding what they do.
Now, I'm certain this level of abstraction and functional/mixin kindof stuff can be achieved in a Clojure framework but I think it is generally perceived as being a bit more non-linear and DIY (libraries not necessarily playing nicely together). As in "yes I can get all of these pieces together but then if down the line I have to change this piece, how will I accomplish it without breaking everything". Essentially, I think the perception of OO is more alluring in terms of project cohesion, whereas functional programming is seen more of a supposedly incorrect assumption that an HTML document is simply an assembled mass of text.
I'm really just trying to convey that RoR and the like seem to be making a COMPLETE ("in a few lines I can do anything short of my business's custom domain logic") framework out of the box and perhaps there is some stigma attached to the nature of Lisp that makes it seem as though framework developers are not striving to cross these bridges and there is less of a community to keep them in check.
Eh, I wish that made more sense but this is a lot of conjecture based on perceptions -- it's clear that a lot of these communities emerge from hype & reactionary values moreso than anything else. People wanted to shift away from PHP and be more productive without getting radically far away conceptually. I just got dizzy thinking about this lol... but yeah I think Java developers are a bit more open-minded when it comes to application development, seeing things more matter-of-factly than the languages with only MVC/Model2 kind of frameworks. I think if an attractively-packaged Clojure library were to emerge and get the right publicity (sad but thats how the web dev world is...) it could steal the hearts of many Java devs.
In my limited experience with Clojure it seems fun AND powerful. Yes there is a learning curve but that is to take it above and beyond. The simple functionality of most web apps could probably be achieved without writing anything too mind-bending.
Please do respond even if that response involves completely ignoring my rambling... I'm very curious to understand the Clojure community better :)
- jamii 13y agoMaybe check out http://pedestal.io/ http://pedestal.io/ "Clojurists looking for a standard way to build internet applications will love Pedestal. Rather than composing art out of found objects, they will now be able to mold a single, consistent form to match their vision. Pedestal may also appeal to developers who have been nervously approaching a functional language but who haven't yet mustered the courage to ask it out on a date. It provides a sterling example of how to use the Clojure ecosystem to its best advantage, reducing the friction usually associated with a language switch."
- danneu 13y ago> My belief though is that there is some peace of mind that comes from the > idea of what you might call "page composition" -- that this piece of data > sits in this template, that it rides on top of this simple model, that it > is in ORM from database. There is a huge amount of linearity and convention > throughout the stack and because of the dynamic nature of Ruby lots of gems > can be sprinkled throughout without one really understanding what they do. Actually, the problem with OO and my experience with Rails is this linearity quickly becomes a web where deriving the sequence of events encompasses more and more of your time as the project grows. Objects call objects across the system and change the state of each other without care. Making a trivial change involves unrolling this web every time. And that's why I think you have this backwards: > Now, I'm certain this level of abstraction and functional/mixin kindof stuff can be > achieved in a Clojure framework but I think it is generally perceived as being a bit > more non-linear and DIY (libraries not necessarily playing nicely together). As in > "yes I can get all of these pieces together but then if down the line I have to change > this piece, how will I accomplish it without breaking everything". `require`ing a Ruby gem is as non-linear as you can get. It's global with no entry-point. A gem's presence and effects are not obvious. They're often configured with some mutation like: MyGem.config do |c| c.key = "secret" end Meanwhile, it's obvious when a namespace of Clojure functions is included. And since they're just functions, they're trivial to compose. Completely different experience from what I was used to in Ruby.
- fat0wl 13y agothanks for your input. I see what you're saying about the Closure namespaces and function system making more sense. That's what has been attracting me toward it, along with some general fondness for the elegance of Clojure. I feel you whole-heartedly about the tangled web of OO. That's why I ultimately chose to leave Rails & start pursuing JVM languages. JVM languages seem to be daunting to Rails/Django folks because of all the "boilerplate, syntax, complexity" but I've found that a lot of the tools are so mature that it is not really such a burden. So yes, as an aspiring programmer who wants to have a reach beyond CRUD, the mystery of Rails & it's "fugly" libs eventually turned me off. Aside from things breaking/slowingdown with every version and needing excessive optimization not to accumulate at the interpreter, I came to the realization that the extra time that would be needed to understand more technologies for the different layers of the application (with Java.... Spring/Hibernate/etc.) there is a gain in that well... you actually understand what is going on rather than this tangled mess. I often had to re-factor code in Rails to kindof fit awkwardly between gems. From studying Javascript I learned a lot about asynchronous/aspect-oriented programming and am pleased to see that these concurrency issues are fundamental to most work that is happening on the JVM. I thought Scala/Play was a healthy medium between these two worlds but I'm starting to understand that maybe one needn't compromise.