Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "ajax php"
-
Me when viewing a line of PHP where the previous developer add "sleep(5)" to an Ajax endpoint with the comment "Sleep for 5 seconds so the ajax loading icon is visible to users".
FML.12 -
It's done! Network printer and scanner, hosted by a Raspberry Pi Zero W. I used CUPS to host the printer, but the scanner was much more difficult. I installed apache2 on the Pi to host a HTML front-end that I wrote. Once you set up the scan, the front-end makes an AJAX call to a PHP script, which then calls my Python script that does the scanning and converting. Once that's done, it returns the file name via the AJAX call, then the front-end downloads the scanned PDF on the computer. I even managed to impress my girlfriend, who didn't really understand what I was doing until I showed her the end result 😄
I might try to pipe the output of the conversion straight back via AJAX, to be downloaded without a second call.9 -
Boss: "Can you create a login page where every login fails?"
Me: "Sure thing!"
*Writes out php file that returns false and calls it via AJAX*8 -
Oh man. Mine are the REASON why people dislike PHP.
Biggest Concern: Intranet application for 3 staff members that allows them to set the admin data for an application that our userbase utilizes. Everything was fucking horrible, 300+ php files of spaghetti that did not escape user input, did not handle proper redirects, bad algo big O shit and then some. My pain point? I was testing some functionality when upon clicking 3 random check boxes you would get an error message that reads something like this "hi <SENSITIVE USERNAME DATA> you are attempting to use <SERVER IP ADDRESS> using <PASSWORD> but something went wrong! Call <OLD DEVELOPER's PHONE NUMBER> to provide him this <ERROR CODE>"
I panicked, closed that shit and rewrote it in an afternoon, that fucking retard had a tendency to use over 400 files of php for the simplest of fucking things.
Another one, that still baffles me and the other dev (an employee that has been there since the dawn of time) we have this massive application that we just can't rewrite due to time constraints. there is one file with (shit you not) a php include function that when you reach the file it is including it is just......a php closing tag. Removing it breaks down the application. This one is over 6000 files (I know) and we cannot understand what in the love of Lerdorf and baby Torvalds is happening.
From a previous job we had this massive in-house Javascript "framework" for ajax shit that for whatever reason unknown to me had a bunch of function and object names prefixed with "hotDog<rest of the function name>", this was used by two applications. One still in classic ASP and the other in php version 4.something
Legacy apps written in Apache Velocity, which in itself is not that bad, but I, even as a PHP developer, do not EVER mix views with logic. I like my shit separated AF thank you very much.
A large mobile application that interfaced with fucking everything via webviews. Shit was absolutley fucking disgusting, and I felt we were cheating our users.
A rails app with 1000 controller methods.
An express app with 1000 router methods with callbacks instead of async await even though async await was already a thing.
ultraFuckingLarge Delphi project with really no consideration for best practices. I, to this day enjoy Object Pascal, but the way in which people do delphi can scare me.
ASP.NET Application in wich there seemed to be a large portion of bolted in self made ioc framework from the lead dev, absolute shitfest, homie refused to use an actual ioc framework for it, they did pay the price after I left.
My own projects when I have to maintain them.9 -
First rant: but I'm so triggered and everyone needs a break from all the EU and PC rants.
It's time to defend JavaScript. That's right, the best frikin language in the universe.
Features:
incredible async code (await/async)
universal support on almost everything connected to the internet
runs on almost all platforms including natively
dynamically interpreted but also internally compiled (like Perl)
gave birth to JSON (you're welcome ppl who remember that the X in AJAX stood for XML)
All these people ranting about JS don't understand that JS isn't frikin magic. It does what it needs to do well.
If you're using it for compute-heavy machine learning, or to maintain a 100k LOC project without Typescript, then why'd you shoot yourself in the foot?
As a proud JS developer I gotta scroll through all these posts gushing over the other languages. Why does nobody rant about using Python for bitcoin mining or Erlang to create a media player?
Cuz if you use the wrong tool for the right job, it's of course gonna blow up in your face.
For example, there was a post claiming JS developers were "scared" of multithreading and only stick in their comfort zone. Like WTF when NodeJS came out everything was multithreaded. It took some brave developers to step out of the comfort zone to embrace the event loop.
For a web app, things like PHP and Node should only be doing light transforms between the database information and HTML anyways. You get one thread to handle the server because you're keeping other threads open to interface with databases and the filesystem. The Nexus.js dev ranting on all us JS devs and doesn't realize that nobody's actual web server is CPU bound because of writing HTML bodies, thats why we only use 1 thread. We use other worker threads to do the heavy lifting (yes there is a C++ bridge look it up)
Anyways TL;DR plz respect JS developers we're people too. ES7 is magic and please don't shit on ES3 or we'll start shitting on the Python 2-3 conversion (need to maintain an outdated binary just cuz people leave out ()'s in their print statements)
Or at least agree that VB.NET is an abomination and insult to the beauty that is TI-84 BASIC13 -
Hours spent figuring how a select (dropdown) was created plus the whole flow of an app.
Me: "They won't be so stupid to get the whole html via ajax"
Me: *facepalms" they did
Me: Discovers the ajax call is handle via a giant switch statement
Me: All html is handled in memory
Me: Discovers the now Director of Development did it
Me: *Dev Rants*
You: Check my previous rant and confirm it8 -
OMFG! Who’s bright fucking horrible stupid ass idea was it to mix Ajax with php (php deciding the ajax paths) with random js outputting HTML inside random fucking static divs found no where near the logical route of content.
Trying to add a simple fucking status to a gigantic cluster fuck of a legacy project is just FUCK.
If I could I would burn this bitch to the ground and start again I would, But no, it’s needed.
Someone kill me before I break the shit out of this thing, I would take a wordpress project right now instead. -
Realizing that the former so-called PHP developers based the entirety of their so-called dashboard framework (self-written of course) on GET requests.
Every. Controller. Only. Accepts. Get. Requests.
It creates stuff? So what! It does update? No matter! It deletes? Who cares!
Just call that URL, and it will release all hell, plagued with multiple side-effects, and then issue a redirect.
Of course that one delete button was inside some twitter bootstrap tabs, and due to the redirect the page always reloaded and the content manager landed on a very different tab. Meaning if they wanted to delete multiple records, they had to hit "activate tab" and "delete" and "activate tab" and "delete" -- rinse and repeat.
It's our *job* to make things easier for our users! Not to waste their time. (Unless you are browser game developer. Then do your thing.)
And we are talking basic CRUD! Basic CRUD! I am not even demanding for it to be restful or to have some parts of a HTML page being updated on the fly with such rad and new technologies like ajax!
There is just question I would like to ask whoever build this: Seriously!?4 -
So started job hunting and stumbled upon this
1. Skill required in PHP, Laravel, CakePHP, Wordpress, Opencart.
2. Bootstrap, CSS3 and HTML5 experience preferred.
3. JQuery, Vue.js, Angular.js, JavaScript, AJAX, HTML experience highly preferred.
and will pay 8000Rs/Month (112.88 USD)
Do they even know what they want? and at what cost they want to hire?15 -
I might be fucked up, but I have a tendency to gravitate towards the shit that everyone else dislikes for the sake of knowing if their bias against is actually because shit is truly fucked up or if shit is legit plain WRONG.
From all technologies that I have worked with professionally I can count:
Java(currently in the form of old JSP services for an "enterprise level application")
Java for Android development - i was the lead engineer for a mobile project
Swift with IOS dev, same gig as the above.
C++ for Android development in the form of OpenCV with Java as well.
Javascript in all possible forms, basic input validation, ajax services, jquery datatables, jquery animations and builders.
Css/sass heavily
Clojure for an ldap active directory application
Python for glue scripts
Classic ASP with JScript and VBScript
VB Net forms
C# For ASP.NET MVC
Bootstrap for multiple intranet frontends
Node+Express for a logistics warehouse management tool
Ruby on Rails freelancing small gigs
Php in all ways possible from complete standalone php apps to Laravel and just php+composer apps aaaaall the way to wordpress
Django consulting
I have found that the one that I dislike the most is wordpress. And the one that I like working with the most is Node. Don't know why, i just do really fucking like messing around with Javascript, the language has changed a fuckload throughout the years and continues to increase and change. It was my first scripting language following a stint in me trying to learn cpp way when i was starting and royally FAILING
Never really got the hate for it, even when I used JScript with classic ASP i just enjoy working with Javascript a lil too much. And from all the above mentioned stacks safe from Php is the one, or one of the ones in which i don't royally suck :V3 -
I've been staffed on a old ongoing project, first day.
0. Compatibility has to be guaranteed down till IE9... ppf.
1. Front end made in XHTML+JS(jQuery)... bah, ok.
2. XHTML+JS is actually generated by PHP5.4, not a line is actually statically served... beh, funny, ok.
3. PHP files are the output of an XSLT transform of a bunch of XMLs... meh, seriously? Oooook.
4. XMLs are the product of the serialisation of a truck of stateful JavaEE6 DTOs populated magically (undocumented) with data coming from a SQL DB... WTF mode!!!
5. Session logics lives within PHP-land at point 2, front end makes ajax calls here that propagates to another WS out of our control that triggers -somehow- (undocumented) our Java backend at point 4 to generate new XMLs and then reach front end again. Kill me now.
Boss: look... it's too slow for the client, it's too heavy on our servers: fix it. Ah, and we sold 85% test coverage by October. You're the man for the job. (I'm a Node.js fullstacker and right now there's not even a testing scaffold, ofc).
Me: prod is on Linux or Windows?
Boss: RHEL7.
Me: rm -rf / as root. Done.
Boss: I know I know...
Me: ...
I think time has come...6 -
I think I just hit my lowest point.
Spent ALL of last week trying to get my WAMP server to call a PHP script via AJAX and I kept getting 404s. Spent at least 10 hours on stack overflow trying to figure out why the server wasn't accessing it only to find out today that I was both looking at the wrong directory and also working the file name wrong.
I think I just need to walk away from programming for a while... 😧3 -
Not necessarily ignorant, but funny.
Before my current job I used to work for a company that provided software services to logistic type corporations, import export and all that jazz.
I was asked to generate an admin interface that would allow people to enter scans from different products, sort them in the right place and update the main interface. During the time we were using Classic ASP with VBScript. There, AJAX and similar functionality can get quite tricky, but definitely doable if you know what you are doing, VBScript has many limitations when compared to something like PHP for example. But thus the application was created in about a week once everything was sorted and then the storage manager came back to ask me if I could put a spinner or something in it to show that the information was loading. I asked him if the information was not being updated accordingly or if there were similar issues to that extent.
He said "no, it is working perfectly and I have no problem with the functionality, but these morons keep trying to scan shit because they can't tell if something is being populated into the main table in the interface because it all happens so quickly" Me: "well it is a very simple process, if you want I can add some sort of additional message to that or a spinner or something of the like that would show for two seconds or something, just so they can get some visual clarification"
Him: "This is a pretty stupid thing isn't it?". Me: Yes. Him: "I am so sorry to ask for this, how long will it take you?" Me: "Lol give me about 30 mins maybe less, it is no problem really, let me get this out of the way so that your people can get to it without loosing anymore time"
Such things are the reason why they literally brought me to the head of the company when I told them that I was leaving in an effort for him to try and convince me to stay. I was not to be contracted into their service anymore, but a full time employee. It was nice for them to ask really, but I declined in favor of the benefits I get from my current company.
To this day I think its funny and they remember as well.7 -
Designers!!
What do ya think
A dashboard for a website
The cpu temp progress bar has jquery/AJAX wich outputs the cpu temperature at every each 3 second of the server wich is on a raspberry pi at the moment.
Does it look good for these days?
PS: used php for the backend10 -
Doing a full rewrite from some DIY spaghetti framework: when it can't find a search query it returns "false" with the status code 200, the same php file responsible for querying an external api is put into all sorts of named folders, so e.g. a user that is in the results page X can continue searching on the same URL, instead of doing proper url rewrites or ajax calls to the one in the root directory, html is thrown into every other php line, a DIY sort function for a numbers array that fails to sort 0 before 1 and that all is just a 10 minute review, can't wait to see the rest.2
-
Thing that just occurred to me.
Write backend of website in Node with Mongo.
Write front end of website by using PHP to echo data from mongo and inline styles. PHP will also echo any inline JS that needs to make AJAX calls back to handle responsiveness.
Write a website with JS as its backend and PHP as its front end because the world has gone absolutely mad and you dgaf anymore.2 -
Just had my first freelance job here i Korea. I was told that most(?) of my job was going to be front-end web dev, and that the 'required' skillset was html/css. I thought I'd be making some free money, and I was wrong. Ended up doing all sorts of things like sql,js,ajax,php, and EVEN design. Apparently "developers" here are people who can do pretty much everything on computers. How many other countries are like this?12
-
A long long time ago ( 2007 I think ) I worked for a company that made landing sites, so basically an email campaign would go out, users would be sent to a 1 page website with a form to capture their data, ready to be spammed even more. You know how it was back then.
So I worked with a guy who we had just hired, I didn't do the hiring but his CV checked out, so I gave him one of my tasks. Now most pages were made with js and html, with a PHP backend ( called with Ajax). Now this guy didn't know PHP so I was like all good, ASP works too at the end of the day we don't judge, we do like 2 or 3 of these a day and never look at them again. So he goes of and does is thing.
3 weeks later, the customer calls up to me they still haven't received their landing page. Ok so he probably forgot to email the customer np, I tell him to double check he has emailed the customer. Another week goes by end the customer calls back, same problem. At this point I'm getting worried, because we're days away from the deadline and it was originally my task.
So I go back to the guy and I tell him I want that landing page so I can send it myself, half thinking to myself that we had a freeloader, that guy that comes in to companies for 3 weeks, doesn't work, but still cashes his pay. But no, this was much worse.
So he tells me he has finished yet. I ask him why, what's the blocker ? You had 4 weeks to tell me you were blocked and couldn't progress. And his answer was simply, because I wasn't blocked I have been working on it this whole time. So I tell him to zip his project up and email it to me. We didn't do SVN or git back then, simply wasn't worth it. So he comes back to me and says the email server is telling him attachments can't be bigger then 50mb. At this point I'm thinking he didn't properly sized the art or something, so I give him a flash drive to put it on.
When I then open the flash drive, the archive is 300mb, thinking to myself, the images weren't even that big to begin with.
So I open it up, and I don't even find any images, just a single asp page. About 500mb. When I opened that up and it finally loaded, I saw the most horrendous things ever.
The first 500 lines was just initializing empty vars. Then there was some code that created an empty form with an onChange event that submits the form. After that.. it was just non stop nested if's. No loops, no while, for, foreach, NO elseif's, just nested if's, for every possible combination of the state the form could be in. Abou 5000 of them, in a single file. To make matters worse, all the form ( and page ) layout was hardcoded in the if's. Includes inline css, base64 encoded images, nothing but as dynamic, based on the length of the form he changes the layout, added more background etc. He cut the images up for every possible size of the page and included them in the code.
I showed it to my boss, he fired the guy on the spot. I redid the work from scratch, in under 4 hours. Send it to the client. they had no ammends to make, happy as Larry. Whish I kept the code somewhere.
Morale of the story, allways do a coding test on interviews, even if small things just to sanity check.3 -
I was think of using ajax to pass data from javascript to php because of some validation to my multiple checkbox, then before i go home the idea hit me to just use validation in php with some basic variable manipulation and if else, i just wasted 2 hours of searching just to arrived at a basic solution, i think it's much better to think before you code about what you want to do,but when i open my text editor i get distracted a lot.11
-
Started new job almost two moths ago..
For almost 3 years I was developing custom themes, plugins, and widget for WordPress using PHP, jQuery/AJAX, and MySQL.
The new company that hired me brought me on as a backend developer to help rebuild their custom PHP Framework, and other web based software/products as their moving toward Google Cloud Platform.
When I started, MVC and OOP was new to me... took a couple weeks to get the hang of things, and understand their system.
Just when I was getting comfortable, I had a task assigned to me that was all NodeJS...
Had a 30 check-in the week I started the Node task, and was feeling pretty beat down because it was all new to me and I wasn’t making a lot of progress, and still not comfortable with Promises yet, and some other ES6 features but finding my way around slowly but surely.
Manager reassured me that I wasn’t going to be fired and it wasn’t unique to myself. Very encouraging to hear, but I’m my own worst critic so it’s frustrating not being able to make progress like I would with PHP projects.
Fast forward to this week, I started to review another task for a feed and found it’s all Ruby! Another language I have no familiarity with... and started to question if I’ll every get the hang of all these languages and be a solid team member...
Not only do I have to get a grasp on NodeJS and Ruby now, but then I’ll also have to get familiar with GCP and whatever else comes along with it...
Oh and I’m using Linux now instead of Windows/ OSX... so there’s that too.. plus the other command line tools the company built, and uses..
I was comfortable developing in PHP and know I needed to take a step and accept this job to move my career forward but it seems like I’m always behind the 8 ball...
Some days I wonder if it was worth staying a Wordpress developer and just focused on learning ReactJS and stay more Front-end than Backend..
I enjoy working with talented people but I don’t like being the low man on the totem pole knowing I don’t have the experience yet.
Does it feel like this for all devs?!?!14 -
you know what really grinds my gears.. when agencies/companies post "PHP developer" positions and require ajax, js, jquery, angular and WordPress templates... its a back-end language ffs1
-
I swear on the Almighty nature, I fucking hate Browser compatibility.
Passing php data via JSON encode. Works superfine on Firefox and Android mobile browser doesn't on Chrome. Fucking shit. Been sitting for 13 hours and gave up. FFuuuuuuck !!!!
Form submission via ajax and it again works on Firefox but doesn't on Chrome. I just can't understand, my mind is fucked by all the angels in heaven. Data gets submitted, the form is reset but the function called to refresh the JSON data doesn't work.
Someone please kill me or I swear I will fucking kill everybody.4 -
Spent about an hour wondering why my php code was showing in the browser window after submitting a form using Ajax. Found that I had start my php file with just <? And not <?php. Feeling dumb.4
-
At my school library there is this system, made in php, to make monthly reports on student access, since everyone goes to the library everyone knows it and the guys who did it were considered the best of the school. So since I used to work on the library the director asked me to add some features to it, and I was like "Sure, cool I get to work on a real system", what I didn't know was that the system had no head or tail, the core were two files "load.php" and "db.php", everything was in those two files, no design patterns, no oops, safly that wasn't even the worst part, the modules were loaded through Ajax, which called files with lines like
`echo "<td>Student</td>";`
Literally most of the damn HTML was "echoed" WTH,undefined another useless tag student stories legacy wk58 pichardo for president php hate nightmares -
I don't know why people here dislike php
It's been 3 years since I was introduced to php and I never find it unworthy to be used in my project at all
Last night it was my first freelancing project and the guy asked me to scrap a table from a stock market website in vba script and append the table values to the excel sheet. That looked easy, I kid you not, from the image he sent me that looked too easy.
I decided to accept it, fml. Cause that site was using fucking cookies and javascript to load the table values.
There was no way to implement shit that in vba under my current knowledge.
Let's fuck this shit and jump to php, I inspected the site and found a cookie was enabling the site to load another part of the site through GET request.
Once I knew what was holding that GET request url, curl came to rescue. I attached cookies and sent the request header and parsed the ajax script url and fetched the response (table data).
Parsed the fetched data using explode and Voila! I made the fucking working script in php
As for the vba script, I wrote code to get this csv, append it to the file and delete the csv8 -
Know what really grinds my gears?
People who refer to "ajax" as though it's a separate programming language, instead of what it is, which is an old shitty method in an old shitty library. What I do enjoy is people thinking it's dish soap. That will *never* not be funny to me.
Examples:
1. *generic job description*...5 years experience. Desired skills: HTML, Foundation, PHP, Ajax, Fortran, Assembly, Tagalog, smoke signals.
2. Someone in "marketing": "Do you know Ajax?"
3. Jackass in a coffee shop who uses moustache wax: "I'm an ajax programmer. Yeah I've heard of [any recent band], like twenty years ago. They suck."
Go die, and take ajax with you.2 -
I cant get a JSON object out of my query results!! I have been trying all day and I'm so frustrated and sad. I'm new to JavaScript, AJAX, and JSON. I just want to understand this. I've seen videos, tutorials, but I never get the expected results with jason_encode. And on the client side I don't even know if the request is good since I can't make the JSON object. :(14
-
personal projects, of course, but let's count the only one that could actually be considered finished and released.
which was a local social network site. i was making and running it for about three years as a replacement for a site that its original admin took down without warning because he got fed up with the community. i loved the community and missed it, so that was my motivation to learn web stack (html, css, php, mysql, js).
first version was done and up in a week, single flat php file, no oop, just ifs. was about 5k lines long and was missing 90% of features, but i got it out and by word of mouth/mail is started gathering the community back.
right as i put it up, i learned about include directive, so i started re-coding it from scratch, and "this time properly", separated into one file per page.
that took about a month, got to about 10k lines of code, with about 30% of planned functionality.
i put it up, and then i learned that php can do objects, so i started another rewrite from scratch. two or three months later, about 15k lines of code, and 60% of the intended functionality.
i put it up, and learned about ajax (which was a pretty new thing since this was 2006), so i started another rewrite, this time not completely from scratch i think.
three months later, final length about 30k lines of code, and 120% of originally intended functionality (since i got some new features ideas along the way).
put it up, was very happy with it, and since i gathered quite a lot of user-generated data already through all of that time, i started seeing patterns, and started to think about some crazy stuff like auto-tagging posts based on their content (tags like positive, negative, angry, sad, family issues, health issues, etc), rewarding users based on auto-detection whether their comments stirred more (and good) discussion, or stifled it, tracking user's mental health and life situation (scale of great to horrible, something like that) based on the analysis of the texts of their posts...
... never got around to that though, missed two months hosting payments and in that time the admin of the original site put it back up, so i just told people to move back there.
awesome experience, though. worth every second.
to this day probably the project i'm most proud of (which is sad, i suppose) - the final version had its own builtin forum section with proper topics, reply threads, wysiwyg post editor, personal diaries where people could set per-post visibility (everyone, only logged in users, only my friends), mental health questionnaires that tracked user's results in time and showed them in a cool flash charts, questionnaire editor where users could make their own tests/quizzes, article section, like/dislike voting on everything, page-global ajax chat of all users that would stay open in bottom right corner, hangouts-style, private messages, even a "pointer" system where sending special commands to the chat aimed at a specific user would cause page elements to highlight on their client, meaning if someone asked "how do i do this thing on the page?", i could send that command and the button to the subpage would get highlighted, after they clicked it and the subpage loaded, the next step in the process would get highlighted, with a custom explanation text, etc...
dammit, now i got seriously nostalgic. it was an awesome piece of work, if i may say so. and i wasn't the only one thinking that, since showing the page off landed me my first two or three programming jobs, right out of highschool. 10 minutes of smalltalk, then they asked about my knowledge, i whipped up that site and gave a short walkthrough talking a bit about how the most interesting pieces were implemented, done, hired XD
those were good times, when I still felt like the programmer whiz kid =D
as i said, worth every second, every drop of sweat, every torn hair, several times over, even though "actual net financial profit" was around minus two hundred euro paid for those two or three years of hosting. -
TLDR: I'm switching between many webstacks and its starting to hinder my progress. What is the best stack to use with bootstrap?
Ok, guys I really need your help with this.
Currently, I'm working on a bootstrap page and it requires more dynamic pieces to work. It has become frustrating to continue moving on from where I'm standing and thus I would like to switch it up a little. I'm not used to dealing with several languages at once. Right now, I'm pulling data from the server with PHP, and I'm trying to quickly pick up AJAX to update data asynchronously in the page. However, the problem I'm running into now is how do I connect everything within my page in a coherent way that doesn't become a disjointed mess?
My question is in order to start building a dynamic bootstrap website --that communicates with a server to get data-- what can I do to keep myself sane and make everything a little more organized?5 -
"Back-end" ahahahaha
Translating:
Back-end developer (São Paulo / Brazil)
Vacant job: Back-end developer
Assignments: Work as a Back-end developer, PHP, and MySQL. Develop tools/applications for the web with a DB.
Technical skills: Technical knowledge in PHP, Framework Code Igniter, HTML5, JavaScript (jQuery, Bootstrap, Json, and Ajax), responsive layouts and WordPress.
Projecting and modeling DB Knowledge. Good knowledge of usability, Cross-browser (IE7+, Chrome, Firefox, and Safari).
Desirable: Knowledge on Graphic Design and Front-end projects1 -
I took a project. Wild mix of php and html including db stuff and data processing. About 200 files, some 3000+ lines long with if else cases processed in another template/logic behemoth...
I wrote a js file included it at the footer of the monster and update dom + data via ajax on my own api implementation because I'm too afraid to write in any of those files.
I've been told its quality code and well documented3 -
!rant
Frontend people, I need your opinion.
I will soon start building the next version of a rather large project's frontend but I am mostly a backend guy.
It is a custom made web application (PHP, Postgres) that handles all business aspects of a shipping company of about 50 people (trucks, truck free space in shipments for new packages, package tracking via gps on the truck, invoicing, reselling shipping services to other businesses, everything).
The existing frontend is using an ancient version (1.x) of the YUI framework and uses AJAX heavily to refresh the user interface. It's usable, but maintaining and extending it is getting really hard as the project grows larger and larger and more systems are integrated.
So the question is, given this use case, what JS framework do I use and what is a good resource to start learning it?5 -
So here is the question.
Am a CS student and interested in app development languages like C++ and C#. And leaning a lot about those languages and practicing.
Today in our class some member from **** company came and they told us that are going to arrange a 2 days workshop for php, JS, Ajax, HTML and CSS languages. After that they are going to offer a internship also. 😃
So should I go or not?
Intrested in app development but still wanted to have knowledge about web. Really confused on what to do! 😕😕😕8 -
So, finally decided to write my first rant.
I finished today a function that takes the generated week calendar of a WordPress plugin and gives the user a nice print layout.
Problem: The plugin doesn't use the database for it's calendar, only for the events in the calendar. I had to write really unefficent code in jQuery(ajax) and PHP and additionally create a new table. Finally completed the code for printing out a selected day, the current week and a timespan that can be defined, every exception and input is now handled correctly .
Such a great feeling to be finally done with this 4000 rows code.
I hope that I will never again have to create a workaround for such a not-developer-friendly plugin.
Why do clients always want to use such plugins?!5 -
What exactly is a full-stack developer/engineer? I'm confused.
So, I worked as a freelance webdev for a US company where I redesigned a pretty complicated website from scratch with PHP, mysql, JavaScript, CSS, HTML5. I only mention those because it will important later.
Basically, it's a lame mvc framework I wrote which heavily relied on AJAX and bootstrap modals.
I built from mysql <=> PHP -> UI
I Also built an android app that communicates with the php api
I worked for 4.6 years and they were kind enough to give me the designation "Full Stack Engineer" so I could put that on my resume. Alright, cool.
Then I go to this interview and one interviewer took offense. He told me that, there are 3 tiers of web dev; Database, Backend shit and UI. And I'm not a full-stack engineer. He then asked me if I worked with frameworks like laravel, symphony etc. [I did but not in this project]. I didn't know what to say. The other interviewer tried to help me, "Do you know what it means? Or have you ever worked with React.js or Angular?".
Didn't get the job and I'm so embarrassed and just feel like I'm a fraud. How could I not know what full-stack is? And why did I put it in my resume? Fuck!
Anyway can anyone tell me what "full- stack *" is?
>inb4
>incoherent
>bad engrish
Just fuck my shit up fam5 -
I wrote my first proper promise today
I'm building a State-driven, ajax fed Order/Invoice creation UI which Sales Reps use to place purchases for customers over the phone. The backend is a mutated PHP OSCommerce catalog which I've been making strides in refactoring towards OOP/eliminating spahgetti code and the need for a massive bootstrapper file which includes a ton of nonsense (I started by isolating the session and several crucial classes dealing with currency, language and the cart)
I'm using raw JS and jquery with copious reorganization.
I like state driven design, so I write all my data objects as classes using a base class with a simple attribute setter, and then extend the class and define it's attributes as an array which is passed to the parent setter in the construct.
I have also populateFromJson method in the parent class which allows me to match the attribute names to database fields in the backend which returns via ajax.
I achieve the state tracking by placing these objects into an array which underscore.js Observe watches, and that triggers methods to update the DOM or other objects.
Sure, I could do this in react but
1) It's in an admin area where the sales reps using it have to use edge/chrome/Firefox
2) I'm still climbing the react learning curve, so I can rapid prototype in jquery faster instead of getting hung up on something I don't understand
3) said admin area already uses jquery anyway
4) I like a challenge
Implementing promises is quickly turning messy jquery ajax calls into neat organized promise based operations that fit into my state tracking paradigm, so all jquery is responsible for is user interaction events.
The big flaw I want to address is that I'm still making html elements as JS strings to generate inputs/fields into the pseudo-forms.
Can anyone point me in the direction of a library or practice that allows me to generate Dom elements in a template-style manner.4 -
What's the general Software Engineering rule of thumb again for frontend templating code?
If I look at certain websites, I notice some code smells in PHP such as:
$.modal = <?php echo $(base)["username"] != 'me' ?' ': echo 'style="display=none"' ?>
or just in general places in the code where PHP gets used as a templating engine for gluing together pieces of HTML code based on conditionals spread out over the codebase and the database itself too. To make things worse, this carries over to JavaScript ajax functions. As a developer, this to me just seems like spaghetticode.
On the other hand, many popular frameworks properly do templating, such as EJS, containing templating in one place and not mixing it with logic too much but just having simple output like <%= %>.
I know I've seen frameworks like Angular 1 contain pieces of HTML into directives, but maybe that's something different, more 'OO'-simulating or cleaner.3 -
I love and hate javascript. I set out to do a fully ajax/state driven form interface that operates with multiple interdependent data objects which all extend a base class.
React/Angular may have been a better call but I just didn't have time so I needed to rapid prototype in jquery /vanilla JS.
I'm in the midst of learning and refactoring all the ajax calls to promises and then to async/await, so it's a huge learning experience...
Meanwhile I've got to build objects to represent the data on the backend which is all legacy OScommerce/PHP
Hell of a ride. -
》CREATING A HUB《
• Hey everyone, Just asking your ideas on what you think may be good put into a hub i am currently working on. Something that may catch the users attention or that may even just be a help to them -
Coming from a PHP, JS and Flutter developer:
I want to start building more websites entirely with Js frameworks. The less the better. Needs to import json data, perform ajax requests etc.
Can't decide, do I learn Vue or Svelte?6 -
Guys i'm very confused for doing backend of phonegap. I have seen examples of phonegap app with php all by ajax requests and i have seen that we have sqllite plugin on phonegap too so is there ang way we can do backend without ajax as db is must in my app4
-
Please test this web tchat application that i coded from scratch using HTML/CSS/JS/PHP/AJAX. and give me your feedback. You can leave the feedback here or on that platform itself
(It is not live though, you need to press a refresh button to be able to see content update)
Here is the link
https://chatappag.000webhostapp.com/...5 -
I got situation here,
I am getting 524 error from cloud fare. I sent some data using AJAX, process it and then return the result. Since the data is large and have some SQL manipulation on it so it take a lot of time. I put the process in back end. But still even for 10k records it took 4-5 minutes to process, Issue is everything works fine but since cloud fare response time is 1-2 minute so it through 524 error (as it does not getting any response within its time frame). How I am suppose to tackle this. May be using job scheduler now ? My client simply refuse to send small data. My Friend is suggesting don't use ajax, simply reload the page. But again data is too much so page loading will also through 524 error. Kindaa stuck here. Any idea/suggestion how I can proceed.
Language I am using PHP. Database, MySQL and SQL.
Hmm Here is some more explanation
https://github.com/marcialpaulg/...
But not working
Here is also something
https://stackoverflow.com/questions...
But I am thinking why redirecting ? It doesn't make sense to me7 -
Ok this is either my code, socket.io or China. So I wrote DApp for my crypto project but for some reason our Chinese users have problems using it... So i dig through our code for HOURS! and finally resort to making an AJAX call from the client to a hideous PHP script for logging and what do i find?
For some reason the WebSocket cannot connect. I haven't mapped this so it's only conjecture but I think the GFW is blocking my users connections? (Also using a VPN seems to fix it)
Anyone else had this issue?1