© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott...

Post on 19-Dec-2015

232 views 0 download

Tags:

Transcript of © 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott...

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

COMP6325 Advanced Web TechnologiesDr. Paul WalcottThe University of the West Indies

Session 3 – Building Enterprise-scale Web-based ApplicationsSummer 2008

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Objectives In this session the student will:

Discuss the .NET and Java Enterprise Edition 5 frameworks

Construct a simple C# program Compare and contrast enterprise-scale web-based

application frameworks

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

What is an enterprise application?

“An application that conforms to the Java 2 Platform Enterprise Edition specification“

publib.boulder.ibm.com/infocenter/wasinfo/v5r1/topic/com.ibm.websphere.exp.doc/info/exp/glossary.html

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

What is an enterprise application cont’d?

An “enterprise application is any software application hosted on a server which

simultaneously provides services to a large number of users, typically over a computer

network”http://www.theserverside.com/discussions/thread.tss?thread_id=38042

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

What is an enterprise application cont’d?

“Enterprise application solve business problems”(Weaver, Mukhar & Crume 2004)

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

What is an enterprise application cont’d? Enterprise applications store, retrieve and

manipulate business data (Weaver, Mukhar & Crume 2004)

For example, customer invoices, mortgage applications and flight bookings

These applications: Might have multiple user interfaces Handle communication between remote systems Specify the business rules / business logic

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Enterprise scale web-based applications Traditionally web applications were based on:

a two-tier client/server design Proprietary technologies

This approach had implications for (Microsoft 2003): Scalability The integration of other applications Flexibility, and Speed of development

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Enterprise scale web-based applications cont’d With the introduction of the Microsoft’s Component

Object Model (COM), which allows clients to call binary code on a COM server (Platt 2003): Developers could reuse components from third-parties,

thus decreasing development time Developers could access operating system functionality

such as queuing and transactions, making applications easier to write and more robust

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Enterprise scale web-based applications cont’d The COM model however had some

significant drawbacks, including: The need for a substantial amount of

infrastructure to link applications The connecting of applications through an

external interface This resulted in separate implementations of basic

data types such as string which had to be converted For example connecting a COM server written in Microsoft

Visual Basic with a COM client written in C++

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Enterprise scale web-based applications cont’d Frameworks have been developed which

utilise service-oriented architectures (SOA) and allow (Microsoft 2003): Data, logic, and infrastructure assets to be

accessed by routing messages between interfaces Service components to be improved; with

changes being carefully controlled Cross-platform integration

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Enterprise scale web-based applications cont’d Microsoft, for example has implemented

service oriented architectures through web services

Web services utilise Internet protocols and standards such as HTTP and XML

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Enterprise scale web-based applications cont’d Two popular application frameworks are:

Microsoft .NET Framework Java Enterprise Edition 5 Framework

These frameworks will be discussed in this course

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Activity

Using your favourite search engine find examples of enterprise-scale web-based

applications

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Microsoft .NET(Microsoft 2003)

Microsoft .NET is an integral Windows component which supports the building and running of web services; and client- and server-side applications

.NET provides: An OOP language neutral environment Enhanced performance, guarantees safe code

execution and minimises software deployment A consistent developer experience across apps

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Microsoft .NET cont’d Several different types of applications may be build

using .NET including Server applications Web applications Web services Client-side applications

See http://blogs.msdn.com/ericnel/pages/applications-built-for-windows-vista-and-net-framework-3-0.aspx for a list of some real-world applications

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Microsoft .NET cont’d The .NET Framework uses a managed code

programming model (this will be detailed in the next session)

A wide range of supporting class libraries are provided with the framework, including: Windows Presentation Foundation

For user interfaces, documents and media content

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Microsoft .NET cont’d Windows Communication Foundation

Communication infrastructure which utilises the web server architecture

Windows Workflow Foundation Used to create workflow-enabled applications

Windows Forms Form development

ASP.NET Web application development technologies for web

application development

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Microsoft .NET cont’d ADO.NET

Provides access to data sources

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Java Enterprise Edition 5 Java EE is an enterprise framework for

component-based multi-tier applications Java EE applications can handle data from

