Coder Social home page Coder Social logo

Comments/description in the code about frame HOT 6 CLOSED

jedireza avatar jedireza commented on August 27, 2024
Comments/description in the code

from frame.

Comments (6)

jedireza avatar jedireza commented on August 27, 2024

@chacliff thanks for opening an issue. Although we probably won't add comments throughout the code, it is a good idea to address this stuff via guides on the wiki.

from frame.

chacliff avatar chacliff commented on August 27, 2024

yes that would be very helpful, then the project could be considered tutorial material. Disecting your project and jumping back and forth between the api references and your project has been fun, but speeding up the process would be appreciated.

from frame.

jedireza avatar jedireza commented on August 27, 2024

I was going to close this issue but maybe we could take this as an opportunity to outline the things we should document. Would you be willing to share about your experience going between the api references and this project? What things would make that a smoother process?

from frame.

chacliff avatar chacliff commented on August 27, 2024

as nasty as they are, inline comments would be nice or a description at the top of each document no matter how trivial. That's just generally speaking, I never did figure out how your authentication worked. I tried to implement it myself in a similar fashion. Your directory structure make sense, but maybe explain why you chose to make everything an individual plugin as apposed to making a singular file of routes and sending to controller files. Maybe just adding to the wiki a documentation of the whole thought process on the design would be a good idea too. I'm not sure i ever completely wrapped my head around it. Its like you made reusable plugins that you never planned to reuse. Maybe i never ended up getting a deep enough understanding to know the true purpose.

from frame.

wle8300 avatar wle8300 commented on August 27, 2024

@chacliff Express and Hapi are different animals. If you're coming from Express, I would recommend acting like you're a n00b to NodeJS and start at the top of http://hapijs.com, read the "Getting started," "Tutorials," and read (several!) online guides to building simplistic Hapi 8 apps. Build whatever they tell you to. Note: follow Hapi 8 tutorials only. The previous Hapis are gonna confuse you.

Hapi doesn't really dictate how you organize a project really. They leave it up to you... but this isn't to say that there are some Hapi-esque conventions. To address what you mentioned, yes, routes (by convention) are displaced into what Hapi calls "plugins." Forget their buzzword, it's just plain 'ole controllers ultimately.

Other unusual things you'll notice is that all modules that are require'd in Hapi are capitalized. There are a handful of these quirks that a Hapi 8 developer should be familiar with. You can find a brief layout of these kinda things written by the project maintainer (Eran Hammer): https://gist.github.com/hueniverse/a06f6315ea736ed1b46d

from frame.

jedireza avatar jedireza commented on August 27, 2024

Closing for now. The hapi docs are great and the reference I use.

from frame.

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.