Tuesday, June 4, 2019

Advantages Of Scripting Language Computer Science Essay

Advantages Of scripting Language Computer Science EssayA scripting language is a form of political platformming language that is manipulationd to create scripts or bits of commandment. Scripting languages argon often written to facilitate enhanced features of electronic net blend insites, these features are process on the server but the script of a unique(predicate) scallywag runs on the exploiters web browser. The origin of the term was similar to its meaning in a movie script tells actors what to do a scripting language controlled the operation of a norm eithery-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 run that script as if those commands had been typed interactively.Advantages of scripting languageIts easy to learn and useMinimum programming knowledge or induce requiredAllows complex undertakings to be performed in relatively few stepsAllows simple creation and editing in a variety of task editorsAllows the addition of dynamic and interactive activties to web pagesThe editing and running tag is fastDisadvantages of scripting languageCan be slower to run since they are interpreted and not compiled into machine code. Can be harder to debug since no development environment is available by default. Since they are text based it is easy for other(a) people to modify and thus travel it.Why modern web pages use javascript?Browser support- To access flash content you need to set flash plugin into your browser.But to use Javascript you dont need to install a plugin for it, becuase all web browsers have accepted javascript as a scripting language for them and provides support for it.With the use of javascript you can add various features like user authentication, validation etcJavascript easily reads and writes HTML elements and can be embedded into a HTML easily.You can use Javascript to load the page according to the requirement of the browserIt is the most light programming language which can be easily loaded on slow internet.An action event can be created with the use of javascript, when a user clicks a button, various events which is not possible through HTML Javascript has the ability to react on it.Explain the following features of JavaScript, giving an exemplification of eachObjects Javascript has built in objects, some(a) 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 method actings, some of them are anchor, apply, attend, big and blind. Each of these methods are different, for example an anchor method places an HTML anchor that has a NAME attribute around text, an apply method applied a method of an object substituting another object for the current object.L oops Javascript loops often runs with arrays these loops are apply to run the same code e realwhere and over again, each time with a different value. For example in javascript for is a loop that loops through a block of code a effect of times, while loop, loops through a block of code while a specified condition is true.Functions Javascripts has many licks some of them are abs, acos and asin. Each of these methods are different. Abs function returns the absolute value of a number, an acos function returns the arccosine of a number.JavaScript is an object orientated language. Describe what this center.Is JavaScript object-oriented? It has objects which can contain 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 classes do, including acting as containers for class variables and methods. It does not have class-oriented inheritance, but it does have prototype-oriented inheritance.Th e two main ship canal of building up object systems are by inheritance (is-a) and by aggregation (has-a). JavaScript does both, but its dynamic nature allows it to excel at aggregation.JavaScript is not actually object oriented because it does not provide inheritance. But it turns out that JavaScript supports not only classical inheritance, but other code reuse patterns as well. working class 2 M2Explain in detail how scripting languages can be used to improve the functionality of web pages.Scripting languages, which can be embedded within HTML, commonly are used to add functionality to a Web page, such as different menu styles or graphic displays or to serve dynamic advertisements. These types of languages are client- brass scripting languages, touching the data that the end user sees in a browser window.Why use Scripting Languages?Quite often we wish to automate a simple task running several programs in a row, installing programs, even writing a simple script or GUI to run a p rogram 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 open processes and controlling 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. lymph gland side and Server sideClient 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 even out it all fit properly.It also resizes boxes.Most of the information that the user enters into the website stays in the client side and sometimes sent back to the server. Javascript can obtain external files and images. It then exploits all of this usin g web analytic programs, the server can retrieve all the information from all of these.The difference between client side and server sideThe difference is fairly simple client side code is processed 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 implemented by CSS, or Javascript. Server side code, on the other throw 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 actionsMay improve the usability of web sites for users whos browsers support scriptsCan give developers more control over the look and behaviour of their web widgetsSecure as it is protected which means it is not possible to read by users, prevents it from being stolenClient Side disadvantagesNot all browsers support scripts therefore users might experience errors if no alternatives are providedDifferent browsers and browser versions support scripts differently thus more quality shewing is requiredMore development time and stew might be requiredServer side advantagesComplex processes become more efficientDoes 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 war cryServer side disadvantagesLess immediateCan slow d experience your web siteE.g. AJAX, accessibility, alerts, confirming choices, prompting the user, redirecting the user, browser contracting, creating rollovers, checking/validating input, handling forms, maintaining cookies parturiency 3 P5 (b)Design interactive scripts using scripting languages (JavaScript) that can be embedded onto the website cre ated in assignment 1.Select 2 of the following (you may choose your take in if you wish) that you must include into a minimum of two web pagesJavaScript slideshowRandom image generatorBrowser version/type stainingSoftware plug-in detectionFeedback form using JavaScript validationFor each of your chosen scripts produceDesignA flow chart or Pseudo codeImplementationAnnotated assort shots of the scripts in action on the web pages.Correct structure of HTML code which includes correct indentation of the code and well commented. M3 (b)Printouts of the scriptsTesting P6 (b)A test 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) collar examples of how web pages using scripts are implemented differently in two different browsers, for example, net profit Explorer and Firefox.Browser capabilityBrowsers have varying levels of conformism with Style Shee ts. This means that some Style Sheet features are supported 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 take 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 right code which is to visually display.Browser detection codingfunction thisBrowserIs(browserTest)if(navigator.userAgent.ind exOf(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 agent property, then return trueObject detectionObject detection allows you to check if an aspect of the script language definition exists before trying 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 handle CSS instructions differently. 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 corresponding browser.Create two style sheets, one for IE bro wsers) and one for every 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 completely cease 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 colours on my website so it would look more professional and creative. I included 9 pages to this website and I have created a menu bar so the user can sail 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 upload 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 coda all the books. Another 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.One thing to improve this website would be to create a database so when updating the books can be automatically uploaded on the website instead of uploading on the website itself.Checklist for subsidisation 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 d etail 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 valuation

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.