Advanced Programming Giuseppe Attardi Dipartimento di Informatica Università di Pisa.

Slides:



Advertisements
Similar presentations
.NET Technology. Introduction Overview of.NET What.NET means for Developers, Users and Businesses Two.NET Research Projects:.NET Generics AsmL.
Advertisements

COM vs. CORBA.
Spring, Hibernate and Web Services 13 th September 2014.
CIM2564 Introduction to Development Frameworks 1 Overview of a Development Framework Topic 1.
Introduction To System Analysis and Design
Review Amit Shabtay. March 3rd, 2004 Object Oriented Design Course 2 Review What have we done during the course? Where to learn more? What is for the.
Object Oriented System Development with VB .NET
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
Scripting Languages For Virtual Worlds. Outline Necessary Features Classes, Prototypes, and Mixins Static vs. Dynamic Typing Concurrency Versioning Distribution.
Programming Languages Structure
CS CS 5150 Software Engineering Lecture 13 System Architecture and Design 1.
Software Engineering Module 1 -Components Teaching unit 3 – Advanced development Ernesto Damiani Free University of Bozen - Bolzano Lesson 2 – Components.
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Tahir Nawaz Visual Programming C# Week 2. What is C#? C# (pronounced "C sharp") is an object- oriented language that is used to build applications for.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Software Architecture in Practice (3rd Ed) Introduction
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
.NET, and Service Gateways Group members: Andre Tran, Priyanka Gangishetty, Irena Mao, Wileen Chiu.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Design Patterns Discussion of pages: xi-11 Sections: Preface, Forward, Chapter
Introduction to Object-oriented Programming CSIS 3701: Advanced Object Oriented Programming.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 18 Slide 1 Software Reuse.
Software Engineering Muhammad Fahad Khan
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
VS.NET Syllabus By Peter Huang.
1 8/29/05CS360 Windows Programming Professor Shereen Khoja.
ASP.NET  ASP.NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required.
Advanced Programming Giuseppe Attardi Dipartimento di Informatica Università di Pisa.
CIS 375—Web App Dev II Microsoft’s.NET. 2 Introduction to.NET Steve Ballmer (January 2000): Steve Ballmer "Delivering an Internet-based platform of Next.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
Todd Snyder Development Team Lead Infragistics Experience Design Group.
Ceg860 (Prasad)L6MR1 Modularity Extendibility Reusability.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Architecting Web Services Unit – II – PART - III.
Unified Modeling Language, Version 2.0
Introduction To System Analysis and Design
Design Patterns: Structural Design Patterns
January 25, 2006copyright Thomas Pole , all rights reserved 1 Software Reuse: History 1980 to 2005 History: Changes to Software Reuse Driven by.
Frameworks CompSci 230 S Software Construction.
OBJECT ORIENTED AND FUNCTION ORIENTED DESIGN 1 Chapter 6.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Introduction (Continued) Design Patterns (I) Lecture Two.
Object Orientation Yaodong Bi, Ph.D. Department of Computer Sciences University of Scranton January 12, 2016January 12, 2016January 12, 2016.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
J AVA T RAINING IN A HMEDABAD By TOPS Technologies 1 TOPS Technologies Java Course.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
6.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
Scott C. Johnson Lecturer Rochester Institute of Technology Spring 2016.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Introducing the Microsoft® .NET Framework
Design Patterns: MORE Examples
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
Objects First with Java A Practical Introduction using BlueJ
Hierarchical Architecture
Object-Orientated Programming
CMPE419 Mobile Application Development
Module 1: Getting Started
Objects First with Java A Practical Introduction using BlueJ
Quality Assurance for Component-Based Software Development
Objects First with Java A Practical Introduction using BlueJ
Programming Languages, Preliminaries, History & Evolution
CMPE419 Mobile Application Development
Presentation transcript:

Advanced Programming Giuseppe Attardi Dipartimento di Informatica Università di Pisa

Language is an instrument of human reason, not merely a medium for the expression of thought. G. Boole, An Investigation of the Laws of Thought, 1854

Instructor Giuseppe Attardi Office: 292 Mail: Giuseppe Attardi Office: 292 Mail:

Introduction Programming in the 21 century Programming in the 21 century Software as complex as ever Software as complex as ever Command line interface not enough Command line interface not enough Data comes from multiple sources: structured (DB) and unstructured Data comes from multiple sources: structured (DB) and unstructured Single computer not enough Single computer not enough Software development is a group activity Software development is a group activity Deployment on Web or mobile devices Deployment on Web or mobile devices

Requirements Cannot start from scratch Cannot start from scratch Reusable components are needed Reusable components are needed OS + libraries not enough OS + libraries not enough

Elements of a Solution Software Framework Software Framework Component Model Component Model Execution Environment Execution Environment

More Complex Software Object-Oriented Programming allows ever larger applications to be built Object-Oriented Programming allows ever larger applications to be built Require increased high-level application and system oversight Require increased high-level application and system oversight Multi-tier applications development increases the choices on how to build applications Multi-tier applications development increases the choices on how to build applications A new Software Architect Role is needed A new Software Architect Role is needed

Software Architect Duties Creating, defining or choosing an application framework Creating, defining or choosing an application framework Creating the component design Creating the component design Structure a complex application into pieces Structure a complex application into pieces Understand the interactions and dependencies among components Understand the interactions and dependencies among components Select the platform based on cost/performance criteria Select the platform based on cost/performance criteria Organize and supervise the “construction site” Organize and supervise the “construction site”

Application Framework A software framework used to implement the standard structure of an application for a specific development environment A software framework used to implement the standard structure of an application for a specific development environment

Software Framework A collection of common code providing generic functionality that can be selectively overridden or specialized by user code providing specific functionality A collection of common code providing generic functionality that can be selectively overridden or specialized by user code providing specific functionality Frameworks, like software libraries, provide reusable abstractions of code wrapped in a well-defined API Frameworks, like software libraries, provide reusable abstractions of code wrapped in a well-defined API

Framework Features Inversion of control Inversion of control –unlike in libraries, the overall program's flow of control is not dictated by the caller, but by the framework –Hollywood Principle: Don’t call us, we’ll call you Default behavior Default behavior Extensibility: usually by selective overriding Extensibility: usually by selective overriding Non-modifiable framework code Non-modifiable framework code

OO Software Framework Object-oriented programming frameworks consists in a set of abstract classes Object-oriented programming frameworks consists in a set of abstract classes An application can be built simply inheriting from pre-existing classes in the framework An application can be built simply inheriting from pre-existing classes in the framework Instantiation of a framework consists of composing and subclassing the existing classes Instantiation of a framework consists of composing and subclassing the existing classes

Examples of Frameworks GUI GUI –MFC –Gnome –Qt General General –Android –Spring –Cocoa Web Web –ASP.Net –GWT –Rails Concurrence Concurrence –Hadoop Map/Reduce

Class Hierarchy (NextSTEP 1988)

Cocoa (2013)

Benefits of Frameworks Drives solution Drives solution –Dictates how to fill-in-the-blanks Helps solving recurring problems Helps solving recurring problems –Designed for reuse –High value, since reduces cost of development

Framework Design Intellectual Challenging Task Intellectual Challenging Task Requires a deep understanding of the problem domain Requires a deep understanding of the problem domain Requires mastering of software patterns, OO methods and polymorphism in particular Requires mastering of software patterns, OO methods and polymorphism in particular

Design Pattern More abstract than frameworks More abstract than frameworks –Frameworks can be embodied in code, but only examples of patterns can be embodied in code –Design patterns explain the intent, trade-offs, and consequences of a design Smaller architectural elements than frameworks Smaller architectural elements than frameworks –A typical framework contains several design patterns but the reverse is never true. Less specialized than frameworks Less specialized than frameworks –Frameworks always have a particular application domain –Design patterns can be used in nearly any kind of application

Examples Visitor Visitor Publish/Subscribe Publish/Subscribe Factory Factory Dependency Injection Dependency Injection Chain of Responsibility Chain of Responsibility Observer Observer Iterator Iterator Decorator Decorator

Dependency Injection Allows avoiding hard-coded dependencies and changing them Allows avoiding hard-coded dependencies and changing them dependencies Allows selection among multiple implementations of a given dependency interface at run time Allows selection among multiple implementations of a given dependency interface at run time Examples: Examples: –load plugins dynamicallyplugins –replace mock objects in test environments vs. real objects in production environmentsmock objects

