Express.io

For discussions about game development that does not fit in any of the other topics.
Post Reply
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Express.io

Post by Jackolantern »

I just stumbled across something I have been wanting for quite some time. I had settled on Sails.js because it was a web framework that merged Socket.io into it, but there was a lot of bloat I really wasn't interested in. Now I found this: Express.io! It is a combination of Express, the most popular web framework for node, and Socket.io. You get joined sessions (something I fought to create myself, and isn't that elegant to do), joined routes, etc., right on top of Express. You can drop-in your own ORM, such as Mongoose or whatever else you want to use. The unopinionated nature of Express has always been one of its main benefits to me. This could be very useful for realtime PBBGs!

EDIT: And Express.io is compatible with existing Express apps. You can just get Express.io through NPM and change the require('express') to require('express.io') to upgrade.
The indelible lord of tl;dr
User avatar
Ark
Posts: 427
Joined: Wed Jun 01, 2011 10:25 pm

Re: Express.io

Post by Ark »

This is awesome, still haven't tried but looks good. I tried once to combine socket.io with express and wasn't easy, this seems so much easier. Nice finding thanks.
Orgullo Catracho
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Express.io

Post by Jackolantern »

No problem! Sadly, it doesn't have much documentation. However, it does have a nice pile of examples.
The indelible lord of tl;dr
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Express.io

Post by hallsofvallhalla »

I was just reading into Sails and express itself last week. Will have to check this out. Thanks!
tourmaline
Posts: 34
Joined: Thu Mar 20, 2014 9:43 pm

Re: Express.io

Post by tourmaline »

This looks interesting from my limited exposure to node.

Question about all this nodeness:

I choose software/libraries/tools/enhancements based on the probability that will will remain active and supported long term. Throughout my reading, it seems something new and different has popped up every 10 minutes (not literally of course) in the worls of node.js. Does it matter if a node addition is well supported long term?

This applies to many areas; github in general even. How many great ideas on github started with a bang, and now sit for years without an update? It's all quite scary. It seems to me, if you are going to contribute something that has the potential to affect many people, your project should be vetted in some way - to guarantee a commitment level and reduce the chances of a fly-by-night product.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Express.io

Post by Jackolantern »

I understand, and there are some issues there. However, I think sites like github kind of vet themselves. You are baring your soul to the developer world when you upload your source for anyone to peruse through in their browser. The better projects get starred, forked and get more contributors. The more average projects fade into obscurity.

As far as node goes, yes things are popping-up all the time and it can seem intimidating to be jumping in. I felt the same way when I started. Even with node's amazing adoption rates, it isn't the mature platform with a decade+ usage like some others. While node itself is quite stable these days, it represented quite a radical shift in the way things were done, so people's minds are still bursting with new ideas on how to do old tasks and even new things never tackled before.

Having said that, the "core" packages that remain the most popular on node are very stable, highly supported, and aren't going anywhere anytime soon. Even if the core teams were to disappear tomorrow, the source is out there and so many people depend on these packages that a new, able team would immediately step in to carry the torch. Check out the main npm page. Look at the "Most Starred" projects (the numbers are low because people don't typically use npm through the web interface, which is the only UI that allows starring; they use it through the npm application, so probably multiply all those numbers by 1000). Those are the core packages used day-in and day-out by many Fortune 500 companies: Express, async, request, Grunt, Socket.io, Mocha, Lodash, Underscore, Mongoose, Jade, etc. There are probably more you could lump in there as well, such as EJS. Even with all the new, full-stack web frameworks that have come out, Express is still on top and likely always will be, since the bigger frameworks all have Express as a dependency. Same with Socket.io. About a year or more back, Now.js was making waves, but all that did was make Socket.io even more important since it is a dependency of Now.js (Now.js has since fizzled out and their backing company went bankrupt due to an unrelated deal, but that is another conversation lol).

I say just use what you find useful. These packages aren't binaries, and you have the source code to make whatever changes you may need, so as long as it suits your needs today, I would say you are fine. And like I mentioned, those core packages aren't going anywhere anytime soon. :cool:
The indelible lord of tl;dr
Post Reply

Return to “General Development”