Gaurav Aggarwal
Gaurav Aggarwal

Reputation: 10177

Should we use Jquery and AngularJs with progressive web apps?

I am trying to build one progressive test app but all the tutorial I have read yet are using native JavaScript. My question is can we use Jquery for writing code more easily and can we use MVC framework angular js for more efficient coding experience?

Is it a good approach or is there any problems with using any one of them or both of them?

Note : Its not about using jquery with angularjs. Its about using angularjs or jquery with progressive web apps.

Upvotes: 2

Views: 1643

Answers (2)

Sorskoot
Sorskoot

Reputation: 10310

Progressive web apps are just websites, so technically you can use every framework you want. If you should use them is a whole other question. I won't advice using jQuery or Angular for your developer convenience. For example, if you want to select some elements from code by using $, try something like:

window.$ = function (selector) { return document.querySelectorAll(selector); };

That way you don't need jQuery for that. The same goes for pretty much every framework. Do you really need it? Or is it just bloating your codebase. Always keep in mind you want a reliable, fast and engaging experience. Do the frameworks you use contribute to that?

Upvotes: 4

404answernotfound
404answernotfound

Reputation: 771

Progressive web apps are more of an application manifest where you use certain items (like web workers) and cache results that are often used in a way so that the user doesn't have to wait as much time as normally when loading, launching a web application. As an example, think about storing the base64 value of a profile image directly into the user localstorage rather than reloading it every single time from the server, better UX and better server performance, just like that. Also, there are certain elements that can help further the user experience, like Push notifications. To answer your question, yes, you can use any library you want, especially from CDNs so that the loading time would be faster because, as an example, the jQuery library is already in the user cache from previous website visits or possibly on a node nearer to the user than to the actual CND.

Upvotes: 1

Related Questions