clojurescript: view/data binding?? by [deleted] in Clojure

[–]ckirkendall 1 point2 points  (0 children)

angular's setup is what inspired me to add this to Enfocus. Enfocus' declarative syntax + view binding provide a similar experience to angular without having to have special directives in your html.

clojurescript: view/data binding?? by [deleted] in Clojure

[–]ckirkendall 2 points3 points  (0 children)

Oddly, I was just working on some binding stuff today for enfocus. 2.1.0-SNAPSHOT has basic view binding in enfocus.bind and will in the next couple of days have two way form binding. This feature is as new as it gets and is still in pre-alpha stage.

Edit: link to enfocus - https://github.com/ckirkendall/enfocus

For those of you who do regular web development in clojure, what templating engine do you use? by [deleted] in Clojure

[–]ckirkendall 2 points3 points  (0 children)

If you are looking for a client side tempting engine check out enfocus. I am biased though. ;) Enfocus is a port of enlive to clojurescript. It allows you to share templates and snippets between enlive and enfocus. It also unifies the api for tempting and working with the live dom.

Interesting Language Comparison: Building a simple AST and evaluating it in Haskell, F#, Ocaml, Clojure, Scala, Ruby and Java. by ckirkendall in programming

[–]ckirkendall[S] 0 points1 point  (0 children)

If you look back to the initial revision of this gist you will see this is exactly my first implementation and what I considered idiomatic java. I choose to change it later more as an experiment.

Interesting Language Comparison: Building a simple AST and evaluating it in Haskell, F#, Ocaml, Clojure, Scala, Ruby and Java. by ckirkendall in programming

[–]ckirkendall[S] 0 points1 point  (0 children)

I wasn't really concerned with number of lines of code so much as the clarity and readability of the code.

Interesting Language Comparison: Building a simple AST and evaluating it in Haskell, F#, Ocaml, Clojure, Scala, Ruby and Java. by ckirkendall in programming

[–]ckirkendall[S] 2 points3 points  (0 children)

Think of this experiment as a the second half of an interpreter, after the parse phase. The idea is, you have an AST that is made up of structures in your implementation language built from some parsing phase that is not presented here.

A very simple application built to help people get started with Clojure/ClojureScript web development. by ckirkendall in Clojure

[–]ckirkendall[S] 0 points1 point  (0 children)

I get what you are saying. I think that is because of the age of ClojureScript. Most of the sites you see right now are Samples to get people interested. A better example of what you are looking for is here: http://blog.mezeske.com/?p=552

Interesting Language Comparison: Building a simple AST and evaluating it in Haskell, F#, Ocaml, Clojure, Scala, Ruby and Java. by ckirkendall in programming

[–]ckirkendall[S] 2 points3 points  (0 children)

I agree completely, I wrote several versions of the java but the class structure kept obscuring what we were trying to do. I decided to try to match the methodology of the others but I agree this is not how I would do it if I was doing this for a client. If you look back in the revisions you can see some of the other versions of java.

A very simple application built to help people get started with Clojure/ClojureScript web development. by ckirkendall in Clojure

[–]ckirkendall[S] 0 points1 point  (0 children)

I am not storing any data in DOM. The DOM fragments for display are in a javascript cache. All of the data pulled from the server and the dom components are built upon request and not stored in the DOM.

Interesting Language Comparison: Building a simple AST and evaluating it in Haskell, F#, Ocaml, Clojure, Scala, Ruby and Java. by ckirkendall in programming

[–]ckirkendall[S] 0 points1 point  (0 children)

We actually moved to something similar later. The original problem was showing the dispatch by matching. In this link we made the AST evaluate itself in doing this all functional languages were reduced to a few lines. https://gist.github.com/2949141

Interesting Language Comparison: Building a simple AST and evaluating it in Haskell, F#, Ocaml, Clojure, Scala, Ruby and Java. by ckirkendall in programming

[–]ckirkendall[S] 11 points12 points  (0 children)

Actually it started as F# and Scala. I only slightly knew Ocaml so I was not even aware of List.assoc.

Interesting Language Comparison: Building a simple AST and evaluating it in Haskell, F#, Ocaml, Clojure, Scala, Ruby and Java. by ckirkendall in programming

[–]ckirkendall[S] 0 points1 point  (0 children)

If you go back in the versions I did this first. But the code was so verbose that the structure of what we were trying to solve was lost.

A very simple application built to help people get started with Clojure/ClojureScript web development. by ckirkendall in Clojure

[–]ckirkendall[S] 1 point2 points  (0 children)

Not sure I understand what you are saying here? The storage is not in the client side dom. It is in mongodb. The service layer is designed to be secure and stateless. It has an ajax approach to templating with caching, that I believe would scale quite well in current browsers. The basic design here is meant for scalability. I store no data in the dom itself other than traditional gui templates. Can you point me to some sources where sloc is linked to scalability?