Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Web application development workflow with Node.js and Git (gelnior.wordpress.com)
87 points by gelnior on Jan 3, 2012 | hide | past | favorite | 15 comments


Hmm...I normally start with backend and do the UI last, since the backend it's then easier to add features on a whim.

Is it common practise to do the UI first in some parts? Does this not cause problems when certain features get dropped?


Before doing BDD, like you I was working on backend first. Since I experiment BDD, when I work on backend, I have switched my mind from "what could be useful ?" to "what is really needed ?". Writing UI first helps me to find the answer.

I am not sure that writing UI first is a common practice, but it fits good with development of web application which relies a lot on UI.


Why do you emphasize Git in the HN link? It seems you use several key technologies for the demo - Backbone, Coffeescript, etc. Git is just a VCS, so why did you feel it necessary to emphasize it?


I emphasize it because Git changed a lot my workflow since I use it. Before that I was a SVN user and I commit only once I finished a feature (or sometimes several features...) and I almost never did any branching either. Perhaps that saying DVCS instead of Git would have been better.


I don't have anything against Git, but it just appeared irrelevant to the listing of technologies you used for the actual coding.

You could have branches with SVN too, by the way. And commit often. But you've switched to Git already, that's good. Stay there :)


I appreciated the explanation of how he uses git in a workflow. Everyone does things differently and DVCS is not just "another VCS". Treating git like you would treat svn is a recipe for heartache.


Awesome! I have been looking for some best practices for merging all of these toolsets. One thing that continues to escape me, however, is building a succinct directory structure for JS applications? I cannot seem to wrap my mind around the exports idea...


Have you explored the base web application that express will create for you? If you just run the command "express foo", it'll create a starting point for you to look at. I usually create additional directories and .js files inside of the routes directory. I use them for name spacing and organizing my files pretty much. Then, in the index.js file I export them, so you end up with something like routes.auth.signin, routes.auth.signup, etc.


Yes, I had the same problem. Ponyo (example application) code on github can give you some hints, I tried to make things clean and as light as possible. https://github.com/gelnior/ponyo

For client-only JS applications, have a look at Brunch framework. It is really good to structure your app (Ponyo client side is based on it). http://brunch.io/


UI first: also called "top-down" design.


https://github.com/gelnior/ponyo npm install coffeescript

should it be : npm install coffee-script?


Thank you, README is good now.


need add one more line: npm install stylus

plus, as a quick test, it did not work for me, i.e. after I enter a category, then press 'add', nothing happened.


Did you install mongodb ?


you're right, now it works. thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: