5 ms·
You are ignoring huge problems. How does a LAMP/RAILS app share server side rendering code with the client? How does a LAMP/RAILS app share data models betwee
by gjolund 10y ago
You are ignoring huge problems.
How does a LAMP/RAILS app share server side rendering code with the client?
How does a LAMP/RAILS app share data models between the server and client?
How does a LAMP/RAILS app provide search engines with indexable dynamic pages?
How does a LAMP/RAILS app preserve client state between page reloads?
How does a LAMP/RAILS app synchronize client state between multiple connected clients?
Your lack of experience working in a professional front-end environment is telling, and is the source of your confusion.
- Vendan 10y agoThis may surprise you, but we used to make web pages without JS. I know, it's a shocker!!! But guess what? 1 is irrelevant, 2 is irrelevant, 3 is there by default, 4 is easily solved, and so is 5. Turns out, logic on just the server side is simpler. It may not be as pretty, but please don't assume that your way is the only way.
- gjolund 10y agoWhen were you building web pages without JS? 1994? Server side logic MAY be simpler in SOME cases. Overall applications have become a lot more complex over the last 20 years and your oddated methodologies have been replaced by tested thorough solutions built and used by some of the biggest companies in the world.
- Vendan 10y agoWell, admittedly, I don't write webapps that often, as that's not actually my job. But last one I wrote without JS is also the last one I wrote period, about 2 months ago. Must be completely ramshackle and useless. Too bad it functions perfectly for me... Again, please don't assume that your way is the only way.
- jonathankoren 10y agoDude. This site has onlylike 6 lines of JavaScript, and that's just to make the arrows disappear after you click them.
- tomc1985 10y agoHow does a LAMP/RAILS app share server side rendering code with the client? It doesn't, because I don't need/want it to. Any data that needs to be passed to the client is rendered as JSON. Client-side get committed to the database via AJAX (to my buzzword-o-rific REST api), or with good-ol' POST. How does a LAMP/RAILS app share data models between the server and client? Again, not needed. How does a LAMP/RAILS app provide search engines with indexable dynamic pages? Uh, through clever use of jquery AJAX and postgres indices? How does a LAMP/RAILS app preserve client state between page reloads? A serverside redis cache? In the database? In the cookie? LocalStorage? C'mon man. How does a LAMP/RAILS app synchronize client state between multiple connected clients? By pushing a hash with current state to all clients via polling? Websockets? Whatsitcalled where you don't close the original HTTP connection? Did you know postgres has some pretty awesome realtime pubsub tech? I suppose if I have some extra time I could send changesets and load them with $.merge() ... I just want you to know that you are doing nothing to improve my image of the JS-scene-writ-large as immature, spoiled, and childish. There are isolated pockets of brilliance, for sure, but the everyday talk scares me.
- gjolund 10y agoAnswer: a bunch of singular solutions that may or may not be tested/documented Why do you want to write all that extra code instead of just picking the right tool for the job?
- tomc1985 10y ago(gjolund: I can't reply to you directly, but consider this my reply) Because they're simple? They're relatively standard? They're compact? Because I don't have to learn a new god-damned framework for every single new assignment? When did software development become a paint-by-numbers exercise? There is a difference between spaghetti-code and engineering. Why do you want to write all that extra code instead of just picking the right tool for the job? Because I can do it in less lines, in less time, with no new dependencies, and -- again! -- I don't need to learn another new framework! PS- Please understand, I know the difference between good code and bad. That's why I've automated most of my job title and am able to spend 97% of my working day helping the rest of my team solve their problems! Oh and did I mention I handle the infrastructure, enterprise integration, telemetry, and sales reporting for my company?