Course Objectives Understand programming language technology: Understand programming language technology: –Execution Models –Run-time Analyze programming metaphors: Analyze programming metaphors: –Objects –Components –Patterns Learn advanced programming techniques Learn advanced programming techniques Understand their limits ad how to overcome them Understand their limits ad how to overcome them

Course Objectives Explain how high level programming concepts and metaphors map into executable systems and which are their costs and limitations Explain how high level programming concepts and metaphors map into executable systems and which are their costs and limitations Acquaint with modern principles, techniques, and best practices of advanced software construction Acquaint with modern principles, techniques, and best practices of advanced software construction Introduce techniques of programming at higher abstraction levels, in particular generative programming, component programming and web computing Introduce techniques of programming at higher abstraction levels, in particular generative programming, component programming and web computing Present state-of-the-art frameworks incorporating these techniques Present state-of-the-art frameworks incorporating these techniques

Syllabus

Programming Language Foundations Syntax, Parsing, Abstract Syntax Tree, Parser Generators Syntax, Parsing, Abstract Syntax Tree, Parser Generators Names, Scope, Binding Names, Scope, Binding Parameter Passing Parameter Passing Static and Dynamic Allocaltion: Stack, Heap Static and Dynamic Allocaltion: Stack, Heap Types, Inheritance, Polymorphism, Overloading Types, Inheritance, Polymorphism, Overloading Delegates, Closures Delegates, Closures Exception Handling Exception Handling

Run-time Systems Virtual Execution Environment Virtual Execution Environment –Memory Management –Thread Management –Exception Handling –Security –Debugging Support –AOT and JIT Compilation –Dynamic Link/Load –Reflection –Verification Language Interoperability Language Interoperability

Advanced Techniques Generic Programming Generic Programming –C++ templates –C# Generics –Java Generics Generative Programming Generative Programming –Metaprogramming –Reflection –Template –Aspect Oriented Programming –Generators

Interoperability Process level: interprocess communication Process level: interprocess communication Language level: CORBA/IDL Language level: CORBA/IDL Object level: DCOM Object level: DCOM

Component Based Programming COM COM JavaBeans JavaBeans.NET (Assembly, Reflection, Interfaces, Attributes).NET (Assembly, Reflection, Interfaces, Attributes) OSGi OSGi

Web Programming Web Services, SOA Web Services, SOA Web Frameworks Web Frameworks Web 2.0 Web 2.0

Web Services XML, XML-Schema XML, XML-Schema SOAP, RPC, Rest SOAP, RPC, Rest WSDL WSDL UDDI UDDI

Web Frameworks and Applications Asp.Net Asp.Net ADO.Net ADO.Net J2EE J2EE Java Server Faces Java Server Faces JQuery JQuery AJAX: XHR, jQuery, YUI, GWT AJAX: XHR, jQuery, YUI, GWT Mashup and Service Oriented Architecture Mashup and Service Oriented Architecture

Scripting Languages Perl Perl Python Python JavaScript JavaScript PHP PHP

Text Books Programming Language Pragmatics, third ed., Michael L. Scott, Morgan-Kaufmann, Generative Programming: Methods, Tools, and Applications, Krzysztof Czarnecki, Ulrich Eisenecker, Addison-Wesley, Object Thinking, David West, Microsoft Press, 2004.

Text Books jQuery in ActionjQuery in Action, B. Bibeault, Y. Katz, Manning, jQuery in Action

Assessment Mid Term Paper: early November, one week homework Mid Term Paper: early November, one week homework Term Paper: at the end of the course, 20 days homework Term Paper: at the end of the course, 20 days homework

Final Term Paper Aims at exercising ability to conceive and implement full solutions to a nontrivial problem Aims at exercising ability to conceive and implement full solutions to a nontrivial problem Examples: Examples: –ASP Code generator with regular expression matcher –Implement a DSL for handling persistent object containers –SOAP protocol and SOAP server –Code generator for searching an object DB –Xpath and XSLT Intrepreter –Language for generating network protocols –AJAX Framework –Unit Testing Framework –State Charts

Home Work Develop a simple implementation of primitives: Develop a simple implementation of primitives: –void* malloc(size_t size) –void free(void*) Assume to have available a block of memory of size MemSize starting at MemStart Assume to have available a block of memory of size MemSize starting at MemStart Discuss the limits of the solution Discuss the limits of the solution