On Mar 27, 12:04 am, Joost <jo...@zeekat.nl> wrote: > I'm currently working on a library to provide a consistent and > extensible method for generating form fields, based on hiccup. >
I think this is a cool thing to do. One thought I had was that your approach looks very general - could it be used for all types of HTML generation or is it limited to form fields? > The code is at github:https://github.com/joodie/flutter > > The README should give you a decent indication of what I'm aiming for. > In any case, this library will NOT provide validation routines (though > it should integrate nicely with clj-decline or whatever you might > prefer). I'm keeping my sights on the "do one thing, but do it right" > goal. > I think this is a good direction to go in. I'm really interested in how things will turn out. One thing to look out for (it may not even be an important problem but it has bugged me) is how attributes such as "max-length" end up as validation and html. Looking at things from an MVC perspective max- length is an attribute of the model that ends up used by the controller for validation and also in the view html. I feel it would be good if there was a painless way of using such attributes across multiple libraries such as clj-decline and flutter. If people start using HTML5 form validation, this problem multiplies. > I'm still working on the tests, but in any case, the tests are the > right spot to look at right now to see some examples. > > Some more convenience functions should be coming soon. For now, I've > been mostly trying to get a consistent internal API. > I think the API is the most innovative thing about what you are doing - the functionality is already there, entangled, in most web applications. I feel you would get more early feedback on your approach if you documented the API. Personally, I struggle to get an overview of a library from the unittests. Good luck. Saul -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en