6 ms·
EDN is a brilliant literal for data, and since it offers more types than JSON, I would love to see it catch on in the places that now use JSON, especially in AP
by lkrubner 7y ago
EDN is a brilliant literal for data, and since it offers more types than JSON, I would love to see it catch on in the places that now use JSON, especially in APIs. JavaScript has a complicated early history and even though one can use objects as a key value map, it’s not quite a map, in JavaScript. EDN does have the advantage of being a clean implementation of its idea.
On a different topic, I’ve read that almost 50% of computer programming work is just building database views and providing GUIs so non-technical people can interact with databases. Making this work easy used to be a major goal of multiple corporate products. One reason VisualBasic had such a devoted following is that it made it so damn easy for novices to build a GUI for a database.
In recent years the industry has moved towards HTML as the default way to build an interface for anything on a network, but HTML continues to lag when it comes to forms. You have to use a mountain of JavaScript to get the form functionality of VisualBasic. We’ve actually gone backwards on ease of creating database GUIs. Yes, in theory you can use something like React to build forms, but the dev using VisualBasic would be done with the project while you’re still waiting for npm to finish downloading your dependencies. And React requires more skill. VisualBasic had a wonderfully gentle learning curve. Likewise, Ruby On Rails (and other frameworks including Symfony and Django) have scaffolding that allows the fast construction of HTML forms, but, again, HTML is a limited method of building forms.
I’d love to see Clojure succeed in this space, building corporate GUIs for databases. How to do that? Is a new GUI technology needed? Towards that end I’d love to see EDN used as a config language to define a scaffold for forms. There are elements of Swing that worked well and could be rescued from the larger wreckage of Java GUIs. And JavaFX represents a huge “road not taken” for the whole industry.
The tech industry has had eras when it focused on opening the door to beginners. Those eras gave us HyperCard and Flash and VisualBasic. Right now the industry seems to be undergoing an episode of gatekeeping. We are requiring beginners to learn React, which is a big eco-system, and also stuff like Docker, which is tough for beginners. The point of making so much tech mandatory for even simple projects inevitably keeps some people from discovering the joy of programming.
Clojure is the most fun language that I ever worked with, and it’s conceptually simple and it has EDN as a data literal language, all of which is a kindness for beginners. If it also had a simple method for building GUIs I believe it could help lead the industry into the next era when we again focus on making programming accessible for beginners.
- geokon 7y agoI suggest taking a look at Cljfx https://github.com/cljfx/cljfx https://github.com/cljfx/cljfx It's built around JFX, but it's very Clojure-y (much more than the alternate Swing library). I've been making small GUIs with it and it's convenient and "just works". The only issue I've had is when some callback blows up somewhere in the guts you don't get clean call stacks so it's very hard to debug, but then.. isn't most GUI code? You just need to work incrementally which is easy to do with a REPL
- lvh 7y agoHuh! I've previously only used fn-fx. Any chance you've used both?
- geokon 7y agoYeah, I actually used fn-fx at first but it's quite complicated internally and semi-unmaintained. I found some bugs/issues and I couldn't figure out how to fix them. Then the project was taken over by a new maintainer but he admitted that he didn't really know how the system works or how to fix it. I similarly read a comment from the cljfx creator that he started the project b/c he didn't know how fn-fx works and how to add to it. I also wanna say that the CLJFX maintainer is very friendly and responsive and he's been very helpful with all my dumb questions. I thought it's be one of those libraries that gets "finished" and then archived, but he's been keeping at it and releasing new versions for a long while now The design-paradigm is essentially the same (React-style). You still have a state atom and you're still making a map structure of your GUI elements and then hooking up callbacks to events. I find it's really easy to use, but at the same time I have to admit I don't really get how it works or how to debug the system. It's a bit of a black box for me. You feed in a data structure and it make a GUI for you and functions get called when stuff happen/changes.
- samatman 7y agoMetabase is focused on analytics, which is in a way the dual of forms: https://github.com/metabase/metabase https://github.com/metabase/metabase Clojure has great potential for what you're describing.