facebookarchive / nuclide

An open IDE for web and native mobile development, built on top of Atom
https://nuclide.io
Other
7.79k stars 683 forks source link

[Open Source Contribution Request] New Project Wizard #815

Open rageandqq opened 7 years ago

rageandqq commented 7 years ago

Preamble

Hey Nuclide Team!

For those of you that don't know, I'm studying Software Engineering at the University of Waterloo. One of the courses we're taking (SE 390) requires students to participate in an external open source project. I've continued using Nuclide for non-Facebook related work, and would love to work on adding useful features to Nuclide.

After discussing potential ideas with @jgebhardt, we determined that a New Project Wizard would be a great possibility for an open source contribution to Nuclide. Facebook developers tend to work on existing repositories, whereas a major use case for non-Facebook developers is to quickly create a new project to start working on it. This doesn't make sense for a Facebook engineer to create, but would have huge impact on open source adoption for Nuclide. A project like this could (for example) improve Flow usage and just generally provide an easy mechanism for a starter template to be created for projects in different languages, frameworks, etc.

I figured I'd create a GitHub issue to help keep track of the progress of the project and also allow for feedback both from contributors and Nuclide members.

Description

Here is a snippet of the file posted to our class' shared repository.

Nuclide is the de-facto Integrated Development Environment (IDE) used at Facebook, Inc. It is an open-source project built as a collection of packages on top of Github's "Atom" text editor that give it IDE-like functionality. This includes tooling support for remote development and source control, as well as special language considerations for Hack/PHP, React Native, and JavaScript.

Most developers at Facebook work on pre-existing codebases. For the most part, there is no necessity to create a new repository. For this reason, no effort has been placed into supporting functionality allowing new projects to be created within the IDE.

Our objective is to create an extensible "New Project" wizard, allowing users to create a new templated project with starter code. This would be extensible, allowing other users and Nuclide developers to define "templates" for projects, allowing for different customizable project types. This would greatly benefit open source usage of Nuclide and could be used to boost usage and awareness of features like Flow, a static type system for JavaScript with amazing Nuclide support (really, click-through definitions, a class/method outline view, autocompletion, and more!) and Babel, a JavaScript transpiler. Both of these usually require some setup that could easily be automated by the new project wizard.

As of posting (October 16th, 2016) to an internal forum within our class, there are 9 students (including me!) who have expressed interest in this project.

Project Goals

Every student on the team will ideally contribute 8 hours a week. Aiming for about 3-4 students contributing to the project, this leaves us with about 70-80 solid hours of work!


Once the team working on this project is decided and the full idea has been scoped out, we'll post an update here as we begin working on a fork, and try to keep the team up to date with the progress of the project.

Please add your thoughts and additional ideas for improvements to this post!
Any feedback is good feedback :)

bottledwalter commented 7 years ago

Great idea! I believe @jgebhardt is working with you on this so I'll just chime in with a few thoughts :)

I think a good specific use case would be integration with the very new and already quite popular "Create React App": https://github.com/facebookincubator/create-react-app

This is an example where the project files are dynamically created. So it's a good example of where static template formats will not work with a potentially important use case. React Native's cli (e.g. react-native init for new RN projects) is another example.

My perspective is that you can support both static template and dynamically-generated projects by structuring the new project wizard to be pluggable. So you have different providers for the different types of new file/project wizards, e.g. one for "Create React App" and one for a static template format.

And the design of the API that supports the pluggability is informed by exploring both types of wizards. You could start off by looking at creating a provider for "Create React App", since that's already a proven/working system. And then for bonus points, explore a provider for the static template format (e.g. new React component files, new Xcode projects, etc). That could help ensure you are supporting a broad set of "new wizard" use cases.