-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Refactor Dash.jl to support same parameters as Dash for Python & R #4
Comments
About renaming. |
Thanks @waralex, I had a feeling there was a good reason for this change. This is less of a critical difference, so it's fine to leave it as is for now. The parameters for the struct and their names are much more important, since our eventual goal is for parity across all implementations (within reason). |
This means giving the existence check of the component to the JS front end and checking only the validity of the name on the backend? |
It looks like we're having a misunderstanding because you're trying to think of Julia in terms of "Java style OOP". I also had similar problems, but apparently it was easier for me thanks to my experience in c++, which uses several paradigms. Julia doesn't have classes in the sense of encapsulating data with methods. There are no private properties and no any other "internals". Julia has the same ideology as the standard C++ library - data should be separated from algorithms. The interface in Julia is not about what properties a structure contains, but what actions you can do with it.
No one treats |
That's probably true to a large extent, since I've never programmed in C++, but I have used Java. I agree that the implementation should make sense from the perspective of the language as well. At the same time, I'm sensitive to the fact that this can result in some tension with respect to maintaining multiple backends, and the features and interfaces they provide. It certainly makes offering the framework to users of multiple languages a bit more interesting 🙂 |
I think this is a minor misunderstanding -- the struct definition is a bit different from the Dash class in R or the implementation in Python. I am looking to better understand the logic of the current implementation, I'm not suggesting that this be handled by Lines 42 to 50 in 66fa0d3
In Python, we currently do the following:
Are these unrelated? Apologies in advance if I've missed something here. |
|
This seems reasonable -- I think a good rule of thumb for now is that anything not exposed to the user can remain as-is, but the user-facing interface and parameters should be largely the same -- while remaining idiomatic for Julia, as you've helpfully pointed out. The good news is that we can still make Dash.jl like Dash without trying to make Julia feel like Python 🙂 I've gone ahead and crossed off the above items that don't make sense in light of our recent discussions. Thanks for taking the time to explain in more detail. |
@waralex We're almost done with this issue! I think all that remains is to support |
|
The current definition of the
DashApp
struct should be made comparable to theDash
class in R and Python (it can remain a struct, but the interface provided to users should be more or less identical):Dash.jl/src/Dash.jl
Lines 98 to 119 in 2707170
For parity, if possible, we should use similar names across all backends
callbacks
tocallback
The following initial additions to the Dash.jl API are proposed:
serve_locally
parametersuppress_callback_exceptions
parameterassets_ignore
parameterassets_url_path
parameterlayout_get
methodWe should consider removing the following elements:
- [ ] Removecallable_components
, any required logic can be rolled into internal component handling, in similar fashion to Python and R- [ ] Removetype_links
name
with a warning message as in Dash for R, and suggest usingtitle
instead.A full list of current Dash parameters appears below; eventually all three backends should support these.
name
assets_folder
url_base_pathname
external_scripts
external_stylesheets
assets_url_path
meta_tags
requests_pathname_prefix
routes_pathname_prefix
suppress_callback_exceptions
index_string
show_undo_redo
compress
assets_ignore
serve_locally
eager_loading
include_assets_files
assets_external_path
The text was updated successfully, but these errors were encountered: