Is there a package for Rails-like CRUD scaffolding?


#1

With one-to-many and all.


#2

You get a lot of CRUD scaffolding with autoForm. Also see https://github.com/aldeed/meteor-delete-button
Use it with simpleSchema and you get a lot of validation scaffolding too.

one-to-many included, if your 1-m model is a doc with an array.


#3

Yes, but not Rails style. You have to define your schema.


#4

Are you talking about Active Record? Don’t you still have to define your model and adhere to string table naming conventions for the mapping to work?

Meteor has a philosophically different approach to application development. I see a lot of people trying to adapt Meteor and Mongodb into something more familiar, but I you’d get better mileage by really learning to think in the Meteor way.

Rails would also have you making a lot of AJAX calls to an API to get data, and storing that somewhere (such as HTML5 cache or a backbone collection) which is one way to do things, but you wouldn’t really be taking advantage of the best parts of Meteor.


#5

never used it but came across this:

btw you can use autoForm without simpleSchema.


#6

If you don’t like writing schema out (I don’t), you can generate your schema using the constellation:schema package. Then you can use autoform from there.

Here’s a 3-minute video here showing how to do that.


#7

Old post I know… but you could try npm install -g maka-cli.

Create or init a project and then type maka g:api Todos

It’ll scaffold out the api, and then just edit the /imports/api/Todos/api.js file and uncomment the last line. Full CRUD for TODOS in a restful fashion. There’s also stubs for methods and publications.