KartikPrabhu, wolftune, Choscura, plut4rch, Nuve, PetriBot, [schmarty], markopasha, nickodd, opal, kensp, jussi^ and swentel joined the channel; cortexman left the channel
plut4rchim trying to create a dynamic web application where users can view and post meetings, all on a single page that doesn't reload. My first step was learning how to make asynchronous GET requests in JS, and transform the JSON into HTML and update the DOM. My next step has been attempting to create a backend in PHP that returns JSON, and I'm a bit lost. I was thinking of having a series of scripts on my web server that when
plut4rchcalled appropriately from the front-end, return a JSON response. For example, I might have, getmeetings.php, which when invoked with a GET request and several properties such as how many meetings to return, will access my database and return JSON as a response. And then I might have another script, like addmeeting.php, which performs a similar action. Does this seem like a pretty bad way to go about things? I know for
plut4rchstarters, it's not very secure, and the URL's aren't exactly 'restful' or 'clean'. If i wanted to transform these scripts into an API of sorts, such that I could invoke the same functionality but with a cleaner URL, i.e. instead of /addmeetings.php,/meetings with the appropriate restful request, would I go about this by creating a FrontController, or some type of Controller where all the requests would be directed to, then
plut4rchinterpret the /meetings url, and invoke /addmeetings.php document that way? Sorry if I have explained this confusingly.. I'm a bit lost. I have had a look at the Flask microframework and it seems so easy to just create an endpoint and return JSON, and I want to do the same thing with PHP, or any scripting language on a web server, because my application is by nature very simple and I dont want to invest in learning a big
plut4rchLewisCowles ahh i see, so should i look up routing techniques? what does routing have to do with a controller? thats something im also confused about
[LewisCowles]using separate files like that might be as simple as creating a new file which scans the $_SERVER['REQUEST_METHOD'] for 'GET' or 'POST' and then the path via $_SERVER['PATH_TRANSLATED'] (or whichever $_SERVER variable you have transmitting the path) equal to '/meetings', then include the requisite file.
[LewisCowles]That'll get old real fast, but it's the simplest central router, and being you don't have query string parameters mentioned here it'll be fine to leave body parsing etc to the respective individual PHP files
[LewisCowles]Routing has nothing to do with controllers unless you are using an MVC project created by someone who knows nothing of the history of MVC (most people that use it)
[LewisCowles]We have a thing in some circles called avoid it until it hurts, then make choices. For now a GET and a POST route with no query params seems fine.
[jgmac1106]Okay feed grooming is a PITA, going to see if an inoreader browser extension helps, takes me like a day and half before things get all of wack in my rss reader...simplifying the follow work flow....will let you smart folks figure that out
[jgmac1106]finding a new blog, adding to reader, choosing the correct folder, and then maybe hopefully adding manually to my /following page,...or vice versa..but not making you RSS reader so unwieldly you walk away...
[jgmac1106]so many times I see a new blog to follow but know to stop what I am doing open my feed reader, enter in the url, find the correct feed to follow and then put feed into correct folder...I often just say "next time" knowing one probably won't come
[jgmac1106]j605 I was gonna say that. I might look for a clear al, unread after X time...especially jarring with my feeds of student writing...maybe I don't want to see the number of unread ever...it does cause a panic in me as well
jeremycherfasOne of the reasons I like a reader (Newblur) is that I can skim loads of headlines (about 200 a day) and read only those that interest me. Which means I generally have no more than 1-2 unread at the end of the day. And those are usually things I want to process more thoroughly.
jussi^, nickodd, electronicmaji, andysylvester, plutes, mauz555 and sp1ff joined the channel
ZegnatI always have my reader (NetNewsWire) open when I am at my desk. So it really does not take me a lot of time to subscribe to an extra feed. And during the subscribe flow it lets me pick a folder so that step adds nearly no overhead
[Molly]I have been planning to set up my own portfolio website, and was doing some research as I want to build something that is more than just another portfolio site - something that allows me to have control and ownership over my online identity whilst still remaining connected to the platforms or ‘silos’ I have used in the past
[tantek]Amazing! Paul Ford is great, he participated in our IndieWebCamp NYC event a few years ago. I don't think I've seen the New Republic article - do you have a link handy?
rmdes, andysylvester, kensp, turona, leg, [jgmac1106], [Aaron_Klemm], deathrow1, opal, [KevinMarks], plut4rch, awolf, en3r0_ and Decobus joined the channel; leg left the channel