Did Google use Node.js in their 2011 IO Example Reader App? - node.js

In reference to the mobile web app newsreader seen in: http://www.youtube.com/watch?v=vV85dNeGRhY
I'm making something similar, and I'm enthused by the growing buzz around Node. It's just that I can't wrap my head around it. I'm very close to abandoning ideals of a server running Node entirely until I have much more experience with JS under my belt, but I feel bad doing it.
On one hand, it's critical to have a quick and responsive app and apparently Node helps in that department, but on the other hand, I'm not going to have an app at all if I keep getting stuck reading tutorial after tutorial. I've come across a few decent copy/pasteable installation guides, but I feel bad doing stuff like that because I have no idea what is actually taking place, and I feel like I'll just end up creating an insecure application while also guaranteeing maintenance nightmares down the line that I have no idea how to deal with.
If Google didn't feel the need to use Node on their reader app, it would make me feel a lot better in my decision.

Related

how stable is AirBnB node.js rendr?

I wanted to know if anyone has been using AirBnB Rendr and is it stable and ok to use in commercial projects or is it still changing a lot?
I'm developing a website which can run both client and server based, this mean I need to be able to render pages and widgets server and client based.
The server is running Node.js, dust.js and has custom server based code to render the pages and widgets on the server side. I need to pick how to handle it on the client side.
Naturally I want to try and not repeat code, but obviously the client is different I can:
Keep my current page based server rendering and develop custom
client side code.
Use backbone.js on client side and keep my server based code the
same.
Use AirBnB rendr that is based on Node.js and backbone to use the
same code on client and o server. AirBnB Rendr Library
I like the 3rd idea very much, but I'm looking for some input from you guys.
Has anyone used it? any experience with it in terms of stability and/or how often their api changes etc?
I've just started playing around with Rendr. If I ignore the learning curve and oboarding friction, I like it a lot and I plan to write my next large production app using Rendr.
Unfortunately, as bababa listed above, the documentation needs a lot of work. There is an explanation of how Rendr works in its README and the example app's README but beyond that you'll need to source dive in order to figure out how the gears are turning. Currently, there is no forum for questions (other than stack overflow :D) and I've had a hard time figuring out its idioms on my own.
Despite all the struggles, I finally see the light and I'm starting to understand why Rendr is so powerful.
tl;dr - If you're willing to source dive and figure out your own workflow, I would suggest using Rendr. Otherwise, I would recommend going old school by writing a traditional client app with a more mature library. (is it too early to say that? =X)
Well given AirBnb is a successful commercial enterprise, there's some validation that the library works well enough for them. This question is probably best answered by watching their github commit log for breaking changes. Given backbone is 1.0 and essentially stable at this point, rendr will probably quickly stabilize, but honestly your fear of instability is probably unjustified. I think rendr looks compelling and although my current project is using a very similar home-grown solution, I would consider using rendr in a future project or even porting our code to rendr. "Stability" per say is much less important to the web development community compared to other situations like packaged or embedded software.
I used (tried to use) and Rendr on a project and gave up. There are just to many limitations (currently) and the lack of documentation doesn't help. I ended up need to rewrite the source code to accomplish some things I would consider trivial with other frameworks, such as passing multiple collections to a view. It just wasn't possible (at the time I used it) and that was a deal breaker. Not being able to pass a collection of categories and results to a page was to much of a limitation.
I have no doubt it will eventually be ready for production use, but right now I would say unless you are an engineer at AirBnb and know how to hack the source then no, it's not ready.
If you really want to know if it will work for your needs, take a look at the issue list on github. That will give you a good idea where the projects at.

Start with node.js as a complete server-side newbie?

