1. Trang chủ
  2. » Giáo Dục - Đào Tạo

j2ee open source toolkit building an enterprise platform with open source tools

647 843 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề J2EE™ Open Source Toolkit: Building an Enterprise Platform with Open Source Tools
Tác giả John T. Bell, Stanford Ng, James T. Lambros
Thể loại Graduate thesis
Định dạng
Số trang 647
Dung lượng 7,31 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

ven-The focus of the book is on platform architecture and assembling and dating the components required to build a platform that can be used todevelop and deploy Java-based, enterprise-c

Trang 2

John T Bell Stanford Ng James T Lambros

Building an Enterprise Platform

with Open Source Tools

Trang 4

Building an Enterprise Platform with

Open Source Tools

Trang 6

John T Bell Stanford Ng James T Lambros

Building an Enterprise Platform

with Open Source Tools

Trang 7

Developmental Editor: James H Russell

Editorial Manager: Kathryn A Malm

Production Editor:Felicia Robinson

Media Development Specialist: Greg Stafford

Text Design & Composition:Wiley Composition Services

Copyright  2003 by Wiley Publishing, Inc All rights reserved.

Published simultaneously in Canada

No part of this publication may be reproduced, stored in a retrieval system, or transmitted

in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rose- wood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600 Requests to the Pub- lisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc.,

10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4447, E-mail: permcoordinator@wiley.com.

Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect

to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose No warranty may

be created or extended by sales representatives or written sales materials The advice and strategies contained herein may not be suitable for your situation You should consult with

a professional where appropriate Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, inci- dental, consequential, or other damages.

For general information on our other products and services please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.

Trademarks:Wiley, the Wiley Publishing logo and related trade dress are trademarks or registered trademarks of Wiley Publishing, Inc., in the United States and other countries, and may not be used without written permission Java, J2EE, J2SE, J2ME, and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc in the United States and other countries All other trademarks are the property of their respective owners Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book Wiley also publishes its books in a variety of electronic formats Some content that appears

in print may not be available in electronic books.

Library of Congress Cataloging-in-Publication Data:

ISBN: 0-471-44435-9

Printed in the United States of America

10 9 8 7 6 5 4 3 2 1

Trang 8

— John T Bell

This book is dedicated to all my family and friends who have supported me through the years Special thanks goes to out to Judy,

whose care packages and wit have brightened up my day

more times than I can recall Thank you all!

Trang 10

Acknowledgments xix

Introduction xxiii

Apache 6Artistic 6BSD 7

Apache 10Jakarta 10

Ant 12ExoLab 12GNU 12ObjectWeb 13Enhydra 13SourceForge.net 13Summary 15

vii

Trang 11

Chapter 2 Java Enterprise Architecture 17

Examining the Different Types of Platforms 18

Java 2 Enterprise Edition as an Enterprise Platform 20Requirements and Goals for an Enterprise Platform 21

Distributed Computing Architectures 29Client/Server 29Three-Tiered 30n-Tiered 31

The Java Database Connectivity (JDBC) Layer and Databases 38Messaging 39

Trang 12

The Process View 44

Summary 48

Chapter 3 Selecting the Right Platform Components 51

Cost 53Suitability 54Quality 54Robustness 54Reliability 55Reparability 55Risk 56The Risk of Insufficient Software Support 56

Time 57

Summary 68

Trang 13

Chapter 4 Choosing Your Developer Tools 71

Emacs 78

jEdit 81Jext 83

Eclipse 86NetBeans 94

Revision Control and Code Repositories 101CVS 102

Subversion 109Testing 110

jMeter 114Summary 119

Part 2 Integrating the Web Tier 121

Chapter 5 Powering the Web Tier with a Server Container 123

Jetty 130Tomcat 131

Tomcat Manager and Administration Tools 143Selection 145

Trang 14

Building a Tomcat Server 146

Step 1: Finding and Downloading the Binaries 156Step 2: Copy the File to the Apache Modules Directory 157Step 3: Edit the Apache Configuration File 157Step 4: Edit the Tomcat Configuration File 157Step 5: Create a workers.properties File 158

Summary 166

Chapter 6 Creating Dynamic Content Using Template Engines 167

Tea 172WebMacro 182Velocity 186

Web Application Framework Product Survey 213Barracuda 213Expresso 215Turbine 216Struts 217

Building a Sample Application with Struts 221

Understanding Error Handling with Struts 232

Summary 247

