Scripting languages presentation_michel_patrickfrancis


Published on

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Scripting languages presentation_michel_patrickfrancis

  1. 1. Michel Schwandner, Patrick Havel, Francis OlooFundamentals and Concepts of Software Engineering-Winter 2012/13
  2. 2.  1. Scripting languages 2. PHP 3. Python 4. Perl 5. Comparison
  3. 3.  Definition:Scripting languages, which can be embedded withinHTML, commonly are used to add functionality to a Web page, suchas different menu styles or graphic displays or to serve dynamicadvertisements. These types of languages are client-side scriptinglanguages, affecting the data that the end user sees in a browserwindow. Other scripting languages are server-side scriptinglanguages that manipulate the data, usually in a database, on theserver.(from:
  4. 4.  Characteristics: implicit declared variables▪ dynamic typecast▪ valid for functions too automatic memory management Interpreted code
  5. 5.  fields of application: command-line interpreters▪ sh▪ cmd Scripting languages in internet applications▪ PHP▪ Perl▪ Python
  6. 6.  fields of application: Scripting languages in program library▪ VBScript▪ JScript Scripting languages in programs▪ QuakeC▪ UnrealScript
  7. 7.  comparison with programming languagesScripting languages Programming languagesInterpreter Compilermostly imperative programmingparadigmmostly object orientated programmingparadigmslowly -> code interpretation duringruntimevery fast runtimeautomatic memory management memory management (pointertechnique (C, C++))typeless strict type handling
  8. 8.  introductory and historical aspects development began in 1994 started with a set of Perl scripts calling "PersonalHome PageTools“ free software released under the PHP License almost 80% of the web pages using PHP final version 6 will publish soon
  9. 9.  Characteristics: own scripting language with its own interpreter close to C or Java syntax support of object orientated approach extensive function library
  10. 10.  Characteristics: server-sidescripting language embedded into anHTML source document orin a proper PHP file
  11. 11.  Fields of application: originally designed forWeb development Database connection HTML forms Dynamic generation of graphs and file upload most famous application is the LAMP
  12. 12. Pros Conseasy to learn -> close to C, java andhuman languagesno byte code cachea lot of fields of applications procedural programming in objectorientated libraryseparation of code and layout weak typecastfeature rich security problemFree interpreted language -> slow runtimebrowser independency automatic memory managementuseable on each OSyoung language
  13. 13.  Examples: embedded in HTML Code▪ <script language="php"> ... </script>▪ file extension .html own PHP document▪ <?PHP .... ?>▪ <? .... ?>▪ file extension .php
  14. 14.  Code examples:
  15. 15.  Introduction and History Python from Monty Python Python fun to use 1989: implementation by Guido van Rossum(Netherlands) 1991: appearance 2000: version 2.0 2008: version 3.0 (backwards incompatible) 2007/2010:TIOBE Programming Language of theYear Award actual versions:▪ 3.3.0 (sept. 2012)▪ 2.7.3 (april 2012)
  16. 16.  Characteristics language integration: C, C++, Java full modularising standard libraries for GIS, databases, importantinternet protocols, mathematics, statistics, … Block structures everything is an object Multi-paradigm language: object-oriented style,the traditional procedural style or a mix of those
  17. 17. Pro Conseasy to learn no special syntax to distinguish methodsand functions (methods -> self)clean and elegant design not as fast as C or C++include high-level data types script lengtheasily build GUI (Tkinter) Slow run-timeexception handling Version 3.0: downward incompatibilitywell-established developmentcommunity and a central Web site(Python tools and extension modules)large standard libraryopen sourcefor many platforms(Unix,Windows, Mac OS X,…)
  18. 18.  Applications Web applications (Apache web server) Scientific: NumPy, SciPy, Matplotlib,ArcPy 3D animation packages (Blender, Cinema 4D…) GIS-Software:ArcGIS , Quantum GIS,Grass GIS,etc. Others:Youtube, BitTorrent, Google, NASA,CERN,…
  19. 19. Example 1:Example 2:
  20. 20.  Perl : Practical Extraction and Reporting Language Originally developed by LarryWall in 1987 An interpreted language: does not need to becompiled as separate step Perl programs are text files run through aninterpreter Current version 5.16.2
  21. 21.  Characteristics Can run both onWindows and UNIX/Linux InWindows can be run through the Command lineeditor You need to define the location of Perl Script The version can be stated within the script
  22. 22.  Typical applications Text processing System administration: tying smaller scripts, working with filesystems and networking Web programming: Used to process and generate HTML Database interaction Mail processing: automated processing of internet emails includingfiltering by address and content Automating file retrieval via FTP
  23. 23.  Applications in geoinformatics A number of modules exist at CPAN for handlinggeographic data, GPS Can be used for constructing GIS tools forhandling and editing geocoded data on a map
  24. 24. Pros ConsPortable Poor documentation/ Informal support,mainly through volunteersVery dense code thus saving on codingtimeIs an interpreted language, therefore notas fastGood with text handling Protecting proprietary code; notcompiled thus can only distributed ascodesBackward compatibility Maintainability of scriptsVery flexibleMassive library of reusable codes
  25. 25. •The program should be saved as a .pl format
  26. 26.  Hash:Two dimensional arrays with keys andvalues e.g
  27. 27. criteria Python PHP Perlobject orientedprogramingsimple buteffective approach downright easyweak -> most of the ofapproaches aren’timplementedprovidesOOP featuresof data encapsulationand inheritance usingmodules and packagesruntime Worst of thesethreerelatively fast in proceduralapproachVery good speedsespecially for testprocessingmodularity Full modularising store repeated code inseparated functionsFull modularisingthrough modules andpackagescode length Depending onapplication, butover all worsedifferent possibilities howto write the codeHighly optimizedsecurity modules and“community” forsecuritynot that safe (include, userinteractions)User input vulnerability
  28. 28. Many thanks-Comments??