multiple sources and can distribute applications to a variety of clients

Business functions are conducted in the middle tier

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Java Enterprise Edition 5 This model provides

Scalability Accessibility Manageability

Multi-tier services are divided into: Business and presentation logic Standard system services provided by the

framework

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Java Enterprise Edition 5 Java Enterprise Edition 5 includes:

Java Servlets Dynamically process request and construct responses; used for

service oriented applications (web services)

Enterprise JavaBeans (EJB) Business components that run on the server

Java Server Pages (JSP) Allows creation of static and dynamic web content

Java Server Faces (JSF) Server-side user interface component framework

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

.NET vs. Java Enterprise Edition 5 The .NET vs. Java EE is a huge debate with

many opinions, including (Silwa 2002) “Weigh the importance of application

portability to your company” .NET runs on Windows machines only (for now),

while Java Enterprise Edition 5 can easily port business rules and java server pages (JSP)

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

.NET vs. Java Enterprise Edition 5 What infrastructure and skills do you have

access to? It is costly to train staff and change infrastructure, for

example moving a developer from Cobol to Java could cost US$57,000 per developer (2002 estimate)

Examine the complexity of the application .NET tools may be easier to used, Java Enterprise

Edition 5 might be better for more complex, mission critical applications

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

.NET vs. Java Enterprise Edition 5 Investigate vendor support Look at the costs

Cost of application servers, for example JBOs, WebLogic and WebSphere (for the Java environment)

Also, look at the benefits and flexibility for the future

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

.NET vs. Java Enterprise Edition 5 For further comparisons and case studies:

http://www.nccaiim.org/Education/Proceedings/2004/3-Lyons-ThePlatformWars.pdf

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

C# and .NET In order to run C# and .NET you require:

The Microsoft Windows SDK Microsoft Windows SDK for Server 2003 Microsoft Windows SDK for Server 2008 (latest)

Microsoft .NET Framework .NET Framework 2.0 .NET Framework 3.0 .NET Framework 3.5 (latest)

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Activity

Web install the Microsoft Windows SDK for Server 2008 with the Microsoft .NET

Framework 3.5 (over 1GB).

http://www.microsoft.com/downloads/details.aspx?familyid=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

An introduction to C#(Mayo 2008)

This introduction session on C# programming will cover: C# program structure Operators, types, and variables Control statements

Selection If and Switch

Loops While, do, for, foreach

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

An introduction to C# cont’d Some basics

C# is like C, C++ and Java C# source files have an extension .cs A Main() method provides the entry point to C#

programs The class with the main method is often called App

The Main() method can accept arguments and return a value

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

An introduction to C# cont’d C# is not interpreted C# is case sensitive Comments - /* */ and // All statements end with ; Write a number of arguments –

Console.WriteLine(“{0} {1}”, arg[0], arg[1])

Reading from the console Console.WriteLine(“Hello {0}”,

Cosole.ReadLine());

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

An introduction to C# cont’d Compiling a C# program

Open the command prompt and locate the program to be compiled

Type csc /target:exe program.csc

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

An introduction to C# cont’d See the C# tutorial at http://www.csharp-

station.com/Tutorial.aspx

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

Conclusion In this session

The .NET and Java Enterprise Edition 5 framework were compared and contrasted

Some of the characteristics of enterprise-scale applications were discussed

The .NET and the Java Enterprise Edition 5 frameworks were described

The student was introduced to the C# programming language

© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill Campus

ReferencesMayo, J., “The C# Station Tutorial”, 2008. Available online at http://www.csharp-

station.com/Tutorial.aspx Microsoft Corporation, “A Guide to Building Enterprise Applications on the .NET

Framework”, 2003. Available online at http://msdn.microsoft.com/en-us/library/ms954601.aspx

Platt, D., “Introducing Microsoft .NET”, Third Edition, Microsoft Press, 2003Silwa, C., “.Net vs. Java: Five Factors to consider”, 2002. Available online at

http://www.computerworld.com/developmenttopics/development/story/0,10801,71221,00.html

Sun Microsystems, “The Java EE 5 Tutorial”, 2007. Available online at http://java.sun.com/javaee/5/docs/tutorial/doc/docinfo.html