Trang 15

Part 3 Building the Infrastructure 249

Chapter 8 Managing Data Using JDBC and Databases 251

Databases and the Platform Architecture 251

Transactions 255JDBC 257Connections 258Connections, DataSources, JNDI, and Pooling 258

Axion 261HSqlDb 263McKoi 267

Evaluation 270Selection 272Relational Databases with JDBC Drivers 272

Trang 16

Synchronous versus Asynchronous Messaging 310

JBossMQ 317JORAM 318OpenJMS 321UberMQ 322

Generating Interface Files with X-Doclet 349

Sharing the JVM with the Servlet Container 353

Trang 17

CMP 2.x Entity Bean Tests and Sample Code 381

A Web Service Client Using Generated Stubs 418Using Web Service Deployment Descriptors as Web Services 421

Trang 18

Testing and Troubleshooting Web Services 426

Exceptions 428

ebXMLRR 430jUDDI 430Summary 431

XPP3 446

Trang 19

Part 4 Test Driving the Platform 483

Chapter 13 Building an Application: Assembling the Back End 485

Configuring the DataSource in the EJB Container 492

Creating the Home and LocalHome Interfaces 500

Object Relational Mapping and the jbosscmp-jdbc.xml File 507

Summary 530

Chapter 14 Building an Application: Assembling the Front End 531

Setting Up the Directory Structure for Development 542

Login 544

Trang 20

Summary 570

Chapter 15 Deploying and Running Your Application 571

Portability 572

Processes 589

Trang 22

John T Bell would like to gratefully acknowledge the capable assistance of hiseditors, Bob Elliott and James Russell Without their guidance this book wouldnot be what it is.

Stanford Ng would like to acknowledge the help of his colleague and friend,

Mr Stephen Holder, whose technical expertise proved invaluable

James T Lambros acknowledges the patience of his wonderful son Ryan,who tolerated the many evening hours he spent writing this manuscript

xix

Trang 24

John T Bellhas over two decades of software development experience rently he is an instructor in server-side Java technologies for the Center forApplied Information Technology at Towson State University in Maryland andserves as a technical architect for a major hospitality company He has a mas-ter’s degree in Computer Systems Management and a bachelor’s degree inElectrical Engineering, both from the University of Maryland.

Cur-Stanford Ngis currently the cofounder of Nuglu, LLC and is directing ware development at ciMediaGroup, a division of Creative Images A veteran

soft-of the ssoft-oftware industry, he’s been involved with companies ranging fromsmall startups such as NetGUI to giants such as TriCon Stanford is a graduate

of the University of California at Irvine and a co-conspirator, with Dr RobertNideffer, behind the international award-winning Proxy/MAM research project

James T Lambrosis a software architect and analyst for Caterpillar cial Corporation In addition to his work for Caterpillar, Jim has been involvedwith several exciting software development projects during his career withIBM His current interests are Java Design Patterns and the whole open sourcesoftware movement

Finan-xxi

Trang 26

Installing and configuring even commercial enterprise platforms is often achallenge Configuring the J2EE environment to work with the needed data-bases and messaging systems and making certain that everything is working

is often difficult, even when most of the components come from the same dor This task is made more difficult when each of the components is separateand derived from an independent source, and that difficulty is exacerbatedwhen you’re dealing with open source software to boot

ven-The focus of the book is on platform architecture and assembling and dating the components required to build a platform that can be used todevelop and deploy Java-based, enterprise-class applications using opensource and freely available tools and components

vali-The following sections discuss the contents of this book and show you how

to get the most out of it

Why You Need This Book

This book is about architecture More specifically, the book is about creatingplatform architecture by selecting the right components for the platform, com-bining them, and making certain that all of the integrated components worktogether It is also about open source Java and the components that can beselected to build the platform

The purpose of this book is to enable you to select and assemble variousopen source components needed to demonstrate and build applications usingJava 2 Enterprise Edition (J2EE) technologies by creating a Java platform that’ssuitable for enterprise-class applications

xxiii

Your beginnings will seem humble, so prosperous will your future be.

Job 8:7

Trang 27

N OT E Enterprise-class applicationsare distinguished from other applications

by their need to be integrated into multiple systems within an enterprise or organization.

Your Java platform can be used to build and deploy applications usingenterprise Java technologies This follows industry trends of using Java forenterprise applications as well as increased support for the widespread use ofopen source software

Hopefully, reading this book will help you to avoid some of the pitfalls that

