🔒 Closed Using Ajax (JQuery or Vanilla Javascript)

Status
Not open for further replies.

FinestWork

Honorary Poster
Good day sa mga experts natin diyan.

Ano po sa tingin niyo best practice ngayon sa ajax call? Hindi kaya masiyadong mabigat si JQuery kung Ajax lang ang gagamitin ko sa library na 'to or gamit nalang ako ng Vanilla JavaScript sa pag handle ng call? Please enlighten me po mga master.
 
Overkill ang jQuery kung http call lang naman ang concern mo at walang DOM manipulation or any third party library na dependent sa jQuery. Promised based http call na ang ginagamit natin ngayon mula noong naging standard ang ES6 sa web at hindi na callback functions gaya kung paano gamitin ang jquery ajax.

Pwede mo gamitin yung native You do not have permission to view the full content of this post. Log in or register now. na built-in na sa browser kung basic http request lang naman gagawin mo pero hindi pa siya standard sa lahat ng browser particularly Opera mini at IE.

fetch.webp


Pero kung mas stable at extra features or advance pa gaya ng isa sa mga ito:
  • Authentication
  • Request cancellation
  • Streams
  • Simultaneous request
then go for You do not have permission to view the full content of this post. Log in or register now., less bundle size compare to jquery.

axios.webp
 
Wow! Never ko pa narinig 'yung axios pero i-tra-try ko ito.

Thank you sir sa pag sagot sobrang na-appreciate ko po answer niyo, 'yun talaga pino-problema ko, pag gumamit ako ng ES6 sa pag handle ng ajax call hindi lahat ng browser supported 'yung features.

Need ko talaga i-support 'yung feature na ajax lalo na't halos naka-mobile 'yung users ko, sa tingin mo sir, sa case ko, since hindi ko p'wede gamitin 'yung fetch API or promises, do you think worth it na pag-aralan si axios? Thank you po!
 
[XX='FinestWork, c: 320207, m: 1560760'][/XX]

HIndi mo naintindihan.

ES6 -> version ng javascript
Fetch API -> Web API
Axios -> Javascript Library
Promises -> Programming pattern / technique

Pag-aralan mo muna basics ng javascript from ES5 - ES9. Huwag ka munang gumamit ng axios kung hindi mo pa alam kung ano ang Promise at Async/Await. 😉
 
Thank you sir pero sa tingin ko hindi na related ang jQuery ngayon sa ginagawa kong project since hindi naman dependent lahat ng javascript codes ko dito sa library na 'to.
 
Check this: You do not have permission to view the full content of this post. Log in or register now. and test it, kung gusto mong 1 library lang para sa lahat ng kailangan mo sa dom manipulation, mag jQuery ka. You can also test the speed of the site sa gtmetrix, I only used fetch API sa pagload ng assets.

Don't be one of them, they keep telling jQuery is an old man and useless just because they feel na wala na daw sa uso at di ko0l lol.
 
Status
Not open for further replies.

About this Thread

  • 10
    Replies
  • 427
    Views
  • 6
    Participants
Last reply from:
Zyzz

Online now

Members online
969
Guests online
2,979
Total visitors
3,948

Forum statistics

Threads
2,276,141
Posts
28,967,846
Members
1,231,131
Latest member
Yrrojan
Back
Top