Giter Site home page Giter Site logo

Comments (26)

pixelknitter avatar pixelknitter commented on June 10, 2024

@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.

CrabDude avatar CrabDude commented on June 10, 2024

There're 3 guidelines.

  1. 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)
  2. 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.
  3. 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.

CrabDude avatar CrabDude commented on June 10, 2024

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.

  1. 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)
  2. 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.
  3. 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.

pixelknitter avatar pixelknitter commented on June 10, 2024

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.

CrabDude avatar CrabDude commented on June 10, 2024

What did you have in mind to put in there ("Further Reading" or "Next Step")?

from nodejs_guides.

pixelknitter avatar pixelknitter commented on June 10, 2024

Current Headers

  • Overview
  • Generate Your Project
  • Create Hello World
  • Improving Your Project Environment
  • Next Steps

(more a reference to other guides)

  1. View Rendering Engines
  2. Create Your First Test
  3. Debugging

from nodejs_guides.

pixelknitter avatar pixelknitter commented on June 10, 2024

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.

CrabDude avatar CrabDude commented on June 10, 2024

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.

pixelknitter avatar pixelknitter commented on June 10, 2024

Haha, yeah, I wasn't gonna start off with yoeman. That definitely gets a bit gritty. :)

from nodejs_guides.

pixelknitter avatar pixelknitter commented on June 10, 2024

@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.

CrabDude avatar CrabDude commented on June 10, 2024

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.

pixelknitter avatar pixelknitter commented on June 10, 2024

@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.

CrabDude avatar CrabDude commented on June 10, 2024

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.

pixelknitter avatar pixelknitter commented on June 10, 2024

@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.

CrabDude avatar CrabDude commented on June 10, 2024

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-Project

Let me know if you have any suggestions.


Reply to this email directly or view it on GitHub
#5 (comment)
.

from nodejs_guides.

pixelknitter avatar pixelknitter commented on June 10, 2024

@CrabDude Where can I put an image of the Hello World result?

from nodejs_guides.

CrabDude avatar CrabDude commented on June 10, 2024

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.

pixelknitter avatar pixelknitter commented on June 10, 2024

@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.

CrabDude avatar CrabDude commented on June 10, 2024

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.

pixelknitter avatar pixelknitter commented on June 10, 2024

No worries! :)

from nodejs_guides.

CrabDude avatar CrabDude commented on June 10, 2024

Looks good. Can you:

  1. Update all the code samples to use the corresponding syntax highlighting (node, bash, javascript (for JSON to allow comments)):
```node

\```
  1. The default generator renders "Hello Express" not "Hello World", could you confirm and update the image accordingly.
  2. It also does not have an index.js but app.js instead
  3. The hello world route should be added somewhere in routes/, not app.js
  4. Provide a small blurb about the difference b/w bin/www and app.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.

pixelknitter avatar pixelknitter commented on June 10, 2024

@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.

pixelknitter avatar pixelknitter commented on June 10, 2024

fixed the links.

from nodejs_guides.

pixelknitter avatar pixelknitter commented on June 10, 2024

@CrabDude I have a few thoughts on 2-4:

  1. got it
  2. "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.
  3. The generator actually creates both index.js and app.js (the index.js is within the /routes/ directory).
  4. I've modified the "Create Hello World" section to explicitly call out that we're now working in the /routes/ directory.

from nodejs_guides.

pixelknitter avatar pixelknitter commented on June 10, 2024

Review the latest and let me know what you think. Specifically the following sections:

  1. Create Hello World
  2. Configuration Scripts

Everything else were minor fixes to the broken links.

from nodejs_guides.

CrabDude avatar CrabDude commented on June 10, 2024

LGTM. Thanks.

from nodejs_guides.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.