we have encountered and at the same time give you a better understanding ofplatform architecture or integration of open source Java components

About the Book

This book is about making the right choices for creating an enterprise platformfrom open source components In short: Where there’s a need for an affordablealternative to commercial J2EE platforms to evaluate technologies, to providetraining, and to jump start development teams, that need can be met by usingopen source tools

To state it more concisely, this book is about:

■■ Creating a Java enterprise platform

■■ Selecting the right open source components for the platform

■■ Combining those components with other components

■■ Making certain that all of the components work together

N OT E The principles that we apply in this book are not limited to open source components The processes and practices we develop for selecting, combining, and testing components apply to any architecture, be it commercial or open source The programs that we develop to demonstrate and test platform

features are also useful for demonstrating and testing platform features with commercial J2EE platforms.

Who Should Read This Book?

This book is targeted toward readers who may have a familiarity with mation systems but are not necessarily familiar with enterprise Java technolo-gies and architectures The book does assume that the reader has a basicfamiliarity with Java and does not provide an introduction to Java program-ming or to programming for J2EE platforms Source-code examples are

Trang 28

infor-designed either to provide a basic understanding of the capabilities of a ponent or to provide testing, diagnostic, and troubleshooting support.

com-You should read this book if you want to:

■■ Learn about systems architecture

■■ Access to an affordable Java Enterprise platform

■■ Learn about open source Java components

■■ Create your own Enterprise platform

■■ Learn about Java Enterprise components

It is our hope that everyone who reads this book will gain some benefit from

it Certainly you should gain a deeper knowledge of open source componentsand enterprise architectures More importantly, though, we want to help yousolve real problems that you may encounter with real systems that you aredeveloping or supporting To that end we offer this practical guide for thosepeople who want or need to use enterprise Java components

Industry Trends

There are many books that cover application development There are a fewbooks that discuss application architecture There are very few books availablethat discuss platform architecture and building complex systems from existingcomponents I believe that this is the first book to cover platform architectureand building a complex system entirely from existing open source Java com-ponents For everything, there is a season, and there are a number of majorindustry trends that make a book like this one particularly relevant:

■■ The first industry trend is the maturing nature of the Java 2 Enterprise

Edition platform and its demonstrated effectiveness at addressing

enterprise-class problems Enterprise Java is becoming increasingly ognized as a superior platform for developing and delivering enterpriseapplications Java has several distinct advantages over other platforms,

rec-including:

Platform independence. Java solutions can be created to run on

the entire variety and spectrum of hardware and operating systems

that can be found in many large organizations This is the famous

“write once, run anywhere” mantra and methodology of Java

Distributed computing support. Java has always had strong

sup-port for distributed computing J2EE enhances this with Enterprise

Java Beans, one of the easiest to use distributed component ties ever invented

Trang 29

capabili-Web-based delivery tools. Java servlets and JavaServer Pages(JSPs) provide the ability to deliver enterprise applications throughWeb browsers Web-based delivery has a large impact on reducingthe total deployment costs of an enterprise application.

■■ The second trend is the high cost of commercial enterprise Java forms In many companies, purchases of expensive items and softwareprices above set limits must be approved at higher levels of manage-ment than the department charged with creating an application Thisrequires more effort to justify the cost and often slows the purchasingcycle Information systems managers and technology leads in manycompanies are frustrated by delays in development projects caused bylong procurement cycles and a lack of the ability to get tools into devel-opers’ hands These high costs tend to be a concern for smaller compa-nies and delay development projects in larger companies Justificationfor the use of Java in these environments is further complicated by thefact that many organizations already have Windows-based departmen-tal servers that come with a Web server solution preinstalled Often it isdifficult to justify to management the expense of a Java applicationserver (JAS) just to write the program in Java, which leads us nicely tothe third trend

plat-■■ The third trend is the growing recognition by many companies of thevalue of open source software Ten years ago, most companies wouldn’teven have considered using open source software Five years ago, theinformation technology (IT) departments were using Linux, Apache,and other open source applications, but management didn’t want toknow about it Today, many companies recognize open source software

as a viable alternative to commercial products for cost-effectively ing real corporate computing concerns

solv-■■ The fourth trend is the increasing amount of high-quality Java softwarethat is being created by the open source community Open source pro-jects such as the Jakarta/Apache projects have helped to establish highstandards for open source Java software I believe that there are severalreasons for how this has come about:

■■ First, Sun decided to make the Java development environment free

to use, making Java an easily accessible language for programmers.That is, programmers do not have to purchase an expensive devel-opment environment to get started writing Java programs

■■ Using open source projects to create reference implementations ofJava standards also has helped open source Java For example, theApache Tomcat server is the reference implementation for theservlet specification In addition to helping with funding for open

Trang 30

source development, this practice helps establish open source Java

projects as reliable tools Corporate sponsorship by large Java

ven-dors of major open source initiatives has also played a role

C R O S S - R E F E R E N C E Chapter 4 discusses two excellent open source

Integrated Development Environments that were developed with funding from

IBM and Sun.

■■ Java came along at the right time The proliferation of the World

Wide Web and the strength of the Apache Web server running underLinux raised the visibility of Linux from that of technologists’ toy to

IT department tool

Conventions

In this book, we use various methods of calling text out for various reasons.For example, when we want you to type something, we bold the text that we

want you to type, as in, “Type in ls –l, and press Enter.” When we mention

commands, filenames, or directories, we use what’s called monofont (or afixed-width font) For example: “As you can see, the ls command lists twofiles: fileone.txt and filetwo.lgz, both of which are located in thedirectoryonedirectory.” Finally, when we discuss a variable that you need

to replace with something, such as JAVA_HOME, we put an underscore

between the words to show that the words are linked and then italicize it

How This Book Is Organized

The book is divided into four parts that form a logical progression that leadsyou from learning the basics to building an integrated development environ-ment of your own The following sections discuss each part briefly

Part I: At the Starting Gate

This part covers material that is used throughout the book It introduces eral open source Java projects, covers the basics of enterprise architectures andprovides an overview of open source developer tools

sev-N OT E We recommend that all readers read Chapters 2 and 3 to get an overall

view of the platform components and to understand the process we used to

guide our specific component selections

Trang 31

Part II: Integrating the Web Tier

This part covers components of the architecture that are involved in deliveringWeb-based applications, Web servers and servlet containers, template tools,Web application frameworks, and portal software

The chapters in this part and in Part III cover individual components thatprovide a specific functionality for the enterprise platform that we are creat-ing Each of these chapters provides a brief overview of the technology and theway it is used within the platform, and then compares various open sourcecomponents that implement that functionality Each chapter covers one spe-cific component, which is given a detailed examination and then integratedwith the other components discussed in earlier chapters Source-code exam-ples are also provided to demonstrate the use of the component and test theintegration of the component within the platform

Part III: Building the Infrastructure

This part covers components that form or are used to communicate with theenterprise infrastructure It covers relational databases, messaging, EnterpriseJava Beans (EJBs), Extensible Markup Language (XML), and Web services

As in Part II, the chapters in this part cover components that provide a cific functionality for the enterprise platform that we are creating These chap-ters provide a brief overview of the technology and the way it is used withinthe platform, and compares various open source components that implementthat functionality Each chapter covers one specific component that is given adetailed examination That component is then integrated with the other com-ponents discussed in earlier chapters Source code examples are also provided

spe-to demonstrate the use of the component and test the integration of the ponent within the platform

com-Part IV: Test Driving the Platform

This part provides complete integrated examples of the primary platformcomponents working together It also covers issues that may be encounteredwhen moving an application from a development environment to a produc-tion environment hosted on the platform that we created

The chapters in this part provide more comprehensive code examples thanearlier chapters, demonstrating the integration of the platform componentsworking together within the enterprise platform environment

Trang 32

Technical Considerations

This book focuses on open source software That is not to say that open sourcesoftware represents the only affordable J2EE solution for the many types ofpeople or organizations that may need a J2EE platform For example, Sun pro-vides the J2EE reference environment for free Although it cannot be used todeploy an application, the J2EE reference environment is suitable for learningpurposes

The products evaluated and discussed in this book are all open source Alldiscussion is based on the latest stable version of each product at the time ofwriting For some products this may mean that the product is a beta release;however, our focus is on stable releases Alpha and unstable products that mayhave merit are discussed more briefly so that the reader knows to monitor theproject for potential future application

What You Will Need

First and most obviously, if you want to build and run the platform we create

in this book, you will need a computer Because we want to be able to modate a wide variety of users, we have tried to make the computer require-ments very minimal by today’s standards As a minimum to install theplatform and run the examples, we recommend a Windows- or Linux-basedcomputer with 128 MB of RAM running on a 350-MHz or faster CPU A moretypical developer configuration might be to have a 1.5-GHz CPU with 512 MB

