4 ms·
Yay - it's great to get some more documentation about how to build plugins for Atom. That said, this tutorial neatly avoids adding much to Atom's view layer. W
by mhw 10y ago
Yay - it's great to get some more documentation about how to build plugins for Atom.
That said, this tutorial neatly avoids adding much to Atom's view layer. When you try to extend the user interface you'll eventually run into https://github.com/atom/atom/issues/5756 https://github.com/atom/atom/issues/5756 "Let's choose a view framework for docs, generated packages, etc." which has been open for nearly 18 months.
There's a commendable commitment not to force a single view framework on all plugin authors, but the cost of that seems to be that there's no single view framework that the project feels comfortable recommending and documenting as a starting point for new authors. And without a view framework to present as an example, there's little to go on to help figure out how to structure a plugin with some custom user interface components. The project generator used in this tutorial creates a sourcefetch-view.js file, but the tutorial never mentions it. The Atom flight manual talks about the view file in a little more detail, but stops short of explaining how responsibilities should be split between model and view in a more complex plugin. The best option available seems to be to go reading through the source code of other existing plugins out there, but as each chooses a different approach (see original problem) it's difficult to pick up what might be considered best practice and what has been deprecated - some packages use atom-space-pen-views for example, but that's the old recommended view framework that's been deprecated for a while.
I like Atom as an editor, and part of the reason is that I really would like to extend it by using the languages that I'm already familiar with. But writing a plugin will (for me) only ever be a side project, and the amount of research I need to do to understand how to build some meaningful UI in Atom is too great at the moment for me.