3 ms·
Are there any good approaches for doing this without a specific framework?
by drchickensalad 12y ago
Are there any good approaches for doing this without a specific framework?
- dustingetz 12y agoNot really, for interactive UI development you need to model the UI as a pure function (no state in the view). So that limits you to React or React-like approaches, and game engines: https://www.youtube.com/watch?v=tJr_TD1BtF0 https://www.youtube.com/watch?v=tJr_TD1BtF0 For backed web development (in Clojure at least) there isn't really a lot of state in the first place - request comes in, request comes out, state is in the database not the application - so there are no framework constraints.
- Rygu 12y agoDepends on the backend platform actually. Apache CGI processes (PHP) are fire-and-forget per request. But for example Ruby and Node.js servers persist through request cycles. It's important that any state is unique to the request, sometimes even the caches should be per request. Node.js has a package called piping that hot-reloads require()ed files. It makes interactive development possible. Checkout my backend and frontend interactive isomorphic starterkit: https://github.com/RickWong/react-isomorphic-starterkit https://github.com/RickWong/react-isomorphic-starterkit It hot-reloads Node server code and client code your browser.
- paulirish 12y agoYou can do this right now in Chrome DevTools. In the sources pane any changes you make to CSS are live immediately. It's a text editor but totally live. And if you want to persist those changes back to disk, you can do that, too. https://developer.chrome.com/devtools/docs/workspaces https://developer.chrome.com/devtools/docs/workspaces
- lsiebert 12y agoVim has a number of ways to do this. browserlink.vim for example. There are also grunt and gulp plugins for webdev repls.
- subbu 12y agoI use this and it works for me http://brettterpstra.com/2011/03/07/watch-for-file-changes-and-refresh-your-browser-automatically/ http://brettterpstra.com/2011/03/07/watch-for-file-changes-a...