|
abraham linksys posted:[*] PushState routing. This is more advanced, and involves your router pushing new "pages" into the history using the HTML5 history API. This will give you what appear to be the same as a server-side URL, like myapp.com/foo, with no hash. The downside is that, if you've architected a "single-page" app where your application is represented in only a single server-side HTML page, your server's router will need to always send you to the same page, regardless of the URL. So the tradeoff is prettier URLs for a bit more server-side configuration[/list] Is this the same thing people have been doing with mod_rewrite for ages, or am I misunderstanding? What's a typical back-end look like for one of these apps, anyway? Are they pretty minimal, or are you basically just spitting out JSON instead of rendering a view? I'd like to start doing more client-side stuff because I actually like writing JS (weird, I know) but I'm pretty lost with how it all fits together.
|
# ¿ Sep 19, 2013 22:03 |
|
|
# ¿ May 2, 2024 00:31 |
|
abraham linksys posted:You can do pretty much anything you want on the back-end, but the flow is different. It's a bit tricky to explain without pulling out OmniGraffle, but instead of "Server-side route -> get data in a controller -> put that data in a server-side view -> output rendered HTML," your flow becomes "server-side route goes to your single-page app -> client side route figures out what data needs to be retrieved -> ajax call to your server -> return as json -> pull into your models/controller -> render in your client-side template" (with a few other layers mixed in for good measure). That actually makes a lot of sense, OmniGraffle or no. Thanks!
|
# ¿ Sep 20, 2013 00:23 |
|
Tutsplus posted an entire Ember course for free. No idea what the quality is like, but it might be worth watching: http://freecourses.tutsplus.com/lets-learn-ember/index.html
|
# ¿ Sep 26, 2013 21:37 |
|
What's the best way to share templates between Rails and JS? I see a few gems for using Mustache in rails but they look like they're for Rails 3.X
jony neuemonic fucked around with this message at 22:52 on Oct 18, 2013 |
# ¿ Oct 18, 2013 22:48 |
|
Pollyanna posted:Whoops I got that wrong then. What I was thinking of was some sort of tool that's basically a text field, then a list of text fields with an associated integer, then a table of variable rows, then a radio button or something. Would it make sense to try and MVC that or is that better done through plain HTML? You're bringing a machine gun to a knife fight. You don't need to apply a design pattern or bring in a JS framework to make an HTML form.
|
# ¿ Dec 4, 2013 20:05 |
|
Yeah. I could be misunderstanding (I'm almost entirely a back-end guy), but I can't see that you would ever want to expose DB credentials to a web browser. Where are you calling out to your DB from?
|
# ¿ Dec 10, 2013 17:27 |
|
Pseudo-God posted:Like I said earlier, apparently it's not possible to do this entirely in front-end JS. However, it may be possible to have a tiny PHP/ASP/node/ruby etc script, which can hold authentication data, and act as a relay to the external DB. This is a perfect use-case for a micro framework. Pick whichever one matches your language of choice, wire up some simple routes, and you're done.
|
# ¿ Dec 10, 2013 17:55 |
|
|
# ¿ May 2, 2024 00:31 |
|
The Dark Wind posted:Does anyone have experience with https://reactforbeginners.com/? I saw it recommended highly somewhere, but I'm hesitant to plop down x3 unless a few other people have good things to say. I enjoyed it, it's a quick watch but he covers a lot of useful things. Some of his other courses are free (Learn Redux and JavaScript30, maybe others) so you could always skim one of those to see if you like the style.
|
# ¿ Jan 5, 2017 21:24 |