Page 1 of 1

Difference Between REST and CRUD

Posted: Fri Aug 15, 2014 1:22 am
by Verahta
http://programmers.stackexchange.com/qu ... t-and-crud

Could it also be said that CRUD is usually associated with PHP/MySQL and REST is more in the arena of Node.js and MongoDB?

Re: Difference Between REST and CRUD

Posted: Fri Aug 15, 2014 6:33 am
by a_bertrand
CRUD == Create Read Update and Delete
We use CRUD as acronym for those operations so basically a simple table editor will be a CRUD.

REST (http://en.wikipedia.org/wiki/Representa ... e_transfer) is a way to transfer data over the web and create a simpler version of SOAP which let you access remote objects (objects on a different server).

2 fully different things and both totally independent of the language / framework / db you use.

Re: Difference Between REST and CRUD

Posted: Fri Aug 15, 2014 6:00 pm
by Jackolantern
"CRUD" wasn't even something that anyone acknowledged until web frameworks with "scaffolding" starting showing up. These frameworks often came with generator apps that would create basic Create-Read-Update-Delete functionality in your app with the push of a button. This is largely what popularized the usage of the term, since we needed a name to refer to this as.

CRUD can also be considered a certain type of application. If the functionality centers on those 4 operations (and many enterprise-type programs do), it can be called a "CRUD application". Many of the client-side frameworks are said to excel at CRUD apps since they have that functionality out of the box.

As was already said, REST is a way of interfacing using HTTP action verbs: GET, POST, PUT, DELETE. With those verbs, you can easily set up a CRUD interface with a backend, since they will allow you to Create, Read, Update and DELETE.

Re: Difference Between REST and CRUD

Posted: Fri Aug 15, 2014 6:20 pm
by Verahta
Yeah, in my Wordpress and PHP/MySQL web design days I didn't often encounter the term CRUD. Now that I am taking the Web App Arch. course with RubyRails the instructor brought up CRUD and REST but said he would talk about it later.

Re: Difference Between REST and CRUD

Posted: Fri Aug 15, 2014 7:38 pm
by a_bertrand
I did test RAIL and I must say I somehow hated it directly. Between the language (ruby) which reminds me too much of Python without being really python, and the many files to edit to make it work, and the result, I somehow really didn't stick to it. Wonder if you will have a better feeling yourself.

Re: Difference Between REST and CRUD

Posted: Fri Aug 15, 2014 7:47 pm
by Jackolantern
It is a pretty commonly held opinion that Rails has fallen behind. In 2005 it was a revolution in web development that has changed basically all platforms in incredible ways, but that revolutionary touch has fallen by the wayside in favor of the rush of countless oceans of open source developers speeding other frameworks and platforms past it. Laravel, Django, Sails, Play and ASP.NET MVC are widely considered to have surpassed it, all while making development easier than Rails.

Re: Difference Between REST and CRUD

Posted: Fri Aug 15, 2014 8:34 pm
by Verahta
I love Python! So far RubyRails has been a lot of fun, but I do not plan on using it much beyond this course, as I intend to focus most of my time on Python and the various JavaScript stacks (and PHP/MySQL, and I am dreading Java, but so many college classes use it I must learn it).

Re: Difference Between REST and CRUD

Posted: Fri Aug 15, 2014 9:57 pm
by Jackolantern
Ruby is an interesting language. Its implementation and usage of lambdas is very thought-provoking.

Re: Difference Between REST and CRUD

Posted: Sat Aug 16, 2014 4:53 pm
by Chris
CRUD = Create Read Update Delete, and is used at to manipulate the data layer of a software application. Basically all you ever really do is create, read, update and delete data. All a processor does is add, subtract, multiply and divide.

REST = Representational state transfer, and is used in the software layer in networking. It is basically telling the web server what to do from a client using simple verbs over the Hypertext transfer protocol. You are not restricted here as you don't have to follow the standards and can extend it to anything you want. GET, PUT, POST, DELETE, REMOVE, RUN, KILL, SEARCH, anything you want.

Basically REST triggers CRUD in a web application. Usually you would implement RBAC (Role-Based Access Control) between the two.

REST -> RBAC -> CRUD.

Re: Difference Between REST and CRUD

Posted: Sat Aug 16, 2014 5:48 pm
by Verahta
Now are CRUD>RBAC>REST things you have to actually program yourself, or is it naturally built into frameworks? I guess I'll learn it when I run into it. I did CRUD a couple days ago in the Rails class, we generated scaffolds and made a blog that can post posts and make comments on posts, and also edit and delete posts and comments.