accom-of RAM Most developers using Windows will benefit from using Windows

2000 or Windows XP rather than Windows 98

C R O S S - R E F E R E N C E Deployment configurations are covered in detail in

Chapter 15.

The computer will also need a network connection That is not to say thatthe computer must actually be connected to a network, but the network soft-ware to support TCP/IP connections must be installed and configured to work

on the computer Fortunately, this is common on modern computers This isneeded because many of the components in an enterprise system assume thatthey will use the network to communicate with other components deployed in

a distributed environment These components often make use of the networksoftware infrastructure even if the components they need to communicatewith are on the same machine If the network software is not there, the com-ponent will fail

Trang 33

N OT E If your computer does not have a network card (or modem), then look for documentation on installing the network loopback connector for your

operating system.

You will also need to install the Java 2 Software Development Kit (JDK) This

is the set of tools provided by Sun that enables you to compile and executeJava code The JDK can be downloaded by following the links at http://java.sun.com

N OT E Make sure to download and install the JDK and not just the Java

Runtime Environment (JRE) The JRE does not include the Java development tools that are needed compile a Java program, but the JDK does include the JRE, which is needed to run Java programs If you can compile a Java program, then you have the JDK installed.

Supported Platforms

This book is designed to be a practical tool for use by developers with varyingneeds Even though the book emphasizes open source tools, the practical real-ity is that many developers must use various versions of Windows for theirdevelopment systems, while many others increasingly prefer to use Linux,given its open source status as well as its reputation for stability and per-formance For this reason, we cover both Windows and Linux platforms in this book

One of the great features of Java is that it is mostly platform independent Inmost cases, any differences in the behavior of Java programs have to do withdifferences in installation and in the security models on the two systems.Where there are differences, we try to identify those differences

N OT E All of the software in this book has been tested under Windows

2000, Windows XP, and Linux Most of the software has also been tested

under Windows 98 When a component does not work under Windows 98 or when Windows 98 operation is not supported that fact is mentioned in the

component summary.

N OT E Mandrake Linux version 9.0 was the specific version of Linux used for development and testing of the software in this book; however, no Mandrake- specific extensions were used, and all examples should work on any current release of Linux that supports JDK 1.3 or later.

Trang 34

We have not tested any of the software on other operating systems However, most of the software should work on any Java Standard Edition–supported platform We try to identify cases where a component is docu-mented to specifically support platforms that we have not tested.

N OT E All code for this book has been written for and tested with the Java 2

Software Development Kit (JDK) version 1.4.1 However, 1.4 features were not

specifically used, so the code should also run on older version 1.3 JDKs.

Beyond the Book

Although the focus of this book is not on application development, this bookwill give you a good start on developing enterprise applications, but the helpdoesn’t end here From here, you can look at the book’s Web site or at a com-panion book in the Java Open Source Library

For starters, this book has a companion Web site that’s located at the ing URL:

follow-http://www.wiley.com/compbooks/bell

Featured at the site are:

Java source code examples for most chapters. For the most part, the

examples are designed to demonstrate the integration of the various

components or to aid in troubleshooting For example, Chapters 13 and

14 provide significant examples designed to demonstrate the platform’s

capabilities The source code for this application is available at the site

Where to get the software. A URL is provided to the home page for each

software component referenced in the book The individual tools and

components can be downloaded directly from these sites or in some

cases mirrors of these sites Code samples provided in the book can be

downloaded from the book’s companion Web site

C R O S S - R E F E R E N C E Although this book gives you a good overview of how

to build an application with open source tools, Java Open Source Programming

by Joe Walnes et al., a companion book to this one that’s also part of the Java

Open Source Library, discusses the topic in far more detail.

Trang 36

At the Starting Gate

Everything has to have a beginning This first part forms much of the basisfor the rest of the book It introduces the concepts that will form the basis forthe chapters in the later parts We start by examining open source softwareand software projects and communities, and discussing some of the issuesrelated to using open source software in a commercial environment We con-tinue by covering enterprise platform architecture from the Java perspec-tive We look at the decision-making process used to decide whichcomponents will be selected for use in our platform, and, finally, we exam-ine some developer tools that will be useful for developing software for theenterprise Java platform

One

Trang 38

Historically, enterprise software has been expensive and proprietary more, if you needed to modify the software to suit your specific businessneeds, you had to contract with the vendor to make changes Even worse, ifthere were errors, you were dependent on the vendor to address them in atimely fashion Open source software has changed all of that

Further-This chapter examines the question “What is open source software?” To

answer the question, we briefly describe some of the history of and conceptsbehind open source software We also discuss the nature of open source soft-ware and the licenses that govern its use Finally, we provide an overview ofthe major open source projects supporting Java development

What Is Open Source Software?

Questions and misunderstandings about open source software and what it isabound Many people associate open source software with its being free andthink that any software that is given away is open source Although opensource software is free, just being free does not make the software open source

To be open source software, the software must meet certain criteria In general,these can be stated as:

Leveraging Open Source

Software

Everything that is really great and inspiring is created

by the individual who can labor in freedom.

Albert Einstein

1

Trang 39

■■ Open source software allows free redistribution of source code andbinaries.

■■ Open source software provides source code

■■ Open source software allows modification and redistribution of themodified source code

The formal definition of open source software is that open source software

is software that is copyrighted and licensed under a license that meets the teria outlined in the Open Source Definition, which can be found at the fol-lowing site:

cri-http://www.opensource.org/docs/definition.php

An alternative definition, known as the Debian Free Software Guidelines,can be found at the following site:

http://www.debian.org/social_contract.html#guidelines

Origins of the Open Source Movement

Conceptually, the open source software movement began with the GNU ect started by Richard Stallman in 1983 GNU was a project established to cre-ate a Unix-compatible system of software that would be completely free, to becopied and given away, and that would provide access to all of the sourcecode Linux exists today mainly because of the tools created for the GNU proj-ect The statements from the GNU Manifesto below describe Richard Stall-man’s view of Free Software

proj-GNU is not in the public domain Everyone will be permitted to modify and redistribute GNU, but no distributor will be allowed to restrict its further redis- tribution That is to say, proprietary modifications will not be allowed I want to make sure that all versions of GNU remain free.

The Free Software Foundation was formed to aid in the coordination, opment, and maintenance of the GNU project The Free Software Foundation(FSF) identifies their products as “free software.” However, when the FSFrefers to “free software” they state that “free” does not refer to “price” butrather to freedom The FSF compares free software to “free speech” (asopposed to “free beer”)

devel-Prior to GNU and FSF, free software was generally “public domain.” TheFSF addressed the issues of public domain software by copyrighting all oftheir software Along with the copyright is a license allowing the use of thesoftware but including certain restrictions The GNU General Public License,

Trang 40

or GPL, enforces the goals of the FSF by ensuring that the software can becopied, distributed, modified, and extended, but requires that the softwarealways be free and include source code (which the FSF sees as a condition ofsoftware freedom) Applying the GPL is often referred to as “copylefting.”

The Open Source Software Movement Today

Free software was firmly established in 1998 when the term “open source” wascoined A group of people actively involved in working with Linux and other

“free” software projects determined that a new name was needed that could beused to identify all software projects that provided access to source code with-out restrictions on changes or redistribution They wanted to include thebroader spectrum of free software, not just those programs covered under theGPL They also wanted to make these software projects more palatable forbusinesses in the software industry The FSF with its philosophy and rhetoricabout free software had gone a long way toward endearing some program-mers, but had alienated many, including businesses The open source move-ment grew out of a desire to promote the concepts of free software but to avoidits confrontational past They wanted to help businesses understand how thisfree software could be used to their benefit This new name, open source soft-ware, quickly spread and was adopted by many The Open Source Initiative(OSI) was formed to promote open source software and the concepts behind it.The OSI Web site can be found at the following URL:

http://www.opensource.org

FSF elected, however, to continue using the term “free software” to describethe programs that are covered by GPL-compatible licenses

Open Source Licenses

In the previous discussion, we mentioned the GNU Public License, or GPL.The GPL works because of the power of the copyright laws The copyrightestablishes ownership The holder of the copyright is the owner of the soft-ware The owner of the software is able to establish the rules for allowable use

of their property by others These rules are stated in a license A license is alegal document that gives permission to do specified things or defines restric-tions on what can be done

In the following sections, we look at several of the most popular open sourcesoftware licenses Many open source programs share or reuse the licenses fromother projects The GPL for example is used by many projects that are not apart of the GNU project or other FSF efforts For each license, we try to cover

Ngày đăng: 01/06/2014, 10:13

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN