iron-meteor / iron-cli

A scaffolding command line tool for Meteor applications.
640 stars 82 forks source link

It is necessary controllers on server side? #180

Closed lnmunhoz closed 9 years ago

lnmunhoz commented 9 years ago

Why there's a controller folder in lib and server folders? Controllers aren't just for client side?

chrisbutler commented 9 years ago

@lnmunhoz that's kind of a valid point... the generator is written with the option to specify a location but conceptually it doesn't really make sense, and the example would seem to indicate that they are client-only (https://github.com/iron-meteor/iron-router/blob/devel/examples/route_controllers/route_controllers.js#L15)

@cmather does it make sense to simplify controller generation and remove the server folder/generation option?

cmather commented 9 years ago

The idea was that at some point there would be no differenc between server and client side routing. It would just do the right thing depending on the entry point and config options. You would also have controllers server side for any restful routes or integration with other http based clients for example.