O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

COMPUTER LANGUAGES AND THERE DIFFERENCE

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Carregando em…3
×

Confira estes a seguir

1 de 42 Anúncio
Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (20)

Semelhante a COMPUTER LANGUAGES AND THERE DIFFERENCE (20)

Anúncio

Mais recentes (20)

COMPUTER LANGUAGES AND THERE DIFFERENCE

  1. 1. Introduction of Programming Languages
  2. 2. Programming Language Concepts ► What is a programming language? ► Why are there so many programming languages? ► What are the types of programming languages? ► Does the world need new languages?
  3. 3. ► A programming language is a set of rules that provides a way of telling a computer what operations to perform. ► A programming language is a set of rules for communicating an algorithm ► It provides a linguistic framework for describing computations
  4. 4. 1957 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 FORTRAN I FORTRAN II FORTRAN IV FORTRAN 77 FORTRAN 90 FLOW-MATIC f LISP Visual BASIC •SNOBOL " Scheme * ICON • COMMON LISP
  5. 5. Programming Languages
  6. 6. Traditional Programming Languages ► FORTRAN ◦ FORmula TRANslation. ◦ Developed at IBM in the mid-1950s. ◦ Designed for scientific and mathematical applications by scientists and engineers.
  7. 7. Traditional Programming Languages (cont’d.) ► COBOL ◦ COmmon Business Oriented Language. ◦ Developed in 1959. ◦ Designed to be common to many different computers. ◦ Typically used for business applications.
  8. 8. Traditional Programming Languages (cont’d.) ► BASIC ◦ Beginner’s All-purpose Symbolic Instruction Code. ◦ Developed at Dartmouth College in mid 1960s. ◦ Developed as a simple language for students to write programs with which they could interact through terminals.
  9. 9. Traditional Programming Languages (cont’d.) - c ◦ Developed by Bell Laboratories in the early 1970s. ◦ Provides control and efficiency of assembly language while having third generation language features. ◦ Often used for system programs. ◦ UNIX is written in C.
  10. 10. Object-Oriented Programming Languages ► Simula ◦ First object-oriented language ◦ Developed by Ole Johan Dahl in the 1960s. ► Smalltalk ◦ First purely object-oriented language. ◦ Developed by Xerox in mid-1970s. ◦ Still in use on some computers.
  11. 11. Object-Oriented Programming Languages (cont’d.) ► C++ ◦ It is C language with additional features. ◦ Widely used for developing system and application software. ◦ Graphical user interfaces can be developed easily with visual programming tools.
  12. 12. Object-Oriented Programming Languages (cont’d.) ► JAVA ◦ An object-oriented language similar to C++ that eliminates lots of C++’s problematic features ◦ Allows a web page developer to create programs for applications, called applets that can be used through a browser. ◦ Objective of JAVA developers is that it be machine, platform and operating system independent.
  13. 13. HISTORY:HISTORY:
  14. 14. •PythonPython is a general-purpose, interpretedis a general-purpose, interpreted high-level programminghigh-level programming languagelanguage • Like other dynamic languages, Python is often used asLike other dynamic languages, Python is often used as a scripting language, but is also used in a wide range of nonscriptinga scripting language, but is also used in a wide range of nonscripting contexts.contexts. • Like Java, once written, programs can be run on any operating system.Like Java, once written, programs can be run on any operating system. •It features a fullyIt features a fully dynamic typedynamic type system and automatic memorysystem and automatic memory management, similar to that of Scheme, Ruby, Perl, andTcl.management, similar to that of Scheme, Ruby, Perl, andTcl. ADVANTAGES:ADVANTAGES:
  15. 15. PythonPython:> Python is newer.:> Python is newer. > It is loosly typed language.> It is loosly typed language. > It's runtime is slow.> It's runtime is slow. > It's code are faster to write.> It's code are faster to write. > It is really fun to write with its easier, and its rich features.> It is really fun to write with its easier, and its rich features. > As python is gaining levels really fast.> As python is gaining levels really fast. C:> C is old.C:> C is old. > It is pretty strictly typed language.> It is pretty strictly typed language. > It's runtime is extremely fast.> It's runtime is extremely fast. > It's code are slow to write.> It's code are slow to write. > C is "richer" and becaust its "older", its used in more apps, and in the open source> C is "richer" and becaust its "older", its used in more apps, and in the open source community its more helpful.community its more helpful. > Since, kernel and many basic commands are made in c.> Since, kernel and many basic commands are made in c.
  16. 16. HISTORY AND EVOLUTION OF R Origin in the Bell Labs in the 1970's Bell Laboratories
  17. 17. HISTORY AND EVOLUTION OF R R has developed from the S language Developed 30 years ago for research applied to the high-tech industry
  18. 18. HISTORY AND EVOLUTION OF Riiii The regular development of R 1990's: R developed concurrently with S 1993: R made public Acceleration of R development ■ R-Help and R-Devl mailing-lists ■ Creation of the R Core Group Source: R Journal Vol 1/2
  19. 19. ADVANTAGES & DISADVANTAGES: ˆ *R is free and open source software, allowing anyone to use and, importantly, to modify it. R is licensed under the GNU General Public License, with copyright held by The R Foundation for Statistical Computing. ˆ *R has no license restrictions (other than ensuring our freedom to use it at our own discretion), and so we can run it anywhere and at any time, and even sell it under the conditions of the license. *R has over 4800 packages available from multiple repositories specializing in topics like econometrics, data mining, spatial analysis, and bio-informatics. *R is cross-platform. R runs on many operating systems and different hardware. It is popularly used on GNU/Linux, Macintosh, and Microsoft Windows, running on both 32 and 64 bit processors. ˆ *It has a steep learning curve i.e. difficult to master solution: practice , practice, practice
  20. 20. What Are Scripts?What Are Scripts? O A new style of programming language different from systemO A new style of programming language different from system programming languagesprogramming languages O It does not matter what scripting language a website uses becauseO It does not matter what scripting language a website uses because there are no compatibility issues with clients' web browsers.there are no compatibility issues with clients' web browsers. O Designed as glue language or system integration languageO Designed as glue language or system integration language O A single statement can execute huge number of machine instructionsO A single statement can execute huge number of machine instructions O Can create dynamic web pages O Change based on user inputO Can create dynamic web pages O Change based on user input O The client only ever sees the final HTML generated by the script andO The client only ever sees the final HTML generated by the script and not the script itself.not the script itself. O Scripts often finish running in several milliseconds. Most web serversO Scripts often finish running in several milliseconds. Most web servers can run many scripts simultaneously with a minimal performancecan run many scripts simultaneously with a minimal performance hit.hit.
  21. 21. Two Types O Server-side Scripting Language O Can use huge resources of the server O Complete all processing in the server and send plain pages to the client O Reduces client-side computation overhead O Client-side Scripting Language O Does not involve server processing O Complete application is downloaded to the client browser O Client browser executes it locally O Are normally used to add functionality to web pages e.g. different menu styles, graphic displays or dynamic advertisements
  22. 22. Static Web Pages Client Machine With Web Browser 1. Client requests page I n t e r n e t 2. Web server sends the HTML file to the client Web Server • A simple website is made up of one or more static HTML files. This means the page content does not change. • The only way to update a page is for the author to edit the file. • This is fine for small websites or those that require little updating. • Static pages will not work for websites that need to deliver lots of custom and up-to-date content: e-commerce, auctions, blogs, search engines, online banking
  23. 23. Dynamic Web Pages The facebook homepage could be considered static because it has a fixed layout and content. It does not change. After Login results page however is dynamic. This means its content can be changed. The only practical way to create this page is by using a script The user never sees the work a script does, only the end result it sends back to their browser.
  24. 24. Perl, Python, Ruby O Perl O Found on all Windows and Linux servers O Can handle text manipulation tasks O Excellent web scripting language O high-traffic websites that use Perl extensively include Priceline.com, Craigs List, IMDB O Python O Can be used as a script or a programming language O OOP language with a lot of features which support of web applications as well as software programs O Industrial Light & Magic: "The Phantom Menace", "The Mummy Returns" O Walt Disney Feature Animation: uses scripts in their animation production system. O Shopzilla: configuration management and deployment, automated testing and internal tool development.
  25. 25. JavaScript O JavaScript O Java and JavaScript are two completely different languages in both concept and design O Client-side & server-side scripting language O Enhance dynamics and interactive features of a web page O Allows one to perform calculations, write interactive games, add special effects, customize graphic selections, create security passwords O used in millions of web pages O to improve the design O to validate forms O to detect browsers O to create cookies
  26. 26. JavaScript and HTML page Tells where the JavaScript starts<html> <body ><scripftype="text/javascript"> document.write("Hello World!"); </script ></html> Tells where the JavaScript ends Commands for writing output to a page This code produce the output on an HTML page: Hello World!
  27. 27. WEB APPLICATIONS LANGUAGES
  28. 28. A language is a language is a language ► Programming languages are languages ► When it comes to mechanics of the task, learning to speak and use a programming language is in many ways like learning to speak a human language ► In both kind of languages you have to learn new vocabulary, syntax and semantics (new words, sentence structure and meaning) ► And both kind of language require considerable practice to make perfect.
  29. 29. But there is a difference! ► Computer languages lack ambiguity and vagueness ► In English sentences such as I saw the man with a telescope (Who had the telescope?) or Take a pinch of salt (How much is a pinch?) ► In a programming language a sentence either means one thing or it means nothing
  30. 30. What determines a “good” language ► Formerly: Run-time performance ◦ (Computers were more expensive than programmers) ► Now: Life cycle (human) cost is more important ◦ Ease of designing, coding ◦ Debugging ◦ Maintenance ◦ Reusability
  31. 31. CRITERIA READABILITY WRITABILITY REALIABILITYCharacteristic Simplicity/ orthogonality Control structures Data types and structures Syntax design Support for abstraction Expressivity Type checking Exception handling Restricted aliasing * * * * * * * * * * * * * * * * * * *
  32. 32. ► Writability: a language that enables a programmer to use it to express a computation clearly, correctly, concisely, and quickly. ► Readability: The quality of a language that enables a programmer to understand and comprehend the nature of a computation easily and accurately. ► Orthogonality: The quality of a language that features provided have as few restrictions as possible and be combinable in any meaningful way. ► Reliability: a language that assures a program will not behave in unexpected or disastrous ways during execution. Maintainability: The quality of a language that eases errors in be found and corrected and new features added.
  33. 33. Criteria (Continued) ► Uniformity: The quality of a language that similar features should look similar and behave similar. Extensibility: The quality of a language that provides some general mechanism for the user to add new constructs to a language.
  34. 34. Control statements In 19In 19thth Century (1950-1960)programming languages are very difficult for readingCentury (1950-1960)programming languages are very difficult for reading due to some keywords ,after that in 1970 they found that due to “goto” keyword itdue to some keywords ,after that in 1970 they found that due to “goto” keyword it is difficult to readis difficult to read EX:EX: C:C: while (a<93){while (a<93){ while(sum<=100){while(sum<=100){ sum+=incr;}sum+=incr;} incr++;incr++; }} FORTRAN: loop1: if(incr>=20) goto out; loop2: if(sum>100)goto next; sum+=incr; go to loop2; next: incr++; go to loop1; out;
  35. 35. DATA TYPES AND STRUCTURES:DATA TYPES AND STRUCTURES: In some languages there is no boolean type in past languages so ,it is difficult to read timeout=1 A lanuage with boolean type can be represented like this timeout=True  In present languages record for an employee can be done very esaily but in past it is difficult Fortran: Character (Len=30) Name(100) Integer Age (100 ), Employee_Name(100) Real Salary (100)
  36. 36. Exception handling : The ability of a program to intercept the run time errors is called exception handling •In c we didn’t have exception handlings functions •Exception handlings are introduced in Ada , c++ , java •The main aim of exception handling is to take program corrective measures and then • then it will get executed Aliasing : *If two r more variables are pointing to the same memory , *if we modify any one variable Value the remaining variables will effect
  37. 37. *Through the process of abstraction, a programmer hides all but the relevant data about an object in order to reduce complexity and increase efficiency. *By using this we can display only a particular information related to any user so that we can provide security for the user ABSTRACTION: TYPE CHECKING : There are two types of type checking Static and Dynamic *Static Type Checking: Type checking done at compile-time. When using these languages you are enforced to declare the type of variables before using them E.g., C,C++,JAVA,C# are some Statically Typed Languages *Dynamic Type Checking: Type checking done at run time. When using these languages you need not specify or declare the type of variable E.G ., VBScript , Python are Dynamically typed languages.

×