Live data from Hacker News

Show HN: Server.js – A modern Express alternative

serverjs.io

111–120 of 124 posts

Re: Show HN: Server.js – A modern Express alternative

#111
post #80

Earlier quoted context omitted.

Yes but not with the "just work" part

what's the part that "just" does not work? I am starting a new project soon and I played with Sails. I really liked it, except I struggled with the user authentication part. Also worried that the momentum of the project seems to have slowed down a bit, Mike does a lot but seems a bit lonely... Or?

The problem with Sails is that unlike Rails or Django, it's not very popular. This not only means a lot less documentation and help for you but also help for the maintainer (financial or code-wise). This means a slow rate of development, bug fixes, and updates.

I do agree with another poster in that if you want a opinionated just works stack, use Ruby or Python.

Re: Show HN: Server.js – A modern Express alternative

#112

Earlier quoted context omitted.

Why not? Figuring out DB access, session storage, i18n, etc. is not core to my business. Why not abstract that into a framework, and let engineers focus on solving their business needs?

Most of the things you mention are already solved in several useful and applicable to different situations methods in JS anyhow. Mega-frameworks are, in my experience, one of the biggest sources of encouraging Bad Practices just because their the favorite idiom of the developers. Rails is infamous for this. Node (and JavaScript) already has a big enough problem encouraging good code practices that a Rails framework w…

It's a double edge sword. With so much freedom, there is a high chance an inexperienced dev can wreck your project before it even begins.

Re: Show HN: Server.js – A modern Express alternative

#113

It is built on top of express to keep all of the good things, but it adds basic middleware and some more advanced functionality like websockets through socket.io and security through helmet by default. It is designed to work perfectly with Promises and async/await, the new ES7 features that makes asynchronous code awesome. Also, I put a lot of work into making the documentation extensive and clear and I'll keep worki…

Why socket.io instead of just plain websockets? Socket.io adds a lot of complexity in the client and the server. What commensurate benefit does it provide? http://caniuse.com/#feat=websockets

>Why socket.io instead of just plain websockets? Socket.io adds a lot of complexity in the client and the server. What commensurate benefit does it provide?

The real reasoning is browser support. Socket.io supports automatic fallback to AJAX long polling if the client doesn't support websockets. It also standardizes the interface across clients. It's essentially to websockets what jQuery is to the DOM.

Re: Show HN: Server.js – A modern Express alternative

#115
post #32

Rather than changing express's syntax, I would much rather have a better express boilerplate generator with an opinionated stack with good documentation/justification. I recently started learning express/node and wasted weeks googling for blog posts for each dependency to figure out how to configure them. I guess this is somewhat valuable for end-to-end understanding but not for productivity. There are a bunch depend…

Good list to ponder trade off Node js Express packages , all in one place !!!!! > But still a bunch that I haven't gotten to googling and still need to decide on what to choose: logging (morgan vs winston) validation (express-validator, joi) auth (passport jwt, local, social) session storage (redis vs keeping it in database?) database (mongo/mongoose vs pg/knex/bookshelf/sequelize, graphql) storage (s3 vs gcs) ajax r…

For those who don't have too too much time to spend comparing stacks, looking at download trends is sometimes a decent heuristic for weeding out which you might not want to throw into a production system yet. Shameless plug for a site I made to help visualize that

logging - morgan vs winston - popularities seem similar, although winston has a bit of a lead: https://npmcharts.com/compare/morgan,winston

validation - express-validator vs joi - joi no question: https://npmcharts.com/compare/express-validator,joi

SQL ORMs - sequelize and knex were neck and neck for a while, but sequelize seems to have pulled ahead in the last couple months. bookshelf is way behind. https://npmcharts.com/compare/knex,bookshelf,sequelize

Re: Show HN: Server.js – A modern Express alternative

#116

It is built on top of express to keep all of the good things, but it adds basic middleware and some more advanced functionality like websockets through socket.io and security through helmet by default. It is designed to work perfectly with Promises and async/await, the new ES7 features that makes asynchronous code awesome. Also, I put a lot of work into making the documentation extensive and clear and I'll keep worki…

Why socket.io instead of just plain websockets? Socket.io adds a lot of complexity in the client and the server. What commensurate benefit does it provide? http://caniuse.com/#feat=websockets

For one, it has message_id ackbacks so that you can have a request/response rpc style system. A basic feature for any websocket-heavy application.

    socket.send('login', [uname, pass], (err) => ...)
And there are socket-io clients for most languages that can interop with a socket-io server, once again supporting message_id callbacks.

Reconciling my own message_id + reconnect buffer system is not something I want to build on the client + server every time I build an application.

People talk shit about socket.io and then never recommend an alternative that implements this fundamental feature. Without message_ids, I get flashbacks to working with IMAP.

Re: Show HN: Server.js – A modern Express alternative

#118
post #32

Rather than changing express's syntax, I would much rather have a better express boilerplate generator with an opinionated stack with good documentation/justification. I recently started learning express/node and wasted weeks googling for blog posts for each dependency to figure out how to configure them. I guess this is somewhat valuable for end-to-end understanding but not for productivity. There are a bunch depend…

Yeah, I have a similar feeling.

At this point I have a repo that I keep somewhat up to date and then fork the repo for any new projects.

Every time I start a new express app I feel like I'm working at the 'wrong level of abstraction' to put it in Dan Abramov's words about the React ecosystem. I end up writing the same boilerplate over and over.

The only solution I have is a bare bones repo that I keep up to date myself. Not a great solution, but it's a solution.

Re: Show HN: Server.js – A modern Express alternative

#119

Earlier quoted context omitted.

Most of the things you mention are already solved in several useful and applicable to different situations methods in JS anyhow. Mega-frameworks are, in my experience, one of the biggest sources of encouraging Bad Practices just because their the favorite idiom of the developers. Rails is infamous for this. Node (and JavaScript) already has a big enough problem encouraging good code practices that a Rails framework w…

It's a double edge sword. With so much freedom, there is a high chance an inexperienced dev can wreck your project before it even begins.

Bingo! I've seen things go wrong with Backbone. The lack of opinion is great if you have an experienced developer starting the project and defining the filesystem layout and overall architecture. We, unfortunately, did not have that for our marketing site. I actively avoid working on our marketing site for this very reason.

Re: Show HN: Server.js – A modern Express alternative

#120

Earlier quoted context omitted.

Most of the things you mention are already solved in several useful and applicable to different situations methods in JS anyhow. Mega-frameworks are, in my experience, one of the biggest sources of encouraging Bad Practices just because their the favorite idiom of the developers. Rails is infamous for this. Node (and JavaScript) already has a big enough problem encouraging good code practices that a Rails framework w…

It's a double edge sword. With so much freedom, there is a high chance an inexperienced dev can wreck your project before it even begins.

That's true even with the large framework though. Rails does very little to protect against that and can make many things worse.
Post reply on HN