Node-PerfectAPI vs Restify.js vs ExpressJS vs Node-APIServer [closed] - node.js

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm new to ExpressJS. I want to create API's for my service which will be consumed directly by other servers and also a part of it by mobile apps/browsers. I just discovered Restify, Node-PerfectAPI, Node-APIServer and I don't know what the differences are.
Can someone kindly elaborate on the differences of each framework and the advantages/disadvantages.
Why would one choose Express/NodeJS vs. Other Frameworks for creating API'S?

Disclaimer: I am the author of node-perfectapi.
The focus of perfectapi is to make it simple for the developer to go from start to production-ready. It is more abstracted than node-restify. The impact of that is you have less flexibility in the design of your API, but at the same time, you should be able to get something production-ready much quicker, with less expertise.
Both restify and perfectapi have comparable performance.
The links in this answer go to pages that highlight the benefits of each solution.

I'm also working on a similar issue. One of the main difference that may interest you is the performance. I just found a blog post from the developer of "perfect-api" comparing his framework to the 2 others. http://blog.perfectapi.com/2012/benchmarking-apis-using-perfectapi-vs-express.js-vs-restify.js/
A comment states that Restify is doing much better now.
From my (limited) experience, I would say that express.js is easier to use than Restify and provides some nice tools as connect.js which is exposed. For example, this will avoid you the pain of writing a static file server even thought Connect can still be integrated with Restify.
On the other hand, Restify will make some common API tasks much easier. For example, it provides a throttle engine along with an API conversioning system which is really necessary in an environment where you deal with clients you do not control.

You should also consider https://npmjs.org/package/hapi
It looks very promising. There's a talk about the framework in https://www.youtube.com/watch?v=Recv7vR8ZlA where the main contributor to hapi talks about what makes an API framework tick.

If you go to node-perfectapi in github you'll see this message in the readme:
"I am not currently maintaining this package. You should probably look for another tool for what you need."
Therefore I conclude you are better off using restify since this is actively maintained.

Related

Is Marko framework active? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I've looked a the Marko framework from eBay, and it looks very promising. Actually pretty awesome. But the activity around the project seems very quiet. No videos, presentations etc on youtube the last year, very few if any component/UI collections etc. I see there are a few commits on github and smaller upgrades, but other than that the buzz around the project seems very quiet.
Few places to get help other than a single forum that seams nearly vacant. I've tried to get help on a few questions, but with no luck.
Is this a framework worth looking into at this time? Anybody know of any new major version coming up soon?
One of the core Marko maintainers here.
Thanks for the question. I know it is one that has been asked a few times now in the Marko community.
Here is a portion of one of my responses to this in our gitter chatroom.
Marko is still under development. We are currently working
hard on making migration tooling to help many teams at eBay upgrade to
the latest version of Marko. We are also laying the ground work for
faster migrations and upgrades in the future. In tandem we are looking
at what Marko 5 will look like and the main experiment around that is
happening in https://github.com/marko-js/x. The TLDR of it is to
switch our compiler to piggy back off of babel which will allow us to
do many things including: Sourcemap support, es module/modern js
output, support for modern js inside Marko templates (eg async
generators), support for other syntaxes supported by babel including
typescript and many other smaller features. It will also allow us to
drastically reduce the size of our compiler and move much faster in
the future. We do not currently have a timeline on this but have made
good progress. Thanks for your patience!
To further answer your questions:
Yes, the community is small. This is a hard problem to solve. Our current plan to help us increase adoption is to both simplify the language, making it easier to learn, and to make integrations with other tools easier. At the same time we are working to modernize and simplify the codebase to hopefully make it easier for others to contribute.
The best place to chat is the gitter chatroom mentioned above. It's quiet at times, and we can't always help quickly, but we try our best.
Finally the last question is tricky as it depends on what you are building. Marko is heavily optimized for server side rendering which is important for us. On this front there are many features not found in other frameworks including split components and true streaming rendering with out of order flushing. One of the other benefits of Marko is that (since we have full control over the language and it's output) there is very little boiler plate and we are able to do optimizations not possible in most other frameworks.
I think at this very point in time Marko is a bit behind its peers on the integration and community front which can make adoption hard. We do plan on taking a more coordinated effort at addressing this though in the near future.

What kind of apps can be built using node.js other than real time apps (like chat or multiplayer gaming) [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Is node.js is only for real time applications like chat or multiplayer games? I know little bit of PHP, Python and ASP.
But I love JS the most. But I am interested in building particular type of application such as-
Content based app (like CMS, forums or community sites)
Utility tools (web2pdf converter, image editing or other frequently used tools)
Business tools (SEO analysis tools etc)
Is node.js only for real time applications??
Edit 0- Can you please give examples of node apps other than real time applications
Edit 1 : can node be used for IO operations or serve static pages over http. Isn't it just another web technology like PHP or ASP.NET
Edit 2 : What can node do that PHP can't. Also anything that PHP can and Node can't.
Node.js is useful for any application that does not involve CPU-bound work.
Node.js is basically just javascript, including the asynchronous aspect of javascript, running outside of the browser. The basic framework it comes with allows you to setup a server really easily, and that's what most people use it for, although it can do most things any other server side language can do (File IO, Networking, Multithreading, etc).
Node.js can be used for most applications, as it's expandable via modules, and has a great developer community. You can see the different companies who use it at http://nodejs.org/industry/.
Some great tutorials can be found by Googling node + the type of project you want to build and you can also find a list of resources in the Readme of their github https://github.com/joyent/node. After you feel comfortable with node, then browse some github node.js repositories, and figure out which modules you want to work with to make your project. Then keep learning!
Javascript is a great language, and node.js is an awesome technology. Good luck!
Node.js is farmost, one of the best technology of its kind. You can build anything out of Node.js, scaling from realtime applications to normal websites. But what makes Node.js standalone from crowd, is its way of handling users request and response. In simple term Node.js come into play when there is lods and lods of traffic coming into your website.

Node.js beginner questions [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have been really playing with node.js alot here lately. I really like it and would like to get serious about building a site that I have in mind with it. There are just a few things that I had questions on. I am currently using express, cluster, mongoose(mongodb), and dust because it seems like the community is doing pretty well with this setup.
The first question that I have run into is making changes in the app. If I change one of the files in my app (with the exception of templates), I have to restart the app in order for the changes to show up. Is there something out there that will do this automatically or is there something I am missing?
The second question I have is, are there any really good resources out there that anyone can recommend. Seems like alot of the stuff that I have found through google just explains one topic and there are not alot of books on it yet(see some good ones releasing this year though). I was wondering if there was a really good resource for node applications (really interested in how people are structuring there applications and what they are using).
The third question or really feedback I would like to get is what good node modules should I be looking into using for my application. I really like cluster and running apache benchmarks with it versus without it I saw a double in the number of requests it could handle when using all 4 cores versus just the single core. I want to try and keep my code so that I dont have to write the logic twice for the backend / frontend which is why i have decided to use dust as my templating choice.
The last thing that I would like to know is based on an article that I read by linkedin (http://engineering.linkedin.com/frontend/leaving-jsps-dust-moving-linkedin-dustjs-client-side-templates). After reading this article I was just impressed by the ingenuity that they came up with to do this. I see many benefits from this by saving bandwidth on the server from not having to server process the files each time and letting the users browser do the load. It also will allow for less bandwidth throughput by not sending the whole template to the browser every time and caching it. But I am just stumped as to how they accomplished this. Can someone please shine some light on this subject or if you know of a good article that explains how to do this it would be great. I dont know for sure I would use this implementation but I would love to know how to do in case it is applicable.
Thanks for any feedback.
First question:
Actualy there are multiple tools that do the job starting from nodemon to supervisor
Second question:
Learning materials
videos: nodetuts
books: from node beginner and more books
podcast: nodeup
alot of great bloggers: laurenzo | Peteris Krumins about usefull nodejs modules | dailyjs and many more
grouped modules: toolbox.no.de (for unknown reason not working now)
Not to forget nodejs docs. Also browsing github and reading source for great nodejs modules or apps can be quite good for learning.
Third question:
i think my Second question answer includes this one also.

Is node.js ready for medium/big business web application? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I work on studying the development of a medium web application intended for hotlines. So I've real time, concurent access, big datamodel and CTI constraints.
Originaly I'm a php and Java EE developper, but like many of us, I've read a lot of news about node.js and I tested it with small apps. The possibilities of node.js are awesome, but I felt that it's very difficult to only use this technology in a medium/big web app. Indeed frameworks like express are minimalistic compared to productive framework like symfony, play or ROR, etc. Moreover, the node.js ecosystem progresses very fast and might be difficult to maintain.
I'm not experienced enough in nodejs, so I want to know; is choosing only node.js to develop a medium/big business web app with some real time problematics crazy or not? Don't you think that coupling a productive framework with nodejs only for specific features (real time) is a better way ?
Thanks,
Regards
Eric
I'm working on a large real-time business web app that requires some real-time interaction and what we are doing is using django for just about everything, and handling the real-time stuff using the now.js library. Originally we planned on using node.js for everything, but to alleviate some time constraints, we decided it would be quicker to use django.
One thing we have noticed since we've started is that there are a lot of changes, and that some of these changes break what we've done. For the most part, keeping up with the changes hasn't really made it difficult to maintain, however it has made it difficult to follow tutorials and such.
I'm going to answer this quickly, before the question is closed for only being answerable via opinions, not facts.
So, I'm going to answer with my opinion ;)
I think node.js's focus currently is on building small things that respond very quickly. I sense a lot of pushback in the node community against "too complicated abstractions". (It's possible I'm misreading the community, but I don't think so).
To me, building a business app (example: some of my past Rails projects have been 10ish man years) I want an ORM abstraction layer, etc. I think you'd want this building even an app with more than a few man-months of effort in it.
Unless something changes (the node community runs into problems when their code bases grow too large, for example) I suspect the "place" for node.js in medium to big applications is for small hyper responsive things (websockets, retrieving data from external sources and doing small things with it), etc.... not for building an entire big business workflow app.
It's 2016. Recently I decided to go with Sails / Node instead of CakePHP. Today I decided to go back to CakePHP. Lucky enough, I just coded one small module ( kinda of indexing inside a db some filesystem content ). The amount of callbacks and promises It's just annoying to me. The simple task of getting a file's metadata, searching it on Postgres, creating the record only if it doesn't exists, take me more than 20 lines of code and I almost have to drink a bottle of Dramamine lol
This time I am highly determinated to maintain an extreme layer's separation. So my front-end is fully static html/js/css, coded in Angular. Postgres DB also don't require any changes. And CakePHP 3 is almost factory's ready to easily serve json/xml.
Also there's a possibility of me being somehow stupid... lol

If you had to redo a site that has 150 tables and 250,000 visitors/day in any web platform, what would it be? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
If you had to redo a site that has around 150 tables and 250,000+ visitors/day in any web platform, what would your choice be and why?
Some points
The team has experienced developers
The old application is written in unrefactored PHP. It's unusable.
Much of the database is not normalized, and there are columns in the wrong spots. Many new features and the database can't support them now.
Desired goals:
Excellent and fast testing (grails is bad for this)
Good seperation of concerns (domain, controllers, views) with ability to not duplicate anything
Concise code & Elegant design - no code bloat
Flexible - we don't want to run into a leaky abstraction problem
Coding and testing are fast - it shouldn't take 1 hour to write a controller test, or we shouldn't have to spend more than 1 minute or so writing a reusable tag, for example.
Scala is on our minds, but we are having a hard time seeing how that can work as the tooling is not mature yet. We actually don't like Grails. A lot of us are used to Java/Spring/Hibernate, but are sick of the low-level nature of it and want something more expressive.
I would put together a detailed study group to analyze our choices, and see what we can use, and how it scales up to the load and tasks it must stand up to. After that, pick out like the top 5 choices for closer inspection, and see what floats with the team. Personally, I've come to like RoR over PHP.
Depending on the status of the old/current project, make sure everything is backed up and version controlled before it gets touched. Some people leave half their project un-vcs'd, or use none at all!
This is a pretty unanswerable question, because there a large number of factors that need to be taken into consideration which you haven't mentioned. For example, what are the skill sets of the developers who will be rewriting it? How is it currently implemented? Can existing code be reused? What are the performance requirements?
If it was my decision, I would choose Groovy/Grails because:
I like Groovy/Grails and know these technologies well
Offers good performance as it's built mostly on Java and mature Java libraries like Spring and Hibernate
Update
Excellent and fast testing (grails is bad for this)
I am not aware of any web framework that puts more effort into testability into Grails. It makes testing all types of artifacts (controllers, domains, services, tag libraries) very straightforward.
We actually don't like Grails
If you already know Java, Spring, and Hibernate, I find it very hard to understand why you don't like Grails.
good old php / mysql / apache on a linux environment is the most stable I've seen .I'm working since 3 year on a Asp.Net / SQL Server / IIS / Windows and only SQL server is stable, but it's really expensive so if you don't know really where you're going (about money), you better have to take care of this parameter.
And on an open environment you'll find more help, I think.

Resources