News for hackers. Stuff that matters.
Re:Jam - The JavaScript package manager by MatthewPhillips on Monday June 18, 2012 @12:57PM (#4127351)
Why does your server code and your UI code share the same base directory?
Re:Jam - The JavaScript package manager by prezjordan on Monday June 18, 2012 @03:40PM (#4128111)
What exactly is wrong with that? In Rails, you have app/controllers and app/views. UI code and server code sharing the same base directory.
Re:Jam - The JavaScript package manager by bendemott on Monday June 18, 2012 @04:05PM (#4128217)
Does seem potentially problematic if you don't want to be exposing server-logic. Especially when the developer may not know what software will be ultimately serving the static files over http.
Re:Jam - The JavaScript package manager by prezjordan on Monday June 18, 2012 @05:52PM (#4128786)
As a newbie webdev, what would you suggest? Making an API-based web application? (the backend would serve and receive JSON and the front-end would simply play around with it) Or am I completely misunderstanding this.
Re:Jam - The JavaScript package manager by MatthewPhillips on Monday June 18, 2012 @07:34PM (#4129168)
That's a reasonable way to build an application, and one that I personally prefer, but there isn't a silver bullet. But if you're building a Node app your server js and your client js don't need to commingle. Make a src/js/client directory, and stick your package.json in there (if you want to use this tool).
Re:Jam - The JavaScript package manager by NinetyNine on Tuesday June 19, 2012 @03:51AM (#4130712)
Socketstream is a framework in active development based on exactly that idea.
Re:Jam - The JavaScript package manager by MatthewPhillips on Monday June 18, 2012 @07:32PM (#4129151)
The grandparent was talking about Node, which doesn't tell you how to organize directories like Rails.