Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should I use express for future projects? #3913

Closed
laoshaw opened this issue Mar 21, 2019 · 47 comments
Closed

should I use express for future projects? #3913

laoshaw opened this issue Mar 21, 2019 · 47 comments

Comments

@laoshaw
Copy link

laoshaw commented Mar 21, 2019

express was the most promising web server for node.js, it seems the development has been slowing down considerably for the last few years, as of today ES6 is not added, no async/await work in sight either, this is quite a surprise considering the (still) fast advancements on frontend frameworks, node.js and javascript. What is going on?

Maybe it's time for a fundraise to re-ignite the development for this great project? or is there something else replacing it so nobody cares that much? or node.js framework is losing its popularity in general after some over-hyper?

Really want to see a django alike framework in node.js.

@dougwilson
Copy link
Contributor

I'll prefix my response with: ultimately, the decision is up to you; I'm not really going to try and beg for you use to Express :)

As far as the comments, there is a lot to distill, and without you providing examples, it is really hard to know if what you're asking for is (a) already available for preview in the latest Express 5 alpha (b) is not available but on our roadmap or (c) has never been brought up until just now.

If you're willing to, it would be awesome if you could expand on each of the items you're looking for to exist, articulate exactly what you mean by them and what it would look like for it to exist in the framework, so we can get a common understanding of what, for example "as of today ES6 is not added" even means. The version of ES you use in your code is unrelated to the underlying library at a generic level, so getting specifics here on what this means would help us provide a better answer.

@Bharatbisht
Copy link

in what version we can see the support of es6 in express

@dougwilson
Copy link
Contributor

Hi @Bharatbisht thanks for bring this up. Every day I write my Express apps in ES6+, so not really sure what exactly you're referring to when you say "[...] can we see the support of es6 in express". Without you providing examples, it is really hard to know if what you're asking for is (a) already available for preview in the latest Express 5 alpha (b) is not available but on our roadmap or (c) has never been brought up until just now.

If you're willing to, it would be awesome if you could expand on your statement, articulate exactly what you mean and what it would look like for it to exist in the framework, so we can get a common understanding of what, for example "the support of es6 in express" even means. The version of ES you use in your code is unrelated to the underlying library at a generic level, so getting specifics here on what this means would help us provide a better answer.

@expressjs expressjs deleted a comment from zuohuadong Apr 11, 2019
@zuohuadong
Copy link
Contributor

zuohuadong commented Apr 11, 2019

When using ncc, there is a conflict between import and require.
Using es6 or even ts is more conducive to maintenance, even the underlying express, more people can submit PR.

@dougwilson
Copy link
Contributor

dougwilson commented Apr 11, 2019

When using ncc, there is a conflict between import and require.
Using es6 or even ts is more conducive to maintenance, even the underlying express, more people can submit PR.

Thanks for that response. I'm not following what you are saying, though. Can you expand what "using ncc" means? Perhaps some examples so I can understand?

Yes, using ES6 is something you're welcome to do, and I use it every say when writing Express.js apps in production.

@expressjs expressjs deleted a comment from zuohuadong Apr 11, 2019
@zuohuadong
Copy link
Contributor

@dougwilson

thank you for your reply.
Does express also release a new version? It has been no version for more than 5 months.

@zuohuadong
Copy link
Contributor

@dougwilson

Https://github.com/zeit/ncc

It can compile a node.js project into a js file (with dependencies).

@dougwilson
Copy link
Contributor

Yes, there is on going work for Express.js 4.17 and there is the 5.x work. What changes are you looking for to be released? I would be happy to help answer when some particular feature is going to be released or not. For example if you are waiting on a new version, there much be some feature or fix you are trying to get? If you let me know what it is I can help provide a good answer.

@zuohuadong
Copy link
Contributor

I noticed that there is a big performance boost in using this library.
https://github.com/fastify/fast-json-stringify
But I don't know how to use it in express. Can it be used as a middleware or as a default?

@dougwilson
Copy link
Contributor

Thanks for the link to ncc. It says in the readme the goal is yo support all npm modules and all patterns. Are you having an issue using it? Perhaps there is just a bug? I have never used it and so don't even know where to start. Can you provide what the specific issue you're having is and how to reproduce the cause if you think there is something the express team can help fix? We would be happy to help investigate.

@zuohuadong
Copy link
Contributor

Thanks, I will send it to you when I meet next time.

@dougwilson
Copy link
Contributor

I noticed that there is a big performance boost in using this library.
https://github.com/fastify/fast-json-stringify
But I don't know how to use it in express. Can it be used as a middleware or as a default?

I have never seen this module before and we can definitely check it out! I'm sorry I don't have answers, but I'm sadly cannot know about every possible thing out there and without anyone ever mentioning it here before, I don't know how we would have expected to know about it before.

If you would like to help investigate how we can leverage that module to take advantage, let me know, and would love to hear your thoughts on how we can incorporate new things!

@zuohuadong
Copy link
Contributor

zuohuadong commented Apr 11, 2019

I have never seen this module before and we can definitely check it out! I'm sorry I don't have answers, but I'm sadly cannot know about every possible thing out there and without anyone ever mentioning it here before, I don't know how we would have expected to know about it before.

If you would like to help investigate how we can leverage that module to take advantage, let me know, and would love to hear your thoughts on how we can incorporate new things!

Schema based: http://json-schema.org/

To some extent, you can get a free performance boost.

Express is a great project and I hope it will be active.

@dougwilson
Copy link
Contributor

I am active in Express every day, for example you got an immediate response to your question. Is that not active? What would make it "active" ? For example you say you how it becomes more active. I would like to agree, though I feel as if it is, so perhaps our definition of active just differs. If you can lay out your definitions of what it would mean to be active, that would help determine what would need to change, if anything, to meet your expectations.

@zuohuadong
Copy link
Contributor

I am active in Express every day, for example you got an immediate response to your question. Is that not active? What would make it "active" ? For example you say you how it becomes more active. I would like to agree, though I feel as if it is, so perhaps our definition of active just differs. If you can lay out your definitions of what it would mean to be active, that would help determine what would need to change, if anything, to meet your expectations.

Thank you for your answer.
I want express to have a roadmap and a quick iteration of iterations.
I noticed that 5.0 has not released the official version for 2 years.

@dougwilson
Copy link
Contributor

Absolutely! Do keep in mind a lot of work and discussion takes place in the other repos outside the main repo (this one) because express is split into many complements. For example all work and discussion around the router doesn't happen here since the router in in a separate repo.

I think those are good points and definately things that can be worked towards. You (and anyone, of course) are welcome to join in the effort! For example on the roadmap item, there is a mostly roadmap in the PRs that have a "release" tag on them. Perhaps that is not the best place for them, or you're looking for them to be different? Please elaborate on that point and so we can help meet your expectation for having a roadmap. You're welcome to even chip in to help create it, even!

For the express 5 release, the most recent version was released at the end of October, so certainly more recent than 2 years. The issues and help needed it outlined in the Express 5 PR, and if you're looking to help chip in, let me know! Our biggest gap is still there is no documentation, mainly as our doc writers had moved on in the industry so it's a large hole we still need to fill. Not having docs for Express 5 makes it very difficult to release it, since no one will even know how to use it and migrate to it, for example.

@zuohuadong
Copy link
Contributor

5.0.0-alpha.1
@dougwilson dougwilson released this on 7 Nov 2014

5.0.0-alpha.7
@dougwilson dougwilson released this on 27 Oct 2018

I am happy to help with the test, but how long does Beta/RC take?

@dougwilson
Copy link
Contributor

So are you satisfied with using the alpha 7 today? If so, we can release it now if you're satisfied!

@zuohuadong
Copy link
Contributor

Four years is enough to re-establish a framework.
If it's because of a documentation issue, can we release express 6 directly and then consider the backward compatibility issue?

@zuohuadong
Copy link
Contributor

So are you satisfied with using the alpha 7 today? If so, we can release it now if you're satisfied!

Thanks for your trust.
But I dare not try the alpha version, but I think that if it is basically stable, express should release beta so that more people can try it.

@dougwilson
Copy link
Contributor

If it's because of a documentation issue, can we release express 6 directly and then consider the backward compatibility issue?

I'm not following what this means. We can release an express 6 right after, though what would the changes that would be included in 6 vs in 5? Releases are just numbers and can be made whenever, though to make a new release ideally you'd have some kind of changes in the release. What would the backwards compatibility issue be that you're referring to?

@zuohuadong
Copy link
Contributor

zuohuadong commented Apr 11, 2019

I'm not following what this means. We can release an express 6 right after, though what would the changes that would be included in 6 vs in 5? Releases are just numbers and can be made whenever, though to make a new release ideally you'd have some kind of changes in the release. What would the backwards compatibility issue be that you're referring to?

I mean, if express 5 can't be released, then you can develop 6 directly, and consider partial backward compatibility with 4.

@dougwilson
Copy link
Contributor

But I dare not try the alpha version, but I think that if it is basically stable, express should release beta so that more people can try it.

