105 points · by Dekku · 13y ago · 103 comments
I can't wait to see how Sails evolves, they are some damn good dev's.
Whilst getting in to Node from Rails (& Meteor) I've found the lack of backend, structured MVC frustrating. Apparently it's not 'Nodey' to make a big framework like Rails, but I'd rather figure that out myself in due course rather than using Express and having no idea what to do after the trivial stuff you see in tutorials…
I've now written a couple of production apps with Meteor but it always feels like I'm writing frontend JS with a magical backend (and a couple of server methods) ala Parse, rather than building apps with Node.
sudo npm -g install sails
Why do so many projects require sudo? Why are we writing to any area which would require root write privileges? Why do we not default to just writing stuff in to user home directories and patching off that?
Possibly naive question, but one which is increasingly bugging me.
Without the -g option sudo is usually not required.
npm install sails
This command would store the libs in ./node_modules directory [1].
[1] http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-in...
"-g" ist for global installations and you want a "-l" for user local installation.
Local is the default state. If you want to force non-globalness, you can do `--no-global`
./configure --prefix=/home/user/local
Which should install into your ~/local directory after running 'make && make install'. # Create a new user
http://localhost:1337/user/create?name=Fisslewick
(or send an HTTP POST to http://localhost:1337/user)
From: http://balderdashy.github.io/sails/Associations are next on the list of to-dos. It's still a very new ORM but I'm working on making it better. Check it out I'd love feedback or better yet pull requests.
Interesting that the female is skinny, with a trendy little mid-riff baring shirt, and attractive (so far as a stylized comic character can be). One of the male characters is a pudgy dude with glasses. It seems the norm in characterizing girls in tech is "you can be a developer, but stay sexy - you don't have to be a nerd!" Does this risk marginalizing normal women?
For another thing, I believe you will find that Indians are, in fact, Asians.
They said you can feel free to ask her your question.
I wish you would too, because I can't stand coming into a thread about some cool new technology and having it turn into a melodramatic women's study.
SO, let's leave the stereotypes be, or risk the evolutionary extinction of males...
brew install node
sudo npm -g install sails
sails new testProject
command not found: sailsAlso from a UX standpoint I would point the user to another page where they can continue learning about the framework after the download is finished.
Right now it states "Now, let's get Sails to do cool stuff." and leaves the user hanging with nowhere to navigate to.
Maybe my font aliasing is just messed up. Thin fonts have never really looked great on windows for me.
All the best to the authors nonetheless.
Shipping a customer site is way different than "shipping" the website for an open-source framework. Unfortunately, we don't get paid to work on Sails, and we're completely bootstrapped, so we only get to work on stuff like the public-facing website when we get spare time.
Sails is more like RoR, it is like a traditional backend framework except that it's API-centric and has websockets built in. Sails is frontend-agnostic, and lets you use any dynamic framework you want (Backbone, Angular, Knockout, etc).
Disclaimer I haven't used Sails so this is not an endorsement for sails, just a reflection of my experience with meteor.
I've started a Meteor.js Project 3 Weeks ago and I'm regretting it. It's an architectural nightmare. It uses global variables for everything. One would think the news, that this is a bad idea, would have spread since the 70's. Unit tests are not possible in this style. You can do integration tests with the Laika Framwork though.
The next problem is a severe case of "note invented here" syndrome. Packaging, data access, Templating - Meteor.js has it's own. For example, they have their own version of Handlebars which I did not realize until yesterday. It has some documented and some undocumented differences to the original one. I had lots of fun with some custom Handlebar helpers that I wrote. I tested them against the original Handlebars and they passed all my unit tests. In the project however they did not work at all.
As KaoruAoiShiho said the bindings suck terribly. Well, they don't exist really, you just use jQuery. (Thank god, they don't roll their own version of that.)
The elephant in the room is data access. If you're a MongoDB fan like I am they will lure you in with the fact that you can use MongoDB directly form the client. Don't fall for that, it's a terrible idea. It's such a terrible idea, that they introduced 'server methods' to kind of fix all the problems with it. Server methods are not REST. Server methods are RPC style web APIs. Welcome to 10 years ago. They dislike REST because it's stateless. (at least that's what i've taken form this talk: http://www.youtube.com/watch?v=NnMqMAYmTuo) As you might have realized by now these guys just LOVE state. State and global variables.
If you're a Haskell programmer and you are not jet curled together into a ball and crying, id's suggest to quickly read a monad tutorial before continuing.
Dependency management is also a big problem. You can't just use nodes good old `require` and `module`. The order in which files are loaded is determined by their name and position in the directory structure. I shit you not.
They have also their own build tool. (who would have thought...) It watches your files and compiles them. Which works great most of the time. You can't have includes in your SASS/LESS/Stylus files tough. I guess the notion of having a proper module system scares it a little. I found this thing to be the best aspect of my whole Meteor experience. Not as good as Grunt though.
Per default, there is no routing. There is an unofficial routing package which works good, but is by far not as feature rich as the Express one. It also introduces some more global variables in true Meteor.js spirit.
In my opinion Meteor is good for prototyping. You can get a small app up in no time. Just don't build anything real with it.
If you want to drink the cool aid of single page apps, 'rich' client side etc, you have to invest into some MVVC/MVC frameworks like Angular, Ember or now Sails, which works well with Node.js apparently.
edit: Actually, just checked the package.json, and express is listed as a dependency, (probably for the controller middleware?) so in essence you're using both.