My main question is whether it makes sense to begin with node.js as a complete server-side newb. Is JS/node.js a good choice to start server-side web-programming from scratch?
I do lots of frontend work, namely HTML, CSS and basic JS. I even wanted to start with Rails but always had the feeling that not knowing what is going on behind the curtains makes me completely uncertain about the framework - it was just too much "convention over configuration".
My hope is to learn JS in general and dive into node.js right after that. I don't know, however, if this is a good approach for a person without any server-side experience. When looking at existing node.js topics and discussions, the used terminology seems to require lots of knowledge about how servers work in general.
Have no fear. Programming is all about practice and you will do mistake while writing code. But, that is how we all have learnt. Whether it is Ruby, Javascript (via Node.js), or any other language: certain aspects of programming are common and you will get familiar with things specific to that particular language over time. Being not able to remember a syntax or convention is OK. Just have reference material on your side. In fact it is encouraged to tinker and experience "let's see what happens ?" moments. This is how you learn, IMHO.
Node.js is indeed a great choice to start learning server side web development. No doubt about that. You don't have to learn Javascript first and then start learning node. Here you can find all the resources you may want. Also, have a look at this How do I get started with Node.js
Here is what I would recommend as your learning path. This is not even node.js 101. But, it will be a great start.
Hello World on console. Dead simple and lot of fun
Math Addition. ( Nothing to do with server development, can skip, but good if you learn it ! )
Addition of hard coded inputs.
Addition where function add(a,b) is written in another .js file. Boy, now you are creating libraries !
Math addition where input is provided using command line. TIP: Use https://github.com/substack/node-optimist
Hello World on web page.
Hello World for web but without express.js to start with. Here is the code - http://nodejs.org/
Hello World for web with http://expressjs.com/.
Adding some dynamism to the response. e.g Saying what time of day it is.
Responding based on the URL paths and query string.
Serving static files such as images and css.
After completing this many tasks you will be good enough to decide what next you want to do.

Development Platform for Small application

I will soon be developing an application to log and priorities worker shifts. It only needs to be small, and simple, but I am wondering what framework to use. All that needs to happen is boxes with names are in 3 lists, and the user can switch these around at will. It must log the times, which I will need access to in real time.
Im new to application development of this sort, and would like any suggestions. I have time to learn new technologies / languages.
Portability / device independence would also be useful. Should I consider a Web Application in Javascript? or something more like Python.
Thanks.
Even if your application is going to be simple that does not mean that whole system will be simple too. I can imagine that your app will serve only as a front end to something much bigger. If that is a case and you really have freedom to choose what language you will develop your app with consider choosing something that you will feel comfortable to work with. But before you will make your decision I would go to whoever gave you that task and try to get as much information about it as you can because expected features can help in choosing technology.
First of all, it seems that it is up to you to decide if it should be web or desktop app. In my opinion it is completely wrong situation. You should get clear requirements on what kind of application customer expects and in what environment it should work. And I would not move a finger towards a code before somebody gave me that information. You write that portability and device independence would be useful but is it actual requirement or you just think it would be nice feature to deliver?
EDITED (to answer a question in comment)
Probably there is as much possible solutions as people that would answer you so in the end you will have to make your own choices.
One way of doing it (considering that you want to learn something new and have a challenge :) would be implement WCF service that would act as a data provider from your database (so every GetUsers(), GetVacationDays() methods would be in it) and it would take care of some business logic (for example CalculateMaxValidWorkingTime() or whatever). That service would be a real power horse of your system. Since you don't have clear requirement whether it should be desktop or web app you could satisfy both possibilities by creating thin clients that would communicate with your service and they would be just a pretty front ends. And if you keep in mind that you can consume webservices practically with everything from C++ to .NET (C#/VB) to Javascript to Python to PHP after you done with service you would not be constrained with one particular technology/language.
Regarding databases I won't advice because personally I hate dealing with them and it always was somebody else's task to provide me with pretty API :)

Node express now

I want to rewrite a complete community website in nodejs,express and
nowjs with mongodb. Its currently in php using the codeigniter
framework. It includes functionality such as your own profile page,
photoalbum, guestbook, internal messages, contacts and more. And im
going to add an im to it and some other things like a forum and so on.
Its a pretty big project.
I have to make a decision about which techniques to use in the
webapplication. So i did a little research and found, node, Expess and
nowjs.
Should i stick to finish the application in php( codeigniter ), mysql
and ajax, or can i do this in express, mongodb and nowjs?
Can anyone recommend this for use on a live production site? And if
so, are there any security issues one should know about? General
guidelines?
Help would be really appreciated so i can make up my mind and finish
the project
Regards
George
The problem with Nodejs being young is not that it's a half baked product or something but infact it's growing very fast and new developments are being done at breath taking place. So you need to keep up with them while developing.
Otherwise there are huge projects out there developed totally with node and express. Take a look at expressjs.com/applications to see what kind of commericial projects are built using it.
As far as security, sessions etc. are concerned. Unlike ASP/PHP , you don't get most of the features out of the box. You'll need to either write them yourselves or using open source frameworks. Both ways you and only you have to ensure that your application has all bases covered. With flexibility, comes complexity.
It should be noted that Nodejs is optimum for real time I/O. If you think this is something which is required at your end then I highly recommend to go for it.
What you describe does sound like a big project.
If you have the time to spare, I would suggest picking a small portion of it that deals with managing secure sessions (e.g. the profile page). Implement that in Express to get a sense of how it compares to the existing PHP. If you like it, keep going.
Particularly when security is at stake, always try to use existing components when they are available. Node's minimalism makes it tempting to 'roll your own,' but it's very easy to make a security mistake with anything less than expert knowledge.

Node.js Web Application examples/tutorials [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
So I finished watching Douglas Crockford's excellent series on Javascript, and in the final episode (so far), loopage he lays out why Node.js is a near perfect solution for server side code.
He talks about keeping state, not in the database, but in closures running in Node.js, he also states that templating systems (like JSP, PHP, and ASP) are a poor abstraction for more complicated Web Applications and that node.js provides a solution to this.
And I am ready to buy in, but I can't find any examples of Web Applications using this pattern, or any books or tutorials about how to go about doing this. I am not talking about a simple application, but something that would use the patterns that Crockford spoke of in his talk. Anyone know where I can find some tutorials/examples of Web Applications written in Node.js (and yes I know about Geddy and ExpressJs, but they don't seem to follow the radically different patterns that Crockford was speaking of, and were more like getting a Railsy experience on Node.js).
[Note from 3 years in the future: It seems like Express, Geddy, Sails, Kraken et all are re-implementations of the Rails/Symfony/Spring frameworks from Ruby/PHP/Java. Whereas things like Hoodie and Meteor are attempts at a whole new paradigm. KOA looks interesting, but is a ways away from being usable, but looks like it is building on the strengths of javascript with the history of MVC applications of the past. 3 years on and it is still exciting times for Nodejs, even if it is no longer the new hotness. At least there are a lot of real world examples of Node in use now...
I would suggest you check out the various tutorials that are coming out lately. My current fav is:
http://nodetuts.com/
Hope this helps.
The Node Knockout competition wrapped up recently, and many of the submissions are available on github. The competition site doesn't appear to be working right now, but I'm sure you could Google up a few entries to check out.
DailyJS has a good tutorial (long series of 24 posts) that walks you through all the aspects of building a notepad app (including all the possible extras).
Heres an overview of the tutorial: http://dailyjs.com/2010/11/01/node-tutorial/
And heres a link to all the posts: http://dailyjs.com/tags.html#nodepad
Update
Dav Glass from Yahoo has given a talk at YuiConf2010 in November which is now available in Video from.
He shows to great extend how one can use YUI3 to render out widgets on the server side an make them work with GET requests when JS is disabled, or just make them work normally when it's active.
He also shows examples of how to use server side DOM to apply style sheets before rendering and other cool stuff.
The demos can be found on his GitHub Account.
The part that's missing IMO to make this really awesome, is some kind of underlying storage of the widget state. So that one can visit the page without JavaScript and everything works as expected, then they turn JS on and now the widget have the same state as before but work without page reloading, then throw in some saving to the server + WebSockets to sync between multiple open browser.... and the next generation of unobtrusive and gracefully degrading ARIA's is born.
Original Answer
Well go ahead and built it yourself then.
Seriously, 90% of all WebApps out there work fine with a REST approach, of course you could do magical things like superior user tracking, tracking of downloads in real time, checking which parts of videos are being watched etc.
One problem is scalability, as soon as you have more then 1 Node process, many (but not all) of the benefits of having the data stored between requests go away, so you have to make sure that clients always hit the same process. And even then, bigger things will yet again need a database layer.
Node.js isn't the solution to everything, I'm sure people will build really great stuff in the future, but that needs some time, right now many are just porting stuff over to Node to get things going.
What (IMHO) makes Node.js so great, is the fact that it streamlines the Development process, you have to write less code, it works perfectly with JSON, you loose all that context switching.
I mainly did gaming experiments so far, but I can for sure say that there will be many cool multi player (or even MMO) things in the future, that use both HTML5 and Node.js.
Node.js is still gaining traction, it's not even near to the RoR Hype some years ago (just take a look at the Node.js tag here on SO, hardly 4-5 questions a day).
Rome (or RoR) wasn't built over night, and neither will Node.js be.
Node.js has all the potential it needs, but people are still trying things out, so I'd suggest you to join them :)
The closest thing is likely Dav Glass's experimental work using node.js, express and YUI3. Basically, he explains how YUI3 is used to render markup on the server side, then sent to the client where binding to event and data occurs. The beauty is YUI3 is used as-is on both the client and the server. Makes a lot of sense. The one big issue is there is not yet a production ready server-side DOM library.
screencast

Resources