I'm thinking of using RailwayJS to build my web server. Previously I was using express, which is considered to be RESTful. However, from what I've been reading, it seems that RailwayJS is not considered to be RESTful, even though it uses express!
What is it about RailwayJS that makes it not RESTful? If it passes messages using JSON doesn't that make it RESTful?
I'm curious where and/or how you drew your conclusions regarding REST and Express/RailwayJS?
Express allows you the freedom to set up your router any way you wish; you could very easily create a very RESTful style application, or you could very easily break every rule in the REST architecture. Express presents no opinion on you whatsoever.
RailwayJS, however, seems to favor a more RESTful style interface--at least, when using "REST" in the same context as you would in, say, Ruby on Rails. Railway supports resource based routing, which maps a resource to seven very Rails-like URLs/HTTP verbs:
Resource-based routing provides standard mapping between HTTP verbs and controller actions:
map.resources('posts');
will provide following routes:
helper | method | path | controller#action --------------------------------------------------------------- posts GET /posts posts#index posts POST /posts posts#create new_post GET /posts/new posts#new edit_post GET /posts/:id/edit posts#edit post DELETE /posts/:id posts#destroy post PUT /posts/:id posts#update post GET /posts/:id posts#show
Thus my conclusion would be, when using "REST" in the context that most people do when designing MVC-based web applications, that Express can be RESTful, depending on how you design your app, but isn't inherently RESTful, and that RailwayJS prefers a RESTful setup (although you don't have to use resource-based routing in RailwayJS either).