Comments (26)
@CrabDude
I've compiled some good information for an in-depth (and concise) project setup, but I'm wondering if there's certain opinions we should express or avoid.
For instance, using https://github.com/steveukx/hogan-middleware versus hjs. Based upon the guidelines I'd imagine the use of generators is fine, starting with the default for express is a good start, no?
from nodejs_guides.
There're 3 guidelines.
- Base recommendations of projects that have >80% coverage in the
community (express, passport) or will eventually (es6 => babel, promises,
async/await). Anything that falls into this category will be the default
for code samples unless specifically teaching a subject that involves
alternatives (like the Control-flow guide talking about callbacks and
generators) - Recommending alternatives in name & link only when pertinent. (E.g., see
the Prework's mention of express alternatives). Even in the Rendering
guide, I think it's probably best to avoid code samples for alternative
rendering engines because there are just so many. Likewise, short of having
a specific guide for large alternatives like hapi, I think it's best to
altogether avoid code samples for alternative frameworks as links to their
documentation should typically suffice. While this is mostly gray, let's
fair on the side of conciseness and focus with links to alternatives so as
not to overwhelm. - Utility libraries or project choices. These are used for convenience,
with no clear "best". Examples include bluebird, bluebird-nodeify, bcrypt,
mongoose, etc... There are many alternative A+ compliant promise libraries,
as there are many alternative ORMS, rendering engines, configuration tools
or logging frameworks. There's no real rule on when to mention alternatives
here per say, but with the node.js ecosystem being what it is with its
explosion of diversity of packages, I try not to overwhelm.
So in answer to your question, yes, we assume express (>80%) and
async/await (>80% eventually as an idiomatic language construct) and
mention generators/bluebird.coroutine in name and link only, unless in the
control-flow guide.
For Hogan, I would add a link in the project setup like the following:
(See the [Rendering Guide](...) for a list of recommended rendering engines)
and then in the Rendering Guide have a section toward the bottom
with a list of links to rendering engines (can be sorted by popularity) an
a max 1 sentence description.
Cheers,
Adam
On Monday, April 27, 2015, Edward Freeman [email protected] wrote:
@CrabDude https://github.com/CrabDude
I've compiled some good information for an in-depth (and concise) project
setup, but I'm wondering if there's certain opinions we should express or
avoid.For instance, using https://github.com/steveukx/hogan-middleware versus
hjs. Based upon the guidelines I'd imagine the use of generators is fine,
starting with the default for express is a good start, no?—
Reply to this email directly or view it on GitHub
#5 (comment)
.
from nodejs_guides.
I added a more concise version of the above to the "Contributing
Guidelines" Guide
https://github.com/codepath/nodejs_guides/wiki/Contributing-Guidelines#code-samples--package-recommendations
.
Cheers,
Adam
On Mon, Apr 27, 2015 at 11:51 AM, Adam Crabtree [email protected]
wrote:
There're 3 guidelines.
- Base recommendations of projects that have >80% coverage in the
community (express, passport) or will eventually (es6 => babel, promises,
async/await). Anything that falls into this category will be the default
for code samples unless specifically teaching a subject that involves
alternatives (like the Control-flow guide talking about callbacks and
generators)- Recommending alternatives in name & link only when pertinent. (E.g.,
see the Prework's mention of express alternatives). Even in the Rendering
guide, I think it's probably best to avoid code samples for alternative
rendering engines because there are just so many. Likewise, short of having
a specific guide for large alternatives like hapi, I think it's best to
altogether avoid code samples for alternative frameworks as links to their
documentation should typically suffice. While this is mostly gray, let's
fair on the side of conciseness and focus with links to alternatives so as
not to overwhelm.- Utility libraries or project choices. These are used for convenience,
with no clear "best". Examples include bluebird, bluebird-nodeify, bcrypt,
mongoose, etc... There are many alternative A+ compliant promise libraries,
as there are many alternative ORMS, rendering engines, configuration tools
or logging frameworks. There's no real rule on when to mention alternatives
here per say, but with the node.js ecosystem being what it is with its
explosion of diversity of packages, I try not to overwhelm.So in answer to your question, yes, we assume express (>80%) and
async/await (>80% eventually as an idiomatic language construct) and
mention generators/bluebird.coroutine in name and link only, unless in the
control-flow guide.For Hogan, I would add a link in the project setup like the following:
(See the [Rendering Guide](...) for a list of recommended rendering engines)
and then in the Rendering Guide have a section toward the bottom
with a list of links to rendering engines (can be sorted by popularity) an
a max 1 sentence description.Cheers,
AdamOn Monday, April 27, 2015, Edward Freeman [email protected]
wrote:@CrabDude https://github.com/CrabDude
I've compiled some good information for an in-depth (and concise) project
setup, but I'm wondering if there's certain opinions we should express or
avoid.For instance, using https://github.com/steveukx/hogan-middleware versus
hjs. Based upon the guidelines I'd imagine the use of generators is fine,
starting with the default for express is a good start, no?—
Reply to this email directly or view it on GitHub
#5 (comment)
.
from nodejs_guides.
Thanks Adam, that clears things up a bit for me. Also makes sense, I was thinking that some of the content I was putting together might be better off splitting into a new guide with more completeness and a reference to it in this guide as a "Further Reading" or "Next Step".
from nodejs_guides.
What did you have in mind to put in there ("Further Reading" or "Next Step")?
from nodejs_guides.
Current Headers
- Overview
- Generate Your Project
- Create Hello World
- Improving Your Project Environment
- Next Steps
(more a reference to other guides)
- View Rendering Engines
- Create Your First Test
- Debugging
from nodejs_guides.
Right now, I'm using the express generator for simplicity and to save time. Then explaining what gets created. Though the Express generator docs does some of this.
from nodejs_guides.
Sounds good. The express generator is good. It's very common and doesn't
require getting into the nitty gritty of yoeman, and generators.
On Mon, Apr 27, 2015 at 5:01 PM, Edward Freeman [email protected]
wrote:
Right now, I'm using the express generator for simplicity and to save
time. Then explaining what gets created. Though the Express generator docs
does some of this.—
Reply to this email directly or view it on GitHub
#5 (comment)
.
from nodejs_guides.
Haha, yeah, I wasn't gonna start off with yoeman. That definitely gets a bit gritty. :)
from nodejs_guides.
@CrabDude finishing up with this one. Had a little hiccup once I went through and realized that I would need to introduce routes (briefly) with the generator. Good to start splitting things up but makes it little heavier. Need to spend some time rehashing the flow. Hope to have it done by tomorrow morning at the latest.
from nodejs_guides.
Excellent. Thanks for the update.
On Mon, Apr 27, 2015 at 9:48 PM, Edward Freeman [email protected]
wrote:
@CrabDude https://github.com/CrabDude finishing up with this one. Had a
little hiccup once I went through and realized that I would need to
introduce routes (briefly) with the generator. Good to start splitting
things up but makes it little heavier. Need to spend some time rehashing
the flow. Hope to have it done by tomorrow morning at the latest.—
Reply to this email directly or view it on GitHub
#5 (comment)
.
from nodejs_guides.
@CrabDude Want me to post it a little early with some TODOs so you can give feedback now? Or wait until I get a first draft that's complete?
from nodejs_guides.
Tomorrow's fine.
On Mon, Apr 27, 2015 at 9:49 PM, Edward Freeman [email protected]
wrote:
Want me to post it a little early so you can give feedback now? Or wait
until I get a first draft that's complete? I can always TODO the section I
have finished.—
Reply to this email directly or view it on GitHub
#5 (comment)
.
from nodejs_guides.
@CrabDude I've posted v1 of the guide here: https://github.com/codepath/nodejs_guides/wiki/New-Express-Project
Let me know if you have any suggestions.
from nodejs_guides.
Will do.
On Tuesday, April 28, 2015, Edward Freeman [email protected] wrote:
@CrabDude https://github.com/CrabDude I've posted v1 of the guide here:
https://github.com/codepath/nodejs_guides/wiki/New-Express-ProjectLet me know if you have any suggestions.
—
Reply to this email directly or view it on GitHub
#5 (comment)
.
from nodejs_guides.
@CrabDude Where can I put an image of the Hello World result?
from nodejs_guides.
Imgur
On Tuesday, April 28, 2015, Edward Freeman [email protected] wrote:
@CrabDude https://github.com/CrabDude Where can I put an image of the
Hello World result?—
Reply to this email directly or view it on GitHub
#5 (comment)
.
from nodejs_guides.
@CrabDude any feedback? Want to make sure I'm using the right format and such before I head into a second one.
from nodejs_guides.
Sorry, will get to this this weekend.
On Friday, May 1, 2015, Edward Freeman [email protected] wrote:
@CrabDude https://github.com/CrabDude any feedback?
—
Reply to this email directly or view it on GitHub
#5 (comment)
.
from nodejs_guides.
No worries! :)
from nodejs_guides.
Looks good. Can you:
- Update all the code samples to use the corresponding syntax highlighting (
node
,bash
,javascript
(for JSON to allow comments)):
```node
\```
- The default generator renders "Hello Express" not "Hello World", could you confirm and update the image accordingly.
- It also does not have an
index.js
butapp.js
instead - The hello world route should be added somewhere in
routes/
, notapp.js
- Provide a small blurb about the difference b/w
bin/www
andapp.js
Thanks. Sorry for taking so long to get around to looking at this. Will update with more after the above is complete.
from nodejs_guides.
@CrabDude thanks for the feedback. I noticed you made some changes to the references, the links throughout the guide however got broken. Want me to fix those as well?
from nodejs_guides.
fixed the links.
from nodejs_guides.
@CrabDude I have a few thoughts on 2-4:
- got it
- "Hello Express" is the default, I intended to have them change that. Do you think that's too much depth? Under the "Create Hello World" section I've modified it perhaps to make it more clear.
- The generator actually creates both index.js and app.js (the index.js is within the
/routes/
directory). - I've modified the "Create Hello World" section to explicitly call out that we're now working in the
/routes/
directory.
from nodejs_guides.
Review the latest and let me know what you think. Specifically the following sections:
- Create Hello World
- Configuration Scripts
Everything else were minor fixes to the broken links.
from nodejs_guides.
LGTM. Thanks.
from nodejs_guides.
Related Issues (20)
- Master List: Cliffnote Topic Requests
- Debugging
- Package Recommendations HOT 3
- Express & Middleware HOT 3
- Filesystem HOT 5
- JavaScript: Inheritance
- JavaScript: Basics HOT 28
- Design Patterns
- Server Error on Auth HOT 1
- Project Generator/Workflow Guide HOT 3
- Improve Javascript/Node markdown syntax highlighting HOT 1
- Streams
- why is the android robo in the reame HOT 1
- Control-flow
- Troubleshooting
- CLI HOT 6
- Things to Know HOT 2
- Babel HOT 2
- Modules & Packages HOT 4
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 nodejs_guides.