I am a Certified Vaadin 8 Developer and Professional now
What the title says :)
If you are interrested in hiring a consultant for the effective use of open source software on an enterprise grade, take a look around in the About section to see, what I have to offer.
Various snippets or code parts I found useful, so I keep them here for reference.
What the title says :)
With the recent change in Clojure to use dedicated artifacts for Spec in an
alpha
sub-namespace, it is no longer easy to start a simple REPL just with
the regular jar
(e.g. java -jar $CLOJURE_JAR clojure.main
). So how to start
it now?
As of before you are better off to do a lein new
somewhere, change the
org.clojure/clojure
dependency to the version you like and do a lein deps
:tree
to fetch all that is needed and display what things org.clojure/core
now depends on. E.g.
[org.clojure/clojure "1.9.0-alpha17"] [org.clojure/core.specs.alpha "0.1.10" :exclusions [[org.clojure/clojure] [org.clojure/spec.alpha]]] [org.clojure/spec.alpha "0.1.123" :exclusions [[org.clojure/clojure]]]
All your artifacts end up in ~/.m2/repository
. So next you have to build up
your classpath to call the REPL. You can either run a lein with-profile uberjar cp
in that
dummy project to get the class path Leiningen is using (which often can be
quite long depending on all the plugins you run. Or you can guess the
locations from the versions above to build up the params for -cp
for
yourself.
M2="$HOME/.m2/repository" java -cp $M2/org/clojure/clojure/1.9.0-alpha17/clojure-1.9.0-alpha17.jar:$M2/org/clojure/spec.alpha/0.1.123/spec.alpha-0.1.123.jar:$M2/org/clojure/core.specs.alpha/0.1.10/core.specs.alpha-0.1.10.jar:. clojure.main
This is a very basic setup to get a basic REPL going, but paired with rlwrap
this is a few times faster to fire up than a lein repl
, which makes it
perfect to quickly fool around with some ideas.
On the horizon to streamline this, there is https://github.com/clojure/tools.deps.alpha.
Finally my patch to access the clj-fmt feature in the cider-nrepl made into the master branch. The feature is mapped to the formatexpr of vim, which is accessed via gq
. So to clean up the mess you just created, press gqaF
(format the outermost form).
https://github.com/tpope/vim-fireplace/commit/2193122e13fdf9e9af30475d8d9a90746234c1d8
In Vaadin8 the conversion between the model data type and the field is done in the Binder
. This prevents automatic mapping for the models as some manual step must be done beforehand. But since writing custom fields now is way more reasonable, here is a first draft for a generic converter field. Just provide the backing Field
and an Converter
.
https://gist.github.com/christoph-frick/947fec59cfd09f7140933b52102cc041