• Save
Scripting languages presentation_michel_patrickfrancis
Upcoming SlideShare
Loading in...5
×
 

Scripting languages presentation_michel_patrickfrancis

on

  • 603 views

 

Statistics

Views

Total Views
603
Views on SlideShare
218
Embed Views
385

Actions

Likes
1
Downloads
0
Comments
0

16 Embeds 385

http://omondi-oloo.blogspot.co.at 176
http://omondi-oloo.blogspot.com 95
http://www.omondi-oloo.blogspot.co.at 86
http://omondi-oloo.blogspot.de 6
http://www.omondi-oloo.blogspot.com 4
http://omondi-oloo.blogspot.com.au 3
http://omondi-oloo.blogspot.in 2
http://omondi-oloo.blogspot.fr 2
http://omondi-oloo.blogspot.ca 2
http://omondi-oloo.blogspot.co.uk 2
http://omondi-oloo.blogspot.nl 2
http://omondi-oloo.blogspot.sg 1
http://omondi-oloo.blogspot.com.es 1
http://omondi-oloo.blogspot.it 1
http://omondi-oloo.blogspot.tw 1
http://omondi-oloo.blogspot.co.nz 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Scripting languages presentation_michel_patrickfrancis Scripting languages presentation_michel_patrickfrancis Presentation Transcript

  • Michel Schwandner, Patrick Havel, Francis OlooFundamentals and Concepts of Software Engineering-Winter 2012/13
  •  1. Scripting languages 2. PHP 3. Python 4. Perl 5. Comparison
  •  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: http://www.webopedia.com/TERM/S/scripting_language.html)
  •  Characteristics: implicit declared variables▪ dynamic typecast▪ valid for functions too automatic memory management Interpreted code
  •  fields of application: command-line interpreters▪ sh▪ cmd Scripting languages in internet applications▪ PHP▪ Perl▪ Python
  •  fields of application: Scripting languages in program library▪ VBScript▪ JScript Scripting languages in programs▪ QuakeC▪ UnrealScript
  •  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
  •  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
  •  Characteristics: own scripting language with its own interpreter close to C or Java syntax support of object orientated approach extensive function library
  •  Characteristics: server-sidescripting language embedded into anHTML source document orin a proper PHP file
  •  Fields of application: originally designed forWeb development Database connection HTML forms Dynamic generation of graphs and file upload most famous application is the LAMP
  • 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
  •  Examples: embedded in HTML Code▪ <script language="php"> ... </script>▪ file extension .html own PHP document▪ <?PHP .... ?>▪ <? .... ?>▪ file extension .php
  •  Code examples:
  •  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)
  •  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
  • 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,…)
  •  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,…
  • Example 1:Example 2:
  •  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
  •  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
  •  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
  •  Applications in geoinformatics A number of modules exist at CPAN for handlinggeographic data, GPShttp://www.cpan.org/modules/01modules.index.html Can be used for constructing GIS tools forhandling and editing geocoded data on a maphttp://www.isprs.org/proceedings/xxxv/congress/yf/papers/934.pdf
  • 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
  • •The program should be saved as a .pl format
  •  Hash:Two dimensional arrays with keys andvalues e.g
  • 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
  • Many thanks-Comments??