Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 with a more composition-friendly and configurable API #58

Open
mjul opened this issue Nov 15, 2016 · 5 comments
Open

V2 with a more composition-friendly and configurable API #58

mjul opened this issue Nov 15, 2016 · 5 comments

Comments

@mjul
Copy link
Owner

mjul commented Nov 15, 2016

Rewrite the API to work on a Clojure map containing the POI instance rather than the POI instance itself.

This will allow us to add configuration and other state to the map as well (e.g. a cursor, the current sheet, names of the workflow (text) styles and other information).

Please use the v2 branch for this as it will not be fully backwards compatible if client code is depending on the leaky abstraction of the POI instances being passed around for state.

There is some discussion of this in Pull Request #57 .
cc: @tombooth

@mjul mjul added the 2.0 label Nov 15, 2016
@mjul
Copy link
Owner Author

mjul commented Nov 15, 2016

Also, this is related to the proposals from

It would be great if you would contribute to this as well as you have very good ideas for the future of Docjure.

@krisleech
Copy link

Docjure has worked really well for writing Excel. Thanks. I wonder if you are using v2 yourself in production or it is still work in progress / subject to change?

@mjul
Copy link
Owner Author

mjul commented Dec 12, 2017

V2 is an idea for a cleaner Docjure API, but it needs helpers to happen. @krisleech: It would be great if you want to help out defining it.

@leontalbot
Copy link

leontalbot commented Jan 12, 2018

Hello! I am discovering docjure...

Is v2 about a more declarative approach where we would have a simple read and write fn (or at least fewer fns) that digest datastructures (like hiccup or clj-pdf do for writing html or pdf) ?

This would be indeed awesome!

@mjul
Copy link
Owner Author

mjul commented Jan 31, 2018

My idea is to simplify and make it more composable by encapsulating the underlying POI fully behind a state/cursor data structure that would enable for example more idiomatic markup and styling functions than the current imperative versions. It would also enable us to simplify reading and writing by storing more context in the state object so selecting/navigating sheets and data can be done more uniformly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants