software development foundations, 1/12/12

26
SOFTWARE DEVELOPMENT FOUNDATIONS, 1/12/12 J. Yates Monteith, Clemson University

Upload: tyanne

Post on 10-Feb-2016

28 views

Category:

Documents


0 download

DESCRIPTION

Software Development Foundations, 1/12/12. J. Yates Monteith , Clemson University. Introductions. Welcome! Who am I? Why am I here? Why should you be listening to me? Syllabus Aside on cheating. Introduction to Java Introduction to Eclipse Write Programs Time. Who am I?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Software Development Foundations, 1/12/12

SOFTWARE DEVELOPMENT FOUNDATIONS, 1/12/12J. Yates Monteith, Clemson University

Page 2: Software Development Foundations, 1/12/12

Introductions Welcome! Who am I?

Why am I here? Why should you be listening to me?

Syllabus Aside on cheating.

Introduction to Java Introduction to Eclipse Write Programs Time

Page 3: Software Development Foundations, 1/12/12

Who am I? J. Yates Monteith, M.S.

You can call me Yates or Mr. Monteith. Either. I Don’t care. Advisor: Dr. John McGregor

Education: B.S. Computer Science, Manhattan College 2008

(Go Jaspers!) M.S. Computer Science, Clemson University 2010

(Go Tigers!) Ph.D. Computer Science, Clemson University 20…15?

Interests: Music, Software Product Lines, Software Ecosystems,

Software Engineering, Writing Code. Favorite Languages: C++, PHP, Java. In that order.

Page 4: Software Development Foundations, 1/12/12

Why Should You Listen To Me? Past Experience

CPSC 111 Teaching Assistant (2008) – 3 Sections

CPSC 120 Teaching Assistant (2009) – 3 Sections

CPSC 215 Teaching Assistant (2010) – 2 Sections

CPSC 215 Guest Lecturer (2010) – 2 Lectures

CPSC 215 Guest Lecturer (2011) – 2 Lectures

CPSC 372 Substitute (2009-2011) CPSC 871 Substitute (2011) CPSC 875 Substitute (2010-2011)

Page 5: Software Development Foundations, 1/12/12

More on Me… So I’ve got a little bit of experience. If you want more info, check my C.V. and

Resume on my website.

Page 6: Software Development Foundations, 1/12/12

Syllabus http://www.cs.clemson.edu/~jymonte/

docs/cpsc215s12/syllabus.pdf

Page 7: Software Development Foundations, 1/12/12

About This Course… Software Engineering

Software Development is just a small part of Software Engineering.

We will be learning the principles and activities that lead to good software development. Class and Module Design Design Patterns for reusable functionality Testing

Cross Language

Page 8: Software Development Foundations, 1/12/12

More about this course… Java is the The Language.

No other substitutes allowed. Why?

Java is great for a wide range of development projects and topics.

Has a thriving tools community that develops tools and super tools to make certain activities much easier (re: testing).

Java is Object Oriented with less attention to detail than C++.

Also, Java Runtime, Virtual Machine-platform independence, etc…

Page 9: Software Development Foundations, 1/12/12

So what about Java? Released in 1995 by Sun, developed by James

Gosling. Now owned by Oracle

General Purpose language focused on OO programming. General Purpose in that it can do anything any other

language can do. Why Java then? Often described as: Simple, OO, Distributed,

Multithreaded, Dynamic, Portable, Architecture Neutral, Robust, Secure, etc…

Highly portable because of Byte Code, the JVM and the Java Runtime Library…

Page 10: Software Development Foundations, 1/12/12

Byte Code and the JVM The JVM is the Java Virtual Machine.

It’s a virtual machine in which Java Code is executed. Developed by Sun, it is multi-platform, multi-architecture.

Anything can run it. Java utilizes this through compiling to Java Byte Code.

In C/C++, we compile down to assembly code which is highly architecture dependent.

The assembler then translates the assembly code to machine code, which is even more architecture dependent.

In Java, we compile down to Java Byte code which is then interpreted by the Java Virtual Machine.

Page 11: Software Development Foundations, 1/12/12

Byte Code and the JVM

Page 12: Software Development Foundations, 1/12/12

Byte Code and the JVM Why is this a great idea? What do we gain from this? What do we lose from this?

Cited from [1]

Page 13: Software Development Foundations, 1/12/12

Byte Code and the JVM Why is this a great idea?

It means that we only need to write a Virtual Machine for all targeted architectures, instead of a translator that takes Byte Code to machine code for each processor architecture and type

What do we gain from this? What do we lose from this?

Page 14: Software Development Foundations, 1/12/12

Byte Code and the JVM Why is this a great idea?

It means that we only need to write a Virtual Machine for all targeted architectures, instead of a translator that takes Byte Code to machine code for each processor architecture and type

What do we gain from this? Portability! Duh. We can run a Java

program with very little setup on any computer that can run the JVM.

What do we lose from this?

Page 15: Software Development Foundations, 1/12/12

Byte Code and the JVM Why is this a great idea?

It means that we only need to write a Virtual Machine for all targeted architectures, instead of a translator that takes Byte Code to machine code for each processor architecture and type

What do we gain from this? Portability! Duh. We can run a Java program with very

little setup on any computer that can run the JVM. What do we lose from this?

Performance. Because optimization relies heavily on architecture specific features, and the JVM is architecture-neutral, we cannot exploit those features for better performance.

Page 16: Software Development Foundations, 1/12/12

The Java Runtime Computer Science eschews reinventing

the wheel. Think libraries: stdio.h, stdlib.h, STL Library,

etc… Java does the same thing, but bigger and

better. The Java Runtime Library. Large and Robust set of libraries for doing

just about anything you want to do in Java. No more writing Linked Lists. Common to all JVM installations.

Guaranteed portable between same versions.

Page 17: Software Development Foundations, 1/12/12

Syntax Much like C/C++ syntax:

Semicolon after every line. All basic control statements (if, if-else, for, while,

do while, switch). All basic data types (int, char, float, double, bool)

Bracket Block Structuring Comments

// Single line comments /* Multi-line comments */ /** Documentation comments */

Page 18: Software Development Foundations, 1/12/12

Semantics Slightly different semantics with respect

to… Pass by value and pass by reference Inheritance and Generics Templating And more stuff…

But we’ll get to that stuff later… For now: Eclipse.

Page 19: Software Development Foundations, 1/12/12

Introduction to Eclipse and IDEs What is an IDE?

Integrated Development Environment. Text (usually) editing application with built in functionality specifically for programming, usually focusing on a specific language.

Better than command-line / text-pad programming.

Akin to the difference between cooking with electricity and cooking without electricity. (Think Eggbeaters).

Will make life easier, will make programming easier.

Page 20: Software Development Foundations, 1/12/12

What is Eclipse? Eclipse is a plug-in based IDE managed by the

Eclipse Foundation. Provides robust set of tools for programming

(primarily) in Java. Includes code highlighting, organization, completion, refactoring.

Plug-in architecture allows users to create their own tools to extend functionality. Includes testing, profiling, modeling and more.

Free. Open Source. State of the art. I do not require that you use Eclipse; however, I do

require that all assignments be submitted as exported Eclipse projects.

Page 21: Software Development Foundations, 1/12/12

More on Eclipse Platform independent

Because it is written in Java! Can be obtained here: www.eclipse.org Note on Windows: Requires no

installation. Completely registry independent. Can drag-and-drop between different installations of same-versioned Windows.

Page 22: Software Development Foundations, 1/12/12

Lets write Hello World! Time to go to Eclipse…

Page 23: Software Development Foundations, 1/12/12

Discussion Every application is encapsulated in a class.

That class must contain a main function. That function must be implemented by public

static void main(String[] args) Public – It is a public function of the class. Anybody

with access to the class can call it. Static – Exists only as a single function across all

scopes that have access to it. Void – Java does not explicitly pass a return value

from main(). (String[] args) – Array of Strings containing

command line arguments. Why no argc?

Page 24: Software Development Foundations, 1/12/12

Time for more programs…?

Page 25: Software Development Foundations, 1/12/12

Homework Over the weekend, install Java, install

Eclipse and write Hello World. No turn in necessary.

Page 26: Software Development Foundations, 1/12/12

References [1] Java Tutorials.

http://docs.oracle.com/javase/tutorial/getStarted/intro/definition.html