JeffreySarnoff / GUI.jl

Interfaces for Julia that are gooey to the touch.
MIT License
3 stars 1 forks source link

Design Principles #2

Open jpsamaroo opened 5 years ago

jpsamaroo commented 5 years ago

Here's a list of "design principles" that I think a successful meta-framework for GUIs should keep close to heart:

Widgets:

Layouts:

Styling:

JeffreySarnoff commented 5 years ago

All successful G/UIs have some internal commonality of purpose/presentation/representation. We are allowed to provide flexibility (i.e. recipes, color/look schemes), however imo it is a mistake to allow cacophony by high-level specification. Anyone who knows enough to get into lower levels can do whatever they choose, but for this to be successful -- people need to get something that works well for them and others.

JeffreySarnoff commented 5 years ago

@shashi your thoughts?

essenciary commented 5 years ago
jpsamaroo commented 5 years ago

@essenciary can you give some links to RShiny's documented API?

jpsamaroo commented 5 years ago

Also, RShiny appears to be a web application platform, but doesn't address desktop or terminal UIs. Is this accurate? If so, that'd be a deal-breaker for those applications which don't need/want the overhead that a network connection brings with it (among other reasons, like requiring the bloat of a web browser just to have a UI).

shashi commented 5 years ago

I would urge everyone to look at Travis and my talk in this year's JuliaCon, I am happy with the way it was presented, it is a good compendium of the features and a philosophy of WebIO, most of which overlaps what is said here. https://www.youtube.com/watch?v=A3_vpuFqb-0

I am working on turning the talk into an interactive web page. Will update here once it is done.

I have some thoughts on RShiny:

Pros:

  1. It's a very easy set-up: you write one file for the server one file for the client (if I am correct) and things just work.
  2. They have a widget gallery https://shiny.rstudio.com/gallery/widget-gallery.html

Cons:

  1. I think writing widgets itself is very different from writing a Shiny app

With WebIO, one can write a rather trivial package which includes say, Mux and WebIO, just provides a launch() function that can take a file or function that contains a UI and serve it. This would serve the purpose of Pro 1. And I believe we don't have the Con I listed :)

Finally, I see Julian (as well as Jeffrey in a phone call) has referred to a kind of "UI recipes" framework, I'm all for that and we should take inspiration from the success of PlotRecipes.

JeffreySarnoff commented 5 years ago

I watched that Presentation and found it useful -- to see, and to use.

JeffreySarnoff commented 5 years ago

Also R Shiny has a LOT of time person-hours corporate $ behind it. And to really use it fully costs. Here is its cheat sheet https://github.com/rstudio/cheatsheets/raw/master/shiny.pdf

JeffreySarnoff commented 5 years ago

I see nothing wrong with utilizing some good ideas from RShiny. I see much right with doing well with the best of what is available to us (e.g. WebIO, Mux, ClmGui, JSON3 ..) and filling in where we need to. I am not advocating just using the elements that exist as is -- we can, and should, combine their best aspects to have something more tangibly useful to [less expert, less experienced] others.

JeffreySarnoff commented 5 years ago

from @shashi If I understood Jeffrey's intentions correctly, the purpose is the following: "proliferate Web-technologies based GUI/component making in the Julia community." From our phone call we decided that the actionable items are:

  1. A more beautiful library of widgets -- Interact widgets currently look like crap, Jeffrey suggested using Semantic UI with some customizations -- I'm fully in on this idea
  2. UI Recipes -- so that packages can take minimal dependencies and define how packages can "specify" the UIs they need -- this is more up in the air as to what is the API and what exactly are the kinds of UIs people can "specify"
  3. Layout constraint optimization -- there is a bunch of literature about automatically laying out UI components, we should use them. This + UI Recipes could work together to make it a breeze to build interfaces.

Of course this is not an exhaustive list, but 1. is the minimal, 2 and 3 would accelerate adoption, along with an easy server set up like in Rshiny

JeffreySarnoff commented 5 years ago

@jpsamaroo By desktop-native I understood you as recommending we adapt ClmGui to the principles, stylings we arrive at as this all gets perfected. And meanwhile filling the gaps that most need filling -- we want Makie plots to be expressible through both the "desktop" and "browser" G/UI realizations. A cheap way to get that, I suppose, would be put it in another window -- can ClmGui spin off a browser window with context or else embed a dynamically rotatable/scalable graphic?

essenciary commented 5 years ago

@essenciary can you give some links to RShiny's documented API?

This is the whole RShiny API: https://shiny.rstudio.com/reference/shiny/1.3.1/

shashi commented 5 years ago

Some references:

  1. An old discussion about a UI Recipe system: https://github.com/piever/InteractBase.jl/issues/38 . Widgets.jl came out after the discussion but may not be what we're looking for here!
  2. A series of blog posts about automatic layouts: https://croisant.net/blog/2016-02-24-ui-layout-constraints-part-1/