an introduction to open source software and web application development

27
An Introduction to Open Source Software and Web Application Development Trevor Thornton North Carolina State University Libraries

Upload: trevorthornton

Post on 05-Jul-2015

522 views

Category:

Technology


1 download

DESCRIPTION

A 2-parter - presented at AMIA 2014 to open the Open Source Digital Preservation and Access stream on October 9, 2014.

TRANSCRIPT

Page 1: An Introduction to Open Source Software and Web Application Development

An Introduction to

Open Source Software and

Web Application Development

Trevor Thornton

North Carolina State University Libraries

Page 2: An Introduction to Open Source Software and Web Application Development

Open source software is…

… made available with a license that

permits users to freely run, study, modify

and re-distribute

… distributed with its source code in a

human readable format (enabling study,

modification)

… typically developed in an public,

collaborative manner

Page 3: An Introduction to Open Source Software and Web Application Development

Pre-history of open source

1950s-1960s : Software customarily

distributed with source, few restrictions

1970s : Software companies begin to

implement measures to prevent users from

accessing source code

1980 : U.S. copyright protection extended to

computer programs

Page 4: An Introduction to Open Source Software and Web Application Development

GNU Project

Founded in 1983 by Richard Stallman

(formerly of MIT) to develop software free

from restrictions

• GNU Operating System

• GNU General Public License (GPL)

Page 5: An Introduction to Open Source Software and Web Application Development

Free Software Foundation

Founded by Stallman in 1985, published the

first formal definition of “free software”,

based on 4 freedoms:

… to run the program for any purpose

… to study how the program works, and modify it as

needed (access to the source code is a precondition)

… to redistribute copies

… to distribute copies of your modified versions

Page 6: An Introduction to Open Source Software and Web Application Development

Linux

First version developed by Linus Torvalds in 1991, released under the GPL in 1992 –thousands of developers contribute to its further development

In 1997, Eric Raymond published“The Cathedral and the Bazaar” extolling the benefits of distributed development

"Given enough eyeballs,all bugs are shallow"

Page 7: An Introduction to Open Source Software and Web Application Development

Open source

development principles

• Users as co-developers

• Release early, release often

• Multiple versions (stable + development)

• Modularity

• Dynamic decision-making structure

Page 8: An Introduction to Open Source Software and Web Application Development

Open source licenses

Copyright protections/restrictions apply automatically

Licenses allow a copyright holder to grant permissions to users

Open Source Initiative provides criteria for assessing open source licenses

“The Open Source Definition”opensource.org/osd

Page 9: An Introduction to Open Source Software and Web Application Development

Common open source licenses

• GNU GPL

• MIT

• Apache License

• BSD (Berkeley Software Distribution)

• Mozilla Public License

• & many, many more – see:

opensource.org/licenses

Page 10: An Introduction to Open Source Software and Web Application Development

Web Applications

• Application software that runs in a web browser and is delivered over a network(not installed on client computer)

• Advantages:

– Easy to roll out to multiple users

– Minimal system requirements for client

– Cross-platform/cross-device compatibility

– Increasingly rich user experience as web technologies improve

Page 11: An Introduction to Open Source Software and Web Application Development

3-tiered structure

PresentationWeb browser (client) – HTML, CSS, JavaScript

Application logicPHP/Python/Ruby/Perl/etc…

StorageDatabase, file systems, indexes

Page 12: An Introduction to Open Source Software and Web Application Development

Typical architecture

web browser

(HTTP client)HTTP server

application logic

database

“client side” “server side”

HTTP request

HTTP response

filestorage search

index

Page 13: An Introduction to Open Source Software and Web Application Development

The LAMP stack

An archetypal model for server side

architecture with open-source components

Linux

Apache

MySQL

PHP

Page 14: An Introduction to Open Source Software and Web Application Development

Linux

• Open-source operating system based on

the Linux kernel

• Many distributions available that bundle

other software

• Most prevalent OS for web servers

• Windows Server often used instead

(WAMP)

Page 15: An Introduction to Open Source Software and Web Application Development

Apache HTTP server

• Accepts incoming requests and returns a

response, typically either by:

– Returning a static document

– Passing the request to a script that generates

a response ‘on-the-fly’

• Developed and maintained collectively by

the Apache Software Foundation

Page 16: An Introduction to Open Source Software and Web Application Development

MySQL

• Relational Database Management System

(RDBMS)

• Relational databases store data in tables

• Other open-source alternatives:

– PostgreSQL : Object-relational database

– NoSQL databases : CouchDB, MongoDB,

Redis, triple-stores

Page 17: An Introduction to Open Source Software and Web Application Development

PHP

• General purpose programming language

typically used for server-side scripting

• Runtime system : software that interprets

and executes code written in a particular

language

• Other popular languages for web apps:

Python, Ruby, Perl

Page 18: An Introduction to Open Source Software and Web Application Development

Apache Solr

• Open-source enterprise search engine

maintained by Apache Software

Foundation

• Provides full-text search, faceting, hit

highlighting, grouping, etc.

• Most widely-used enterprise search

system on the web

Page 19: An Introduction to Open Source Software and Web Application Development

HTML

• Structural foundation for web content

• Document Object Model (DOM) :

representation of page structure within the

browser

• HTML5 provides new APIs to support

native media playback, local data storage,

2-D drawing, improved interactivity,…

Page 20: An Introduction to Open Source Software and Web Application Development

CSS (Cascading Style Sheets)

• Used to define visual presentation of web

content

• Identifies elements in the DOM and

assigns them display attributes

• CSS3 supports animation and

transformation of objects

Page 21: An Introduction to Open Source Software and Web Application Development

JavaScript

• Fundamental component of most web applications, enabling advancedclient-side functionality via:

– Response to user input

– Manipulation of the DOM

– Asynchronous communication with server

• Node.js : server-side runtime system for JavaScript

Page 22: An Introduction to Open Source Software and Web Application Development

Web application frameworks

• Provide basic functionality shared by most

web applications

• Allow developers to concentrate on

solutions to new problems

• Promote code re-use

Page 23: An Introduction to Open Source Software and Web Application Development

Common web application

framework features

• Routing/URL mapping

• Page templates

• Database interaction

• Security

• Conventions for organizing code

Page 24: An Introduction to Open Source Software and Web Application Development

Popular frameworks

• Ruby on Rails (Ruby)

• Django (Python)

• PHP frameworks : Laravel, Zend,

Symfony, Code Igniter, …

• JavaScript frameworks : Angular, Ember,

Backbone, …

Page 25: An Introduction to Open Source Software and Web Application Development

Levels of involvement in open

source projects

• Implementing an existing application

without modification

• Modifying an existing application to suit

local needs

• Contributing to an existing project

• Developing something completely new

and releasing it with an open license

Page 26: An Introduction to Open Source Software and Web Application Development

Open source communities

• Users/implementers : share knowledge

through lists, groups, etc.

• Developers : contribute code, identify

issues and suggest fixes

• Supporters : provide financial support

to ensure long-term sustainability of open

source projects

Page 27: An Introduction to Open Source Software and Web Application Development

email: [email protected]

Twitter: @trevorthornton

Github: trevorthornton

slides (eventually):slideshare.net/trevorthornton/presentations

NCSU Digital Library Initiatives:

lib.ncsu.edu/dli/projects

github.com/NCSU-Libraries