a) What do you think will be the best method for including JQuery in your web application?
jQuery has many awesome benefits. Its functionality is much cleaner making the load times for web pages faster, than web pages that use applications such as Flash. jQuery also makes it easier to play with the DOM, add effects and seamlessly execute Ajax requests, and it is free open source software. One thing is for sure; jQuery is here to stay because major corporations such as Microsoft and Google use it.
One way to include jQuery in your site design is to include the <script> element below, which will install jQuery's library into your Web page so you don't have to download it.
<script type="text"/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
Another way to include the jQuery library is to use the Google CDN. Since Google hosts several open sourced libraries on its CDN, you benefit from Google's reliable infrastructure and speed. Here is one of the paths you can use:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="script.js"></script>
Some of benefits of jQuery are:
- Cross-browser compatibility
- Better user experience - don't have to download Flash player
- Easier implementation for Web Developers
- Smaller files, faster load times
- Simplifies AJAX
- Web pages will display even if JavaScript is disabled
- Large supportive helpful community of experts
b) In what instances can you imagine it being better to code your own JavaScript rather than use a code library like JQuery?
There may be some instances where you may not want to use the jQuery library. For instance, if you want a specific effect done a certain way, it may be beneficial to code it yourself. Another example may be when using the canvas element in HTML5. Knowing some JavaScript can help you better understand how the canvas element works at creating interactive websites, especially games. Even though jQuery offers a huge wealth of resources that make developing a site far less time consuming, understanding JavaScript will help you to better understand the nuts and bolts of the site design.
The more you understand about jQuery and JavaScript the better. I look forward to furthering my skills and using my knowledge to create interesting, interactive websites.
No comments:
Post a Comment