Gotcha. So are you saying that probably why we haven't been getting feedback from anyone about Express 5 is because it says "alpha" and that if I were to just republish alpha.7 as like beta.1 people would suddenly start trying it? What does the word make the different for? Typically it's just a series like alpha, beta, gamma, delta, etc. (the greek alphabet).

@dougwilson
Copy link
Contributor

I mean, if express 5 can't be released, then you can develop 6 directly, and consider partial backward compatibility with 4.

What would keep us from releasing express 5? I guess that's what I'm not following. Perhaps we go this route and "develop 6 directly", that is fine if you think this is the right course. What does develop it directly mean, I'm not following that part. Like take the current Express 4 release and do... ?

@zuohuadong
Copy link
Contributor

Gotcha. So are you saying that probably why we haven't been getting feedback from anyone about Express 5 is because it says "alpha" and that if I were to just republish alpha.7 as like beta.1 people would suddenly start trying it? What does the word make the different for? Typically it's just a series like alpha, beta, gamma, delta, etc. (the greek alphabet).

However, each version has a different meaning, and alpha often means that the underlying API will have major changes, even major bugs.
This kind of tacit understanding is needed between developers.

@dougwilson
Copy link
Contributor

However, each version has a different meaning, and alpha often means that the underlying API will have major changes, even major bugs.
This kind of tacit understanding is needed between developers.

Gotcha. Sorry, I didn't realize. What would be the appropriate word we should publish as instead?

@zuohuadong
Copy link
Contributor

zuohuadong commented Apr 11, 2019

Gotcha. Sorry, I didn't realize. What would be the appropriate word we should publish as instead?

If the underlying API is basically stable, and there are some bugs left. I think we should release the beta version.
If the underlying API is completely stable and comes with documentation, there are only a few bugs, and we should release the RC version.

I don't know which state express is in, but for now, it's definitely not alpha.

@dougwilson
Copy link
Contributor

If the underlying API is basically stable, and there are some bugs left. I think we should release the beta version.

Ok, so it sounds like we should republish as beta.

If the underlying API is completely stable and comes with documentation, there are only a few bugs, and we should release the RC version.

So then it sound like just needs some folks to help write up the documentation and then we can release it as RC 👍

@zuohuadong
Copy link
Contributor

I'm not following what this means. We can release an express 6 right after, though what would the changes that would be included in 6 vs in 5? Releases are just numbers and can be made whenever, though to make a new release ideally you'd have some kind of changes in the release. What would the backwards compatibility issue be that you're referring to?

I have been looking forward to express 5, but if there is a problem with express 5, it is difficult to advance.
That can be directly developed express 6, it can be a new framework, no historical burden, but can be compatible with express middleware like this, and even more.
https://github.com/fastify/fastify/blob/master/docs/Middlewares.md

@dougwilson
Copy link
Contributor

I have been looking forward to express 5, but if there is a problem with express 5, it is difficult to advance.

There is no problem with express 5 that I'm aware of. If you're having a problem, definitely let us know right away and we can work to help resolve the issue you're having 👍

That can be directly developed express 6, it can be a new framework, no historical burden, but can be compatible with express middleware like this, and even more.

What can be developed as express 6? Like what features, etc.?

@zuohuadong
Copy link
Contributor

Thank you for your reply, I am from China, I have been helping nest.js to translate Chinese documents. If I can, I can help with testing and translate Chinese documents.
Express is very stable and I hope more people can use it.

@zuohuadong
Copy link
Contributor

zuohuadong commented Apr 11, 2019

