|
If you're making a CRUD app that also has corresponding tooling for users, you'll need the new and edit routes generally for those resources. If you're just building an API, than yes, you'll be fine without them.
|
# ? Apr 4, 2018 17:25 |
|
|
# ? Jun 5, 2024 05:08 |
|
Doh004 posted:If you're making a CRUD app that also has corresponding tooling for users, you'll need the new and edit routes generally for those resources. Yes, but we're taking about Rest since that's the only place it makes sense to talk about alternative http methods.
|
# ? Apr 4, 2018 17:33 |
|
Thermopyle posted:Yes, but we're taking about Rest since that's the only place it makes sense to talk about alternative http methods. Huh? I'm talking about REST too.
|
# ? Apr 4, 2018 19:12 |
|
If you're building a website that consumes it's own REST API would not make sense to differentiate between API/user facing endpoints?code:
bigmandan fucked around with this message at 19:47 on Apr 4, 2018 |
# ? Apr 4, 2018 19:30 |
|
Doh004 posted:Huh? I'm talking about REST too. If you're just talking about REST then you don't need separate routes for new/edit....you just use the appropriate method. Which, BTW, is another reason to use appropriate methods. It cuts down on the number of routes you have to maintain. If you're delivering user-side stuff to the browser then you of course need GET-able routes for new/edit. edit: yeah that ^^
|
# ? Apr 4, 2018 19:48 |
|
I think we're all saying the same thing?
|
# ? Apr 4, 2018 22:07 |
|
Doh004 posted:I think we're all saying the same thing? Yes, except for Nolgthorn who is I think is trying to argue that because the frontend might need GET-able update/edit routes that means something about how you should design your REST api? Thermopyle fucked around with this message at 00:20 on Apr 5, 2018 |
# ? Apr 4, 2018 22:56 |
|
Thermopyle posted:Yes, except for Nolgthorn who is I think is trying to argue that because the frontend might need GET-able update/edit routes that means something about how you should design your REST api? Because using Postman is hard and I want to exercise my entire API via the Chrome URL bar. Prove me wrong.
|
# ? Apr 5, 2018 02:06 |
|
Skandranon posted:Because using Postman is hard and I want to exercise my entire API via the Chrome URL bar. Prove me wrong. I just clicked on a thing in Postman... and it was easy
|
# ? Apr 5, 2018 13:20 |
|
Just write a bunch of json files with payloads and use bash select to make a menu of them to execute with curl
|
# ? Apr 5, 2018 14:25 |
|
I like REST, but using verbs other than GET or POST is like some naive student idea. No until we get a battle royale where we drop the inventors of SOAP, OLE, REST and RDF in a tropical isle, with a assorted of deadly weapons. And we wait to see what one survive. I believe in protocol darwinism, and I have no favorites.
|
# ? Apr 5, 2018 16:18 |
|
Tei posted:I like REST, but using verbs other than GET or POST is like some naive student idea. SOAP can die in a dumpster fire. gently caress SOAP.
|
# ? Apr 5, 2018 16:26 |
|
bigmandan posted:SOAP can die in a dumpster fire. gently caress SOAP. I share the sentiment. It seems to exist to solve some fortune 500 company problem, so I respect that. But for any other use is bloat to hell and just flat out don't work. When you are a Java developer it probably work well to communicate with other Java developers using the same IDE, same version of the IDE, same version of Java. Or if you are C#, to people with the same version of IDE, same version of C#. Fantastic tool in these environments. The cynical person in me thinks that maybe this is the feature: create vendor lock in, so you are forced to use Java if you want to talk with Java. But Microsoft or Oracle would not do vendor lock-in. Thats would be like wrong.
|
# ? Apr 5, 2018 16:51 |
|
Tei posted:I share the sentiment. I'm pretty sure the problem is "what technology can I choose that will assuredly not get me fired?"
|
# ? Apr 5, 2018 17:00 |
|
Tei posted:I like REST, but using verbs other than GET or POST is like some naive student idea.
|
# ? Apr 5, 2018 17:05 |
|
HATEOAS or bust
|
# ? Apr 5, 2018 17:09 |
|
*scans to see use of patch* Pfft, Restful...
|
# ? Apr 5, 2018 17:10 |
|
Tei posted:I like REST, No one should like REST. Its kind of icky! With REST as with with most design patterns and standards, the idea isn't whether it does it in the absolute technically best way possible. The benefit arises from the standardization across time, developers, projects, and organizations. Also, most of the time with such patterns it's so easy to discount the relatively minor developer time and effort savings and disregard the large amount of time and effort savings across all developers. The tragedy of the commons as they say. If there was a standard for GET-based APIs where every time you came across one the "new" url was product/new/ then that'd be cool (as well as being almost exactly like REST...just rearranging the characters in the raw HTTP request). But that's not the case...GET-based APIs are the wild west. Other options and standards are basically fine too, it's just that on today's web REST is probably the most ubiquitous. In other words, my argument isn't for REST it's for any sort of not-horrible standard. I mean, it's not like I'm going to slit my wrists if I see a GET API again. As I mention above, for the developer it's often a miniscule time/effort thing. However, if you're a developer and you don't use the millions of options available to you other than putting an URL in the address bar to explore an API I don't really know if your problem is REST. Usually, tools like Postman are even better than dropping an URL into the address bar anyway. Thermopyle fucked around with this message at 18:51 on Apr 5, 2018 |
# ? Apr 5, 2018 18:49 |
|
I would not use GET to create a new anything. GET is supposed to be cache because you are downloading a resource from a location. POST /products/new do make sense to me. Tei fucked around with this message at 18:57 on Apr 5, 2018 |
# ? Apr 5, 2018 18:54 |
|
What does a POST to /products do in that case if POSTing to /products/new is how you create objects?
|
# ? Apr 5, 2018 19:32 |
|
porksmash posted:What does a POST to /products do in that case if POSTing to /products/new is how you create objects? I would just not use the verbs semantically, but based on his properties. GET is used to download existing files, so each time I visit a URL, I get the same stream of bytes. And POST is to send data and get random bytes back. POST to /products make sense if the list of products can change over time. I am a simple men, possible dumb, so ignore my opinions.
|
# ? Apr 5, 2018 21:23 |
|
Random jQuery question: I'm dynamically appending divs to my page and need to access them after they are loaded. StackOverflow tells me to use .on which works but only if it's tied to an event: code:
|
# ? Apr 6, 2018 23:33 |
|
Boosh! posted:Random jQuery question: You can store a reference to each div you create when you create it, and then do whatever you like whenever you like.
|
# ? Apr 7, 2018 05:03 |
|
Thanks Lumpy. I should’ve noted it was created from an infinite scroll plugin that grabs a html content from existing pages and appends it to the roll. Looks like there’s a callback so I will tinker with that.
|
# ? Apr 7, 2018 17:20 |
|
I'm trying to read up on how a request is typically processed on the backend. All the articles I'm finding basically just have "... And then the server processes the request and generates a response...". I have worked a lot in the backend but would like a thorough explanation of the entire process. Any good articles/videos I should checkout?
|
# ? Apr 7, 2018 20:57 |
|
huhu posted:I'm trying to read up on how a request is typically processed on the backend. All the articles I'm finding basically just have "... And then the server processes the request and generates a response...". I have worked a lot in the backend but would like a thorough explanation of the entire process. Any good articles/videos I should checkout? I can't recommend anything specific, but i know I've seen stuff in the past in relation to how python works with WSGI. Try googling stuff like "django wsgi request response how it works".
|
# ? Apr 7, 2018 21:10 |
|
Could use a second set of eyes. Created a react server rendering app with express and Webpack 4. I'm getting build errors when it imports the semantic-ui css file. The errors are because its failing to resolve resources like fonts/images being @import'ed. I setup url-loader to handle this but it's still failing and I'm really baffled. I've never had trouble setting this kind of thing up until my first foray into server rendering so I could be missing some nuances. Repo: https://bitbucket.org/hhorne/minssr Example errors: code:
Dr. Poz fucked around with this message at 22:23 on Apr 9, 2018 |
# ? Apr 7, 2018 22:11 |
|
I once found a really great modern article discussing primary and secondary buttons, specifically secondary buttons and when to use ghost buttons vs when to use colored link. But for the life of me I cannot find it. I know it was popular because I got it from either here or a suggestion but just cannot find it...
|
# ? Apr 10, 2018 23:29 |
|
As a person who isn't well-versed in frontend stuff, but who wants to build an application using new technologies, are there any resources you can recommend? I know Javascript, but I am not well-versed in the world outside plain ol' vanilla JS and JQuery. I'm also basically only familiar with Bootstrap and would like to step outside that world. I've played with React a bit a few years back, but nothing serious. Basically, what should a backend developer like myself do to make their full stack skills more full stacky? This is a side project, so even if it's a bit esoteric I'm cool -- the backend is being written in loving Haskell (though I'm oscillating between that and F# or Ocaml), I can deal with some weirdness on the frontend. Ghost of Reagan Past fucked around with this message at 02:16 on Apr 12, 2018 |
# ? Apr 12, 2018 02:14 |
|
Kind of a dumb question but basically: I have only been exposed to Python in a data science context, where it was used with some libraries in a Jupyter notebook. Ive never really seen it in action for web development for back end stuff. I know there is this wide vast internet out there but if someone maybe had a suggestion or link to a resource or simple example of it running an app or otherwise I would appreciate it. Ghost of Reagan Past posted:As a person who isn't well-versed in frontend stuff, but who wants to build an application using new technologies, are there any resources you can recommend? I know Javascript, but I am not well-versed in the world outside plain ol' vanilla JS and JQuery. I'm also basically only familiar with Bootstrap and would like to step outside that world. I've played with React a bit a few years back, but nothing serious. I mean unless you have an aversion to it I would suggest picking React back up again and working on Javascript ES6 stuff alongside that. Murrah fucked around with this message at 03:19 on Apr 12, 2018 |
# ? Apr 12, 2018 03:16 |
|
Ghost of Reagan Past posted:As a person who isn't well-versed in frontend stuff, but who wants to build an application using new technologies, are there any resources you can recommend? I know Javascript, but I am not well-versed in the world outside plain ol' vanilla JS and JQuery. I'm also basically only familiar with Bootstrap and would like to step outside that world. I've played with React a bit a few years back, but nothing serious.
|
# ? Apr 12, 2018 14:50 |
|
Capri Sun Tzu posted:Angular/React/Vue are the flavors of the month, but check out Knockout.js if you want something much simpler to introduce you to modern web apps. Angular (original flavor) and React are both multiple years old at this point, so calling them flavors of the month is kinda weird, but that's a good idea! Knockout is fairly simple and pretty nice. Not terribly performant, but that's OK most of the time.
|
# ? Apr 12, 2018 14:55 |
|
Munkeymon posted:Angular (original flavor) and React are both multiple years old at this point, so calling them flavors of the month is kinda weird, but that's a good idea! Knockout is fairly simple and pretty nice. Not terribly performant, but that's OK most of the time.
|
# ? Apr 12, 2018 15:07 |
|
Capri Sun Tzu posted:You're right, I must be getting old.
|
# ? Apr 12, 2018 15:59 |
|
I use Vue.js a lot now and quite enjoy it. When I was first getting started with it, I found it pretty easy to get up and running. There's a lot more you can get into with it (vuex for example) but I found the learning curve for it to be fairly reasonable.
|
# ? Apr 12, 2018 16:36 |
|
bigmandan posted:I use Vue.js a lot now and quite enjoy it. When I was first getting started with it, I found it pretty easy to get up and running. There's a lot more you can get into with it (vuex for example) but I found the learning curve for it to be fairly reasonable. I am two weeks into vue professionally and I cannot agree with this more.
|
# ? Apr 13, 2018 05:18 |
|
edit: nvm
prom candy fucked around with this message at 19:36 on Apr 13, 2018 |
# ? Apr 13, 2018 18:22 |
|
Murrah posted:Kind of a dumb question but basically: I have this same question and I'll give an example. I can make a python application take some inputs do stuff and output a pretty graph. I want to take a set of inputs as text and images through my website pass it through my python application and spit out this graph to the user. How?
|
# ? Apr 15, 2018 14:12 |
|
CarForumPoster posted:I have this same question and I'll give an example. Look into Flask, it basically takes care of all the web-specific overhead without doing too much other stuff on its own. All you'll need to do is figure out how the information is passed in through Flask, and then instead of saving the result as a file (or, you can save a temporary file on the server), you'll use a Flask response to return the graph as image data to the client. Apart from the input and output steps, and making sure Flask is set up properly, your application should work exactly the same as it currently does.
|
# ? Apr 15, 2018 17:55 |
|
|
# ? Jun 5, 2024 05:08 |
|
PT6A posted:Look into Flask, it basically takes care of all the web-specific overhead without doing too much other stuff on its own. All you'll need to do is figure out how the information is passed in through Flask, and then instead of saving the result as a file (or, you can save a temporary file on the server), you'll use a Flask response to return the graph as image data to the client. Apart from the input and output steps, and making sure Flask is set up properly, your application should work exactly the same as it currently does. Would this be the same if my web framework of choice is django?
|
# ? Apr 15, 2018 18:16 |