Comments (7)
A bit more about the questions we have.
- It seems like Phosphor Components are View-y type things. This seems to
overlap highly with what backbone Views do. Do these things solve the same
issue? - One of the main ways we use backbone is just for the model sync. Would it
make sense to integrate a phosphor component with backbone by wrapping the
backbone model only in a TS model class (hidding the details of backbone).
In this approach, we would never use backbone views at all.
Thoughts?
On Fri, Jul 17, 2015 at 4:08 PM, svurens [email protected] wrote:
@ellisonbg https://github.com/ellisonbg and I were talking earlier
about possibly using Phosphor to replace Backbone's View class. Would that
currently be possible, and if so, how would I go about doing that?—
Reply to this email directly or view it on GitHub
#45.
Brian E. Granger
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
[email protected] and [email protected]
from phosphor.
any objection to moving discussions to the Phosphor Gitter?
https://gitter.im/phosphorjs/phosphor
from phosphor.
I am on there now...
On Fri, Jul 17, 2015 at 4:43 PM, S. Chris Colbert [email protected]
wrote:
any objection to discussions to the Phosphor Gitter?
https://gitter.im/phosphorjs/phosphor
—
Reply to this email directly or view it on GitHub
#45 (comment).
Brian E. Granger
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
[email protected] and [email protected]
from phosphor.
The latest version of backbonejs (1.2) which is used in the current development version allows for custom views that don't require jquery. You can check out projects such as D3View and NativeView but the key is that you can use the DOM manipulation program of your choice. Creating a phosphor view would be easy.
In ipywidgets, we made the base widget class a mixins, in order to let users create custom widgets with other implementation of backbone.View
. Besides, widget.js
and manager.js
actually don't require jquery anymore and only perform native DOM api calls - and we don't use View.$el
anymore since it is specific to the jquery views... I am actually using a flavor of D3View myself.
IMO, backbonejs and its very large user base enable custom widget authors who may not want to adopt a specific framework, or to learn phosphor. Besides, dropping it would have an enormous migration cost for us.
In jupyter-widgets/ipywidgets#73, I proposed to add an example of use of NativeView
to present how these mixins can be used. I could also add a simple example using D3View if you like.
from phosphor.
closing this since we are conversing offline
from phosphor.
Can you post a summary here?
On Fri, Jul 17, 2015, 20:33 S. Chris Colbert [email protected]
wrote:
closing this since we are conversing offline
—
Reply to this email directly or view it on GitHub
#45 (comment).
from phosphor.
It expanded into a larger conversation about phosphor and design. Here were my take aways:
On Models:
- We should build model interfaces and implementations of those model interfaces using TypeScript.
- Models should have API to return submodels - the ContentManager should be able to return Notebook and TextFile models, the Notebook model should be abel to return Cell models, etc.
- Those model objects may be impleented internally using backbone models, Google realtime API or existing jupyter web services.
On Views:
Chris identified 3 main ways of buidling Views:
- Phosphor Widgets
- Phosphor Compoments (that use the virtual DOM)
- "Plain DOM nodes" Because we can't use web-component custom elements, for now we will end up wrapping plain DOM nodes in simple Typescript classes.
However, the problem with the "plain DOM node" approach is that there are a common set of methods and events on these types of objects, such as those related to lifecycle, attaching, detaching, etc. Chris mentioned the possibility of having Phosphor.Widget inherit from a new common base class that does CSS based layout, but that has the base lifecycle methods/events.
We will likely use intermediate ViewModel classes that adapt the View and Model parts.
from phosphor.
Related Issues (20)
- Datagrid: Asynchronous TextRenderer functions HOT 6
- Datastore load testing HOT 2
- distributing as es6 HOT 2
- [Docs/Examples] Codesandbox template / Storybook support HOT 6
- [Question] Hot reloading phosphor widgets? HOT 4
- Applying zoom to parent of some phosphor widgets breaks mouse targeting HOT 5
- Enable setting context menu icon HOT 2
- Deprecated user-defined Event API HOT 2
- [Question] There may be invalid code in reallocSizers function HOT 1
- Save layouts to local file and restore them HOT 1
- Is there a list of projects which make use of phosphor that one could check out? HOT 2
- Add a "pass thru" virtualdom element that accepts a custom rendering callback HOT 1
- Mac-only keyboard shortcut HOT 10
- Datagrid: investigate using CanvasKit
- Some FocusTracker and TabBar unittests fail in master on OS X with latest Firefox HOT 1
- Stretch factors and size basis should be initialized when sizer is created.
- Make Phosphor safe to load on the page more than once HOT 4
- Tokens that extend other tokens HOT 5
- GridLayout.removeWidget bug HOT 2
- GridLayout tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phosphor.