What can be developed as express 6? Like what features, etc.?

  1. Performance (example: https://github.com/fastify/fast-json-stringify)
  2. Maintainability (example: typescript,es10, Consider more people to maintain and update express. )
  3. Applications in large projects.
  4. Microservices (example: gRPC \MQ)
  5. Distributed transactions

@dougwilson
Copy link
Contributor

Thank you for your reply, I am from China, I have been helping nest.js to translate Chinese documents. If I can, I can help with testing and translate Chinese documents.

Good to know. We have translations of Express docs in various languages, and writing up Express 5 docs ideally would have translations too, so as soon as there are english versions, I'll be sure to ping you to see if you want to help translate them (no obligation, of course 😄).

Express is very stable and I hope more people can use it.

Yes, that is definitely a cornerstone of Express: it is heavily relied upon in production code and we strive hard to ensure it is (and stays) stable. Of course, I'm not saying other projects do not, as I doubt they don't try to do that, as well. One part of "stability" for Express isn't just crashing, etc. but also API stability, for people to continue to use it and use it well without unnecessary API churn.

@zuohuadong
Copy link
Contributor

zuohuadong commented Apr 11, 2019

I hope that the new version of express has a lot of updates, as good as spring. Of course, it is as stable as ever.
Thank you for saying so much to me today.

@dougwilson
Copy link
Contributor

What can be developed as express 6? Like what features, etc.?

Performance
Maintainability
Applications in large projects.
Microservices
Distributed transactions

That's definitely a great list! They are pretty high level items, not really directly translatable into feature sets, though. Would you be willing to help outline help each of those items would turn into an Express feature. For example "Microservices" bullet. I know I have many "microservices" in production today written in Express 4, but being a bullet point there tell me that you feel that Express 4 cannot make microservices. What makes you say that and what would an Express API that makes microservices look like to you, for example?

Having these discussions are great and helps us align with the community and communicate the needs and wants of the users into tangible feature sets. Even if you're not able to help write the implementation directly, that is OK! There are many types of contributors to a projects, including helping contribute ideas and designs to implement towards!

I hope that the new version of express has a lot of updates, as good as spring. Of course, it is as stable as ever.
Thank you for saying so much to me today.

It's no problem! I hope you're not put off by any of this; I do want to help make Express nice and usable, and work for everyone's use-case. Having these conversations is a key contribution source for a project, as it can actually help drive changes more than simply making pull request, especially on an open forum like the issue tracker :) !

@zuohuadong
Copy link
Contributor

zuohuadong commented Apr 11, 2019

That's definitely a great list! They are pretty high level items, not really directly translatable into feature sets, though. Would you be willing to help outline help each of those items would turn into an Express feature. For example "Microservices" bullet. I know I have many "microservices" in production today written in Express 4, but being a bullet point there tell me that you feel that Express 4 cannot make microservices. What makes you say that and what would an Express API that makes microservices look like to you, for example?

I am using nest.js, which is based on express but provides a more elegant API.
For micro services, you can refer to it. It should appear in the documentation of modern express.
https://docs.nestjs.com/microservices/basics

Someone based on it nest-could, like spring cloud, but I hope to have express cloud in the future:
https://github.com/nest-cloud/nestcloud

Also, I hope to have an es6/es8 document that is more friendly to novices.
For developers of other languages, they don't need to know the callbacks, just use async/await directly.

Express is not only a web framework, but also a backend framework.

Example: Game server, embedded, hardware cloud platform, software cloud platform, microservices....

@zuohuadong
Copy link
Contributor

zuohuadong commented Apr 11, 2019

I will try to write it as a feature set. Where should I write?

@RamirezAlex
Copy link

RamirezAlex commented Apr 16, 2019

@dougwilson I am willing to help putting the documentation of Express 5 together, but I might need some guidance/kickstart because this would be my first contribution to a major OSS project like this. Is there something I can start reading? Thanks.

@ElianCordoba
Copy link

ElianCordoba commented Apr 19, 2019

@dougwilson thanks for your amazing work! Express is a great piece of software. @zuohuadong I'll recommend you using fastify, it has a similar API and has releases regularly.

@dougwilson
Copy link
Contributor

@RamirezAlex the general flow we need to do (and you can help out on) is (1) copy the 4.x docs to be 5.x on the website repo (https://github.com/expressjs/expressjs.com), (2) go though each entry in the 5.x change log (https://github.com/expressjs/express/blob/5.0/History.md) and edit the new 5.x docs to be in line with the change made.

I would create a master list and tracking issue in the expressjs.com repo to track the progress as well.

@RamirezAlex
Copy link

RamirezAlex commented Apr 19, 2019

Thank you @dougwilson that sounds like a good starting point. forking the repos...

@o-t-w

This comment has been minimized.

@wesleytodd

This comment has been minimized.

@RamirezAlex

This comment has been minimized.

@wesleytodd

This comment has been minimized.

@Tzahile
Copy link

Tzahile commented Feb 5, 2020

Hi, any update on this?
The thread was last active almost a year ago, and last approved PR was 9 months ago..

7 hours ago an issue was published with all the outdated / deprecated dependencies express uses (#4171).

I don't know much about the impact, but I'm afraid it can put express users in some potential risks

@dougwilson
Copy link
Contributor

There are a lot of updates in various issues all around the repos. Ultimately you should always choose what works best for you. An opened-ended question is going to be hard to accurately answer, but if you want to ask a very specific question here, I can definately answer it to the best of my ability. This thread did run it's course, though, so doesn't need to remain open.

lease note that express is made up of dozens of repos, so the activity on just a single repo (like this one) is not the full story of activity in express itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants