Top Banner
Nishant S Mevawala Msc in Information Technology Bharati Vidyapeeth University, Pune Advance Programming Languages
35
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Adv programming languages

Nishant S MevawalaMsc in Information Technology

Bharati Vidyapeeth University, Pune

Advance Programming Languages

Page 2: Adv programming languages

Generation Languages Domain Specific Languages “Django-MTV” & “Micro format” Design Pattern Rebol Action Script Fortran

List of Topics

Page 3: Adv programming languages

1st to 5th Generation languages

Page 4: Adv programming languages

Generation languages

• 1GL or first-generation language was machine language and data that the processor is actually given to work on (which in conventional computers is a string of 0s and 1s).

• 2GL or second-generation language is assembler (sometimes called "assembly") language. A typical 2GL instruction looks like this:

An assembler converts the assembler language statements into machine language.

ADD 12, 8

Page 5: Adv programming languages

Generation languages(Con..)

• 3GL or third-generation language is a "high-level" programming language, such as PL/I, C, or Java.Java sample code :

A compiler converts : high-level programming language -> machine language. (this is called bytecode)

class HelloWorld {   public static void main(String[] args)   {  System.out.println("Hello World!");   } }  

Page 6: Adv programming languages

Generation languages(Con..)

• 4GL or fourth-generation language is mostly designed for Database. A 4GL language statement might look like this:

EXTRACT ALL CUSTOMERS WHERE "PREVIOUS PURCHASES" TOTAL MORE THAN $1000

Page 7: Adv programming languages

Generation languages(Con..)

• 5GL or fifth-generation language is programming that uses a visual or graphical development interface to create source language that is usually compiled with a 3GL or 4GL language compiler.

• A good example of a fifth generation language is Visual Basic.

Page 8: Adv programming languages

Domain Specific Languages

Page 9: Adv programming languages

Domain Specific LanguagesA domain-specific language (DSL) is a type of programming Language or specification language in software development.Domain engineering dedicated to a particular problem domain, a particular problem representation technique, and/or a particular solution technique.Examples of domain-specific languages include

• HTML, Logo for pencil-like drawing VHDL hardware description languages• Mata for matrix Programming• Mathematic and Maxima for symbolic mathematics• Spreadsheet formulas and macros• SQL for relational database queries Regular expressions for specifying

lexers

Page 10: Adv programming languages

Design Pattern

Page 11: Adv programming languages

Django-MTV• Django is open source Web framework written in Python. Django loosely

follows MVC design pattern. Django follows slightly modified version of MVC design pattern called MTV design pattern.

• MTV stands for Model-Template-View. • Model

A Model in Django is a Python class which represents a table from database. You dont need to write complex SQL queries to get records from Database. You can do it by writing Python code itself.

• ViewIn Django views contains all business logic code.

• TemplateThese are the HTML pages which create User Interface. Django comes with very powerfull templating system.

Page 12: Adv programming languages

Microformat – include• The include pattern is a microformat design pattern, providing

a mechanism to include a portion of data from one area of a page into another area of the same page, allowing the data to be reused by multiple microformats, independent of content order, without repeating all the information.

• following is documentation for re-use of the pattern in other microformats, and for publishers working with it.

• the scope, the object 'data' attribute and hyperlink 'href' attribute must be local ID references when used as include pattern instances.

Page 13: Adv programming languages

Rebol

Page 14: Adv programming languages

History1997

REBOL was designed by Carl Sassenrath. he developed REBOL concepts from the programming languages Lisp, Forth, Logo, and Self.

1998REBOL Technologies was founded in 1998.

1999REBOL 2, the interpreter, which became the core of extended interpreter editions, was first released in 1999.

2000REBOL/Command, which added strong encryption and ODBC access, was released in September 2000.

Page 15: Adv programming languages

History (Con..)2001

REBOL/View was released in April 2001, adding graphical abilities on the core language.REBOL/IOS, an extensible collaboration environment built with REBOL was released in August 2001.

2002REBOL/SDK, providing a choice of kernels to bind against, as well as a preprocessor, was released in December 2002.

2008REBOL 3, the newest version of the REBOL interpreter, is currently in development. Alpha versions have been released publicly since January 2008.

2012REBOL 3 interpreter has been released under Apache 2.0 license on 12/12/2012

Page 16: Adv programming languages

Introduction

• REBOL is a Relative Expression Based Object Language

cross-platform languagedata exchange languagemulti-paradigm dynamic programming language

• The language and its official implementation are developed by REBOL Technologies. REBOL Technologies also claims the name REBOL as a trademark.

• Using REBOL JavaScript introduced JSON.• REBOL has been used to

program Internet applications (both client- and server-side), database applications and multimedia application

Page 17: Adv programming languages

What is REBOL?

• REBOL is a uniquely small and productive development tool that can be used to create powerful desktop software, dynamic CGI web site and server applications, rich distributed browser plug-in applications, mobile apps, and more.

Page 18: Adv programming languages

Data Types

Decimal 1.2A number with a fractional component

Integer 4A whole number

Binary #{ccffcc}Numbers that don't use a 10-based system (binary, hex, 64-encoded)

Block [ 1 1.2 "Dude!" ] A collected group of values and words

Email [email protected] An email address

File %path/to/file.txtThe name of a file or directory

Hashto-hash [ 1 "uno" 2 "dos" 3 "tres" ]

A specialized block for quickly finding data - sort of like dictionaries or associative arrays in other languages

Image image: load %logo.jpg

A specialized block for holding RGB images - You can also use binary formatting to describe the image within the document itself, if you want

Page 19: Adv programming languages

Data Types (Con..)

Issue #Pock-Y-STX-5

Handy for phone numbers, serial codes, clone identification, or credit cards

List to-list[1 2 3]

A specialized block for quickly handling large numbers of insertions and removals

Paren 1 + (2 * 3)

A block that forces immediate evaluation of the values and words it contains

Path /geekery/rebol/datatypes

Used to navigate to or find something. Think of subscripting or object methods, and you're along the right track.

String "Dude! What's mine say?"

A series of characters. What we humans often use to form words and sentences.

Page 20: Adv programming languages

Data Types (Con..)

Tag <img src="slor.jpg" /> An HTML tag. Having tags as a native datatype makes parsing and writing Web pages very simple.

URL http://www.rebol.com/ A URL, used for finding stuff on the Internet.

Character #"Z" Not a string, but a single, solitary character.

Date 23-Dec-04A single specific calendar date, and sometimes the time to go along with it - can be created in a dizzying number of ways in REBOL

Logic TRUE The basic boolean values used for evaluating any yes or no questions.

Money $8.24 Monetary values. That stuff I never seem to have 2 days after payday.

Page 21: Adv programming languages

Data Types (Con..)None none Nothing. No value. Not even zero. Zen, man.

- okay, I'm getting a little goofy now

Pair 320x200 An (X,Y) ordered pair used for coordinates on a display or sizes.

Refinement system/version Modifiers used to indicate some variation or extension in the meaning of a value - Adjectives, basically. Neat, eh?

Time 16:25Hours, minutes, and even seconds, if you like. An entire category of C programming exercises becomes meaningless thanks to this

Tuple 127.0.0.1 A "dotted series" of integers, often useful for version numbers, net addresses, and color values.

Words word Symbols used by REBOL. Might be a variable - or not, depending on how you use it.

Page 22: Adv programming languages

Implementation

• Just Type on console

• Output

view layout [text "Hello world!" button "Quit" [quit]]

Page 23: Adv programming languages

Documentation

• Just refer it

http://musiclessonz.com/rebol_tutorial.html#section-1

Page 24: Adv programming languages

ActionScript

Page 25: Adv programming languages

History• It was design in 1998 by Gary Grossman

• ActionScript 3.0 was released in June 27, 2006

• Action Script started as an object-oriented language for Macromedia's Flash tool developed by Adobe Systems as Adobe Flash.

• Early Flash developers attach a simple command, called an "action", to a button or a frame. The set of actions was basic navigation controls, with commands such as

• "play", "stop", "getURL", and "gotoAndPlay".

Page 26: Adv programming languages

Data Types

ActionScript 2 top level data types• String - A list of characters such as "Hello World"• Number - Any Numeric value• Boolean - A simple binary storage that can only be "true" or

"false".• Object - It allows for the grouping of methods, functions,

parameters, and other objects.

Page 27: Adv programming languages

Data Types (Con..)ActionScript 3 primitive (prime) data types (see Data type descriptions)• Boolean - The Boolean data type has only two possible values: true and

false or 1 and 0.• int - The int data type is a 32-bit integer.• Null - The Null data type contains only one value, null. • Number - The Number data type can represent integers, unsigned

integers, and floating-point numbers• String - The String data type represents a sequence of 16-bit characters. • uint - The uint (Unsigned Integer) data type is a 32-bit unsigned integer.• void - The void data type contains only one value, undefined.

Page 28: Adv programming languages

Data Type Implement

• var item1:String="ABC";

• var item2:Boolean=true;

• var item3:Number=12;

• var item4:Array=["a","b","c"];

• var item5:Object={name:"Actionscript",version:"3.0"};

Page 29: Adv programming languages

Implementation

• Just type code on Action Frame of Flash :

var greet:TextField = new TextField();greet.text = "Hello World";

this.addChild(greet);

Page 30: Adv programming languages

Fortran

Page 31: Adv programming languages

History• It was designed by John Backus.

• Fortran is a general purpose programming language, mainly used for mathematical calculations in science applications.

• Fortran is mostly for FORmula TRANslation, and was originally capitalized as FORTRAN.

• 1st high-level programming language, Fortran started in the 1950's at IBM but Appeared in1957.

Page 32: Adv programming languages

Version

FORTRAN 77 : Character-based data , Array Programming , Modular programming

FORTRAN 90 : Generic Programming – Specific TypeFORTRAN 95 : High performance Fortran – Parallel ComputingFORTRAN 2003 : Object-Oriented Programming FORTRAN 2008 : Concurrent Programming – Thread Base

Page 33: Adv programming languages

Basic Data Types

• integer • real• double • logical• character

Page 34: Adv programming languages

Implementation

• Just type small code :

• See Your Output on screen

program helloworld print *, "Hello, world." end program helloworld

Page 35: Adv programming languages

Just Follow me on Twitter

https://twitter.com/nishantmeva