Our Customers often have Requirements for some small WebProjects, to integrate in our EnterpriseEnviroment. Currently I create those Apps with ASP.NET WebForms or MVC but this Technology often feels a little bit to heavy for this kind of purpose.
I really don´t know much about node.js, only that it scales very well and is good for having a lot of concurrent connections.
So I've asked myself:
Is node.js suitable for small Projects ?
Do I have any advantages for a small Project?
Am I right that it´s more lightweight than ASP.NET WebForms/MVC
How is the node.js support for WindowsServer? Or should I setup a LinuxBox for it?
How is the Database support in node.js ?
Does it support direct DB-Connection to MSSQL-Server?
Or is it better to get my Data from a WebService?
I know that node.js is only server-side and you can´t really compare it 100% with something like ASP.NET WebForms/MVC
Is node.js suitable for small Projects ?
Yes.
Do I have any advantages for a small Project?
Very lightweight, very modular, easy to install.
Am I right that it´s more lightweight than ASP.NET WebForms/MVC
Enormously so.
How is the node.js support for WindowsServer? Or should I setup a LinuxBox for it?
It works OK on Windows. It would probably suffice to install a Linux shell.
How is the Database support in node.js ?
Beautiful.
Does it support direct DB-Connection to MSSQL-Server?
Yes, I believe it does.
Or is it better to get my Data from a WebService?
"Better" is kind of vague, but for a very small project, simplicity is generally the key, so no.
Related
I have a few questions regarding some popular web frameworks. I can find pros and cons about all the frameworks, but which fits best regarding theese criteria:
The website needs to be as secure as possible. It will need a lot of real-time feautures, an own mobile app (native or hybrid, with notifications) and the application will also run a lot of background processes.
Django has some nice security features included, but suits bad for mobile development. The solution is then probably making a completely RESTful API tougheter with Angular and Ionic, but doesn't you loose most of Django's built in security solutions? Will it then be just as safe using a Node framework like Express, and manually escape user input, and manually prevent database injection? Will a good user authentication system then be equal as much work?
In addition, will it be painful to mix synchronous and asynchronous programing using Django channels to implement websockets and real-time features. I don't have any experience using Django channels, but I really likes the simplicity of Socket IO together with Express. Even if it can be challenging to program asynchronous in a Node environment, will it be just as hard using Django channels at the end? And since Django is a full framework, will you after a while have to rewrite a lot of the inbuilt classes and functions? Is it still easier than using Flask with Flask SocketIo? Will it be a good idea to use Python for background jobs beside the Node environment?
I know there already exists enough framework vs framework questions, but i would appreciate any advice and experiences.
Just go ahead and use the socketio in node or flask it is much more adviceable than using the socketio libary in Django.
I'm seriously considering moving from Python to Node.js- the holy grail is within reach....but I do still love Django's Admin interface. Is anyone aware of a new framework that attempts to bring to Node.js what Django did for Python?
Django, as you probably already know, was meant to provide developers with a fully-featured web framework, capable of "building apps fast and with less code". To achieve that, Django makes a lot of assumptions for you; it decides what ORM to use, what templating engine to use, etc.
Node, on the other hand, is not a web framework, but a platform. It is so thin that you have more freedom deciding how to do things. The idea here is that there is not a single way of doing things.
Now, to answer your question, express is one of many frameworks that try to bring Node to a higher level. It is nowhere close to Django in terms of features, but you can find plenty of pluggable libraries to do what you want. In your case, you can find a very nice admin interface here: https://github.com/wearefractal/smog
As stated in the title, I would like to know if it's safe to develop a website using one of the actuals "omg" platforms that are Node.js and Ringo.js at their actual version.
Also, I would like to know if they support cookies/sessions and how do they deals with multi-fields post (fieldname[] in PHP).
Thank you
--Edit--
Thanks for all the links guys.
What can you tell me about Ringojs ?
Since I haven't figured which platform to start playing with. I must admit that the fact it can use Java seamlessly really impress me. The only available XSLT 2.0 library is in Java. I could use it as a templating system.
Is there anyone who had the chance to play with Ringojs?
From my experience using both, Ringo is more stable and "safer" for production use but you can comfortably deploy both. In addition to the ability to wrap existing Java libraries that you mention, you also get the benefit of being able to run it in an existing webapp container which manages the lifecycle of the application for you and ensures its availability.
That being said, it doesn't have to be an either or decision. By using my common-node package and assuming you don't use any Java libraries, it's perfectly feasible to maintain a project that runs on both without any changes to the code.
I've also included benchmarks that test the performance of Node.js vs. RingoJS the results of which you can find in the common-node/README.md. To summarize: RingoJS has slightly lower throughput than Node.js, but much lower variance in response times while using six times the RAM with default Java settings. The latter can be tweaked and brought down to as little as twice the memory usage of Node with e.g. my ringo-sunserver but at the expense of decreased performance.
Node.js is stable, so yes it's safe to use. Node.js is capable of handling cookies, sessions, and multiple fields but are not as easy to manage. Web frameworks solve this problem.
I recommend Express.js, it's an open-source web framework for Node.js which handles all of this and more.
You can download it here:
https://github.com/visionmedia/express
I hope this helped!
Examples of some of the bigger sites running Node.js
https://www.learnboost.com/
http://ge.tt/
https://gomockingbird.com/
https://secured.milewise.com/
http://voxer.com/
https://www.yammer.com/
http://cloud9ide.com/
http://beta.etherpad.org/
http://loggly.com/
http://wordsquared.com/
Yes. It is. https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node and https://github.com/joyent/node/wiki/modules
cookies/sessions/forms etc http://expressjs.com/ makes it easier
Ringojs is a framework developed by Hannes Wallnöver and uses rhino as it's scripting framework. There are webframeworks, templating-engines, orm-packages and many many more things already available. Have a look at the tutorial featuring a good subset of packages you may use for a simple web-application. It's not too long and straightforward.
Even thought some of those packages used within the tutorial (e.g. ringo-sqlstore]) are marked as 0.8 and come with the hint "consider this being beta" they are already very stable and bugs - if you find one - get fixed or commented on very fast.
And the power of uncountable java-libraries out there is at your fingertips - so if you already have java-knowledge this knowledge isn't wasted. Rhino - the scripting-engine - even enables you to implement interfaces and extend classes. It is possible a little more advanced but i've done it and i know of packages taking advantage of such features (like ringo-ftpserver which is a wrapper around Apache FtpServer written in java)
Another pro for me is - because ringojs is based on java - it works fairly well with multithreading with ringo/worker for example.
I have just began working with node.js and have gotten the hang of the basics.
Right now I'm trying to see if I can create my very first real-time web application using node, during my research I have seen modules like "express.js" and "socket.io' pop up very often as frameworks used for node web apps.
My question is; do I really need to learn these two in order to make real-time production level node.js applications?
Also, what other things should I look at? I heard about tempting engines being an asset, but 'm not sure of their use.
You don't need to use any modules but you give up a lot when you don't. Express.js is a great place to start. It has good documentation and makes the whole process much easier. I use jade and stylus for my css and templates.
Socket.io is again optional but if you are doing real-time updates it sure makes things a lot simpler. Socket.io deals with all of the browser differences with one api and the client will always connect using the fastest technology.
Socket.IO is mandatory for real-time applications. If you have to implement a chat, a broker, a server status tool or something like that and other natural real app, you must consider use this Node package. If your site do not require something real-time bi-directional message handler you just avoid the usage of this tool.
In case of all application needs to be made in real-time situation, you can see a more appropriate framework to approach it, like Meteor
Node.js can be used for servers which are not web related. For example, this IRC server.
What kind of performance can I expect from Node.js in a non-web server role?
Is Node.js a good choice to build a general-purpose (non-web) server?
is it a good way to build a server of
something non-web related?
Yes. Its strength is in DIRT applications (data intensive, real time).
I would like to know the real
perfomance of Node.js
What does this mean? In what context? This is too vague a way to approach performance of any type. You need specific goals in mind for a project, and then you can judge what tool is right for the job.
It looks likes some people already used it for non-web application:
http://www.heatsynclabs.org/boutduinode-a-pool-party-with-arduino-node-js-and-an-rc-boat/
https://github.com/brianlovesdata/node-serialport
Hope this help