© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott COMP6325 Advanced Web Technologies Dr. Paul Walcott The University of the West Indies Session 3 – Building Enterprise-scale Web-based Applications Summer 2008
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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/gloss ary.html
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott 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”
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 built-for-windows-vista-and-net-framework-3-0.aspx for a list of some real-world applications built-for-windows-vista-and-net-framework-3-0.aspx
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott Microsoft.NET cont’d ADO.NET Provides access to data sources
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott.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 CampusDr. Paul Walcott.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 CampusDr. Paul Walcott.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 CampusDr. Paul Walcott.NET vs. Java Enterprise Edition 5 For further comparisons and case studies: gs/2004/3-Lyons-ThePlatformWars.pdf gs/2004/3-Lyons-ThePlatformWars.pdf
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott 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 CampusDr. Paul Walcott Activity Web install the Microsoft Windows SDK for Server 2008 with the Microsoft.NET Framework 3.5 (over 1GB). A74F EBE331CDC&displaylang=en
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott 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 CampusDr. Paul Walcott An introduction to C# cont’d See the C# tutorial at station.com/Tutorial.aspx station.com/Tutorial.aspx
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott 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 CampusDr. Paul Walcott References Mayo, J., “The C# Station Tutorial”, Available online at station.com/Tutorial.aspxhttp:// station.com/Tutorial.aspx Microsoft Corporation, “A Guide to Building Enterprise Applications on the.NET Framework”, Available online at us/library/ms aspxhttp://msdn.microsoft.com/en- us/library/ms aspx Platt, D., “Introducing Microsoft.NET”, Third Edition, Microsoft Press, 2003 Silwa, C., “.Net vs. Java: Five Factors to consider”, Available online at ,00.html ,00.html Sun Microsystems, “The Java EE 5 Tutorial”, Available online at