Seneral / Node_Editor_Framework

A flexible and modular Node Editor Framework for creating node based displays and editors in Unity
https://nodeeditor.seneral.dev
MIT License
2.01k stars 415 forks source link

Long-term usability and productivity improvements #118

Closed Seneral closed 6 years ago

Seneral commented 7 years ago

We're at the point at considering doing several overhauls that affect the framework drastically at the moment but would probably prove useful in the long run. This currently includes a new folder structure (#115), possibly API-changes to conform to the C# framework guidelines like encapsulation and naming conventions, aswell as possibly a style overhaul to conform to the autoformatting of VS.

Folder Structure

Folder structure is vital for newbies to understand the structure of the framework better and to get an idea where to search for features and what classes do. The currently proposed folder structure changes are as follows:

Update: Applied in b6f12a8a !

Guideline-conforming API

API changes would increase consistency throughout this and other frameworks. The C# framework design guidelines as proposed by Microsoft can be found here. One of the key concepts includes encapsulation. Currently, this is barely present in the Node Editor Framework, but may be important now that it get's so popular. This change would also include naming changes, but existing saves could be kept compatible by using the FormerlySerializedAs attribute.

Styling and autoformatting

Styling has been a bit of a problem before. Some people use VS and it's default autoformatting likes to mess up the style used throughout the project, and thus commits directly taking from VS will result in major styling changes, obscurring the real code changes. This includes tabs converted to spaces, spaces added/removed between method name and parantheses and elsewhere, etc. While I prefer to keep tabs as the indenting option (as they are the esiest and most flexible), the other autoformat differences are easy to adapt to and would fix alot of style problems with initial commits which change existing source files. Or, we could keep the existing style but enforce it in every file. Currently, it's unsure whethe the styling is completely consistent as I personally use no autoformat and commits by other contributors have not been checked for consistend styling either afaik. This change is not completely necessary though and has to be discussed.

Seneral commented 7 years ago

Update: Folder restructure has been applied in b6f12a8!