3 ms·
That's as arbitrary of a distinction as many other ones you could try to draw. With Rails nothing will happen unless you call `run Rails.application` or run th
by hobofan 3y ago
That's as arbitrary of a distinction as many other ones you could try to draw.
With Rails nothing will happen unless you call `run Rails.application` or run the `rails server` command. That doesn't make it a library.
- diggan 3y agoObviously, you need to start the application somehow. But when you initially setup a rails project, do you write the code that bootstraps the application? Or do you just run `rails server` and the application figures out what to load, and starts the application for you?
- hobofan 3y agoBut when you initially setup a React project, do you write the code that bootstraps the application? Or do you just run (`pnpm create vite` +) `pnpm run dev` and the application figures out what to load, and starts the application for you? We can do this all day...
- diggan 3y agoWhen you initially setup a React project, you run `npm install --save react react-dom` or similar, create a HTML file that loads a JS file that you also need to write, that includes a call to `ReactDOM.render` somewhere. That's it, no more, no less. Contrast that with rails where you run `rails new $app`, then `rails server` and everything is made for you. Not sure why you're mentioning vite here, we're explicitly talking about React and Rails, not wrappers or tooling around them.
- hobofan 3y ago`pnpm create vite` is one of the modern alternatives of `create-react-app`, which isn't maintained anymore. It fills the exact same role as `rails new $app` does of scaffolding a project, which apparently is a hallmark of a framework. So where does "wrappers or tooling around them" start and end? Why shouldn't we count `create-react-app` (which was maintained by the React team), but count `rails new`? All this just goes to show that the "you have to call the entrypoint" distinction you are trying to declare is just as fuzzy as most other library vs. framework definitions. There is next to no difference in hand-writing an essentially fixed entrypoint of React.render vs. getting that file autogenerated vs. calling a "binary" (that is also just an interpreted script that contains the same entrypoint).