Monday, April 1, 2019
Advantages Of Scripting Language Computer Science Essay
Advantages Of Scripting Language Computer Science EssayA account word of honoring lecture is a form of programming address that is routined to crap scripts or bits of jurisprudence. Scripting deliverys are often written to facilitate enhanced features of websites, these features are graceful on the practiser but the script of a specific foliate menstruates on the users browser. The origin of the term was similar to its meaning in a movie script tells actors what to do a scripting lecture controlled the operation of a norm anyy-interactive program, giving it a sequence of work to do all in one batch. For instance, one could put a series of editing commands in a file, and tell an editor to exit that script as if those commands had been theatrical roled interactively.Advantages of scripting spoken communicationIts easy to learn and useMinimum programming knowledge or experience required allow fors complex tasks to be performed in relatively a couple of(prenominal) ste psAllows simple creation and editing in a grade of task editorsAllows the addition of dynamic and interactive activties to web pagesThe editing and zip legislation is fastDisadvantages of scripting languageCan be slower to run since they are interpreted and non compiled into machine principle. Can be harder to rectify since no development environment is available by default. Since they are school text based it is easy for other people to modify and thus break apart it.Why modern web pages use javascript? browser comport- To access blaze content you deal to install flash tidy sumin into your browser.But to use Javascript you dont need to install a plugin for it, becuase all web browsers contain accepted javascript as a scripting language for them and provides support for it.With the use of javascript you sight add miscellaneous features like user authentication, validation etcJavascript easily reads and writes hypertext mark-up language elements and ordure be embedd ed into a HTML easily.You outhouse use Javascript to load the page according to the requirement of the browserIt is the most light programming language which usher out be easily loaded on slow internet.An bodily function event can be created with the use of javascript, when a user clicks a button, various events which is not contingent through HTML Javascript has the ability to counterbalance on it.Explain the following features of JavaScript, giving an example of all(prenominal)Objects Javascript has build in objects, approximately of them are string, date and array.Events A JavaScript can be executed when an event occurs, like when a user clicks on an HTML element. These events can occur when a user clicks the mouse, when a web page has loaded and when an image has been loaded.Methods There are a lot of javascript methods, legion(predicate) of them are anchor, feed, att destruction, big and blind. Each of these methods are variant, for example an anchor method plac es an HTML anchor that has a NAME attribute around text, an apply method applied a method of an object substituting other object for the current object.Loops Javascript loops often runs with arrays these loops are used to run the comparable code over and over again, each time with a various value. For example in javascript for is a loop that loops through a oppose of code a number of times, while loop, loops through a lug of code while a specified condition is true.Functions Javascripts has many functions some of them are abs, acos and asin. Each of these methods are divers(prenominal). Abs function slide bys the absolute value of a number, an acos function returns the arccosine of a number.JavaScript is an object orientated language. Describe what this means.Is JavaScript object-oriented? It has objects which can apprehend data and methods that act upon that data. Objects can contain other objects. It does not have classes, but it does have constructors which do what cla sses do, including acting as containers for class variables and methods. It does not have class-oriented inheritance, but it does have prototype-oriented inheritance.The both main charges of construct up object systems are by inheritance (is-a) and by compendium (has-a). JavaScript does both, but its dynamic nature allows it to excel at aggregation.JavaScript is not in truth object oriented because it does not provide inheritance. But it turns protrude that JavaScript supports not only classical inheritance, but other code reuse patterns as well.Task 2 M2Explain in detail how scripting languages can be used to improve the functionality of web pages.Scripting languages, which can be embedded indoors HTML, commonly are used to add functionality to a Web page, such(prenominal) as different menu personal manners or graphic displays or to serve dynamic advertisements. These types of languages are lymph node- view scripting languages, affecting the data that the end user sees in a browser window.Why use Scripting Languages?Quite often we craving to automate a simple task running several programs in a row, installing programs, even writing a simple script or GUI to run a program that needs many parameters.Scripting languages allow us to write such a thing quickly, and run it without any compilation. They also have good support for launching processes and irresponsible them, parsing text files, etc.With a script, theres never the question of where is the source? or did i re-compile it after i fixed that bug? the script _is_ the source. knob side and Server side leaf node sideIn Client side the scripting does all the calculations on the users computer. The web browser or a specific plugin reads the script and converts it into a visual web page.Front end context uses scripting through a user interface. There are many ways a user interface uses scripting one is that it resizes parts of the webpage to micturate it all fit properly.It also resizes boxes.Most of the information that the user enters into the website rest in the client side and sometimes sent back to the server. Javascript can obtain external files and images. It then exploits all of this using web analytic programs, the server can retrieve all the information from all of these.The passing between client side and server sideThe difference is sensibly simple client side code is elegant by the client (the browser to be more specific) while the server code is processed by the server . A typical web page as far as the client is concerned consists of some of HTML utilize by CSS, or Javascript. Server side code, on the other ease up is never seen by the browser. The browser is not and should never need to be aware of server side scripts such as PHP. Server side code is browser independent which means that if the page you create looks different in internet explorer than it does in opera.Client Side advantagesAllow for more interactivity by immediately responding to users worksMay improve the usability of web sites for users whos browsers support scriptsCan give developers more control over the look and deportment of their web widgetsSecure as it is protected which means it is not possible to read by users, prevents it from world stolenClient Side disadvantagesNot all browsers support scripts therefore users might experience errors if no alternatives are provided contrasting browsers and browser versions support scripts other than thus more quality interrogation is requiredMore development time and effort might be requiredServer side advantagesComplex processes become more high-octaneDoes not need to rely on specific browsers or plug insYou can make a webside dynamic, PHP a server side scripting language have features such as you can to add a username and wordServer side disadvantagesLess immediateCan slow protrude your web siteE.g. AJAX, accessibility, alerts, confirming choices, prompting the user, redirecting the user, browser maculation, creating rollovers, checking/validating input, intervention forms, maintaining cookiesTask 3 P5 (b)Design interactive scripts using scripting languages (JavaScript) that can be embedded onto the website created in assignment 1.Select 2 of the following (you may choose your own if you wish) that you must include into a minimum of dickens web pagesJavaScript slideshowRandom image generatorweb browser version/type catchingSoftware plug-in detectionFeedback form using JavaScript validationFor each of your chosen scripts crapDesignA play chart or Pseudo codeImplementationAnnotated screen shots of the scripts in action on the web pages.Correct structure of HTML code which includes correct pitting of the code and well commented. M3 (b)Printouts of the scriptsTesting P6 (b)A turn up table containing the variables being tested, test data, expected results and actual results.Task 4 D1Investigate and produce a report (minimum 1 page) that explains at least(prenominal) three examples o f how web pages using scripts are implemented differently in two different browsers, for example, Internet Explorer and Firefox.Browser cogencyBrowsers have varying levels of conformation with Style Sheets. This means that some Style Sheet features are back up and some arent. To confuse things more, some browser manufacturers decide to come up with their own proprietary tags.Fortunately, browser compatibility is becoming less of an issue as the latest browser versions are much more standards-compliant than their earlier counterparts.Browser capability is a headache for Javascript coders around the world. There are two ways to allow conditions within your script such as Javascript to tamp down different paths depending on capabilityThese two ways are1. Browser detection2. Object detectionBrowser detectionBrowser detection checks with the browser directly to see which make and model it is. This allows you to choose which code to run on your browser. Browser detection is capable of working out the browser and version being used. This allows the web page to use the duty code which is to visually display.Browser detection cryptogramfunction thisBrowserIs(browserTest)if(navigator.userAgent.indexOf(browserTest)=-1)return trueThis is an example of browser detection coding. This code means that if it can find the string being passed to this function within the navgator user promoter property, then return trueObject detectionObject detection allows you to check if an aspect of the script language definition exists before stressful to use it.It means that the script can detect whether certain objects can work with a specific browser.Object detection exampleif (document.images)do something with the images arraySeparate style sheetsYou want to make sure that your style sheets works on most internet browsers. There is different coding with different browsers.Creating Separate Style Sheets for Internet Explorer and FirefoxIE and Mozilla compensate CSS instructions di fferently. It can be annoying but, there is a way to get around it. Make multiple style sheets, one for each type of browser. Then customize each style sheet for its alike browser.Create two style sheets, one for IE browsers) and one for either other kind of browserTell Internet Explorer to use a separate style sheet by inserting the following code between your header tags. Change the name and path of the css files to that of the css files on your site. The code must appear in this order.Task 5 D2Write a report that evaluates the website that you have created stating good points, bad points and discuss at least four different methods that could be used to improve the created web site.I created a website to a book shop called Harlington book store. It took me 3 weeks to on the whole finish the website with all the books and prices. As I had previous experience in creating websites this website was quite enjoyable to create. I used three main color on my website so it would look m ore professional and creative. I include 9 pages to this website and I have created a menu bar so the user can navigate to these pages. To make this website user friendly I have created alt tags and I have checked the browser capability of the website.During this period I had many problems creating the website such as I had to transfer the books one by one with prices and for each book I had to download the book cover. This took me more than a week to finish all the books. another(prenominal) problem I faced was when I had to resize all the images of the book to the same size. Uploading the books were the most hated part when creating this website apart from that creating the website was very enjoyable. star thing to improve this website would be to create a database so when modify the books can be automatically uploaded on the website instead of uploading on the website itself.Checklist for appellative 2 JavaScript ImplementationContentY/NCommentsTASK 1Describe the main features of the chosenscripting language(P3)Explain what a scripting language is and why is it used in the modern web pagesObjectsEventsMethodsLoopsFunctionsJavaScript is an object orientated language. Describe what this means.TASK 2(M2)Explain in detail how scripting languages can be used to improve the functionality of web pages.TASK 3Design, create and test web pages using scripts to implement interactivity. (P5 b) (P6 b) (M3 b)Script 1A flow chart or Pseudo codeScreen shots of the scripts in action on the web page.Comment and indent your codePrintouts of the scriptsA test table for the scriptScript 2A flow chart or Pseudo codeScreen shots of the scripts in action on the web page.Comment and indent your codePrintouts of the scriptsA test table for the scriptTask 4(D1)How scripts are implemented differently in two different browsers. (3 Examples)Task 5(D2)Website Evaluation
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.