Unit i

484 views

Published on

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
484
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
9
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Unit i

  1. 1. ENTERPRISE COMPUTING P.Suthahar, Lecturer / IT
  2. 2. Enterprise Architectural overviewThe EnterpriseEnterprise ComponentsInformation Technology in the Enterprise
  3. 3. The Enterprisethe term enterprise can simply refer to anorganization that has set out to accomplishcertain goals.the term enterprise is typically used to referto a large organization
  4. 4. Enterprise Components
  5. 5. Information Technology in the Enterprise
  6. 6. Enterprise User InterfacingProvides a means to present content to bothWeb-based and standard applications basedusers of an enterprise system.
  7. 7. Enterprise Data EnablingProvides a means to access, store, andmanage enterprise information andknowledge via enterprise databases.
  8. 8. Distributed Enterprise Communications EnablingProvides a means to access information andapplications throughout a distributedenterprise system
  9. 9. Common Services for Distributed Enterprise CommunicationsProvides a set of common services used bydistributed object communications paradigms.
  10. 10. Enterprise Systems AssuranceProvides for the secure, reliable, available,maintainable, and safe qualities of anenterprise system
  11. 11. Enterprise Web Enabling:Provides for the connectivity of the enterpriseto the Internet/Web, as well as for generatingWeb-based presentation content
  12. 12. Enterprise Applications EnablingProvides for the middle tier of application logicmanagement with the connectivity to legacy enterpriseapplication logic, the provision of new enterpriseapplication logic, connectivity to distributed enterpriseapplications and embedded devices, and business-to-business connectivity with commerce partners
  13. 13. Object-Oriented Software Development for the EnterpriseEnterprise ObjectsThe Object-Oriented Development ProcessUnified Modeling Language
  14. 14. Enterprise Objects
  15. 15. Elements of Object-Oriented Software Central to the foundation of OO software is the concept of a "class
  16. 16. Object-Oriented Softwares Importance to the Enterprise OO as a software-development paradigm is use to build a successful and distributed enterprise systems. OO practices foster the development of modular programs with encapsulated state and implementation behavior, as well as facilitate the abstraction of problems
  17. 17. The Object-Oriented Development Process1. Project Charter2. Requirements Analysis3. Preliminary System Design4. Detailed Design5. Implementation6. Unit Test7. Assembly8. Thread Test9. Configuration Specification10. System Test11. Deployment12. Maintenance:
  18. 18. Phased project development
  19. 19. Project CharterA project charter is a written vision andmission statement for a project thatsummarizes the key goals and objectives to beaccomplished for a particular developmenteffort.
  20. 20. Requirements AnalysisRequirements analysis involves creating anunderstanding and model of what the system tobe developed should do.
  21. 21. System Behavioral AnalysisIt describe what is to be produced from yourproject
  22. 22. System Interface AnalysisInterfaces to your system and to software thatlie outside of the system boundary should alsobe analyzed and modeled.
  23. 23. Preliminary System DesignPreliminary system design involves taking yourconceptual-analysis model and transforming itinto something that can be realized using COTSor custom software
  24. 24. Detailed DesignThe model packages handed to the developerThis enables developers to focus on acohesive component of the system to bedeveloped.
  25. 25. ImplementationAfter the core classes and their operationsignatures have been defined, the developercan begin implementation using an OOPtechnique and language
  26. 26. Unit TestUnit testing involves testing software at theclass and package level. Many times such tests are performed duringimplementation of a particular class andcollection of classes
  27. 27. AssemblyAssembling individually developed softwareclasses into groups of classes that performsome specific service
  28. 28. Thread TestThread test involves demonstrating that anyassembled classes can interoperate
  29. 29. Configuration SpecificationAlthough sometimes overlooked, the means bywhich enterprise software is to be configuredshould be specified
  30. 30. System TestSystem test involves the functional/behavioraltest of a fully assembled set of software that isto be deployed
  31. 31. DeploymentDeployment involves packaging the systemthat was tested and deploying it onto themachines that will host it for actual enterpriseoperation
  32. 32. MaintenanceMaintenance involves repairing defects whilethe system is deployed and in operation.Maintenance also involves providing upgradesto a fielded and operational system.
  33. 33. Unified Modeling LanguageStatic Logical Structure DiagramsDynamic Behavior Diagrams
  34. 34. Static Logical Structure Diagrams
  35. 35. Classes: Rectangular boxes represent classes.Class Packages:Packages to which classes belong are optionally indicatedbeneath the class name, such as (from PackageName).Packages: Packages are shown as a rectangle with a small box in the upper-left corner and have a package name displayed, such asPackageName.
  36. 36. Class Attributes: One or more attributes may be optionally shown below the class name and package nameClass Operations One or more operations may optionally be shown below the attributes in a class. Some diagrams may choose to display only a select set of operationsAssociations: A class such as ClassName that has an association with another class such as Named Association Class depicts the association as a straight line
  37. 37. Uses Relations: When a class such as ClassName has a general dependency on another class such as UsedClass, a dashed-line arrow depicting the dependency is shown.Inheritance: When a SubClass inherits from a BaseClass, a solid line with a triangleInterfaces: When an Interface Implementation implements a particular InterfaceType, a dashed line with a triangle
  38. 38. Dynamic Behavior DiagramsIt is used to describe the communicationbetween objects.
  39. 39. Time:Sequences in time proceed from top to bottomObjects:Object instances are represented by boxes at the top of the diagram.Object Names:An object-instance name can be followed by a class name inside of an object box.
  40. 40. Methods: Method calls are shown as arrows from the invoking object onto the invoked object. Method calls may also be made by an object onto itself.Method Names: Method names are displayed on method-call arrows, but may simply be more descriptive words designating an action to invoke on some concept or design entity in conceptual model diagrams.Method Parameters: Object parameters to such methods may also be optionally displayed in method calls.
  41. 41. Component-Based Software Development for the EnterpriseEnterprise ComponentsComponent ModelsComponent-Based DevelopmentStandards
  42. 42. Enterprise Componentsclass having object state and a set ofoperations can encapsulate a singularconcept, a component represents a particularservice as a function of one or more suchconcepts.
  43. 43. Classes/objects and components.
  44. 44. Problems, classes, and components
  45. 45. Generic Component Model
  46. 46. component may itself be application-specificcode, it will utilize the services it provides.Finally, the container represents an environment inwhich a component operate
  47. 47. Component Model Interfaces
  48. 48. Component Model InterfacesComponent APIsDesign PatternsComponent SPIsComponent-to-Container InterfacesContainer-to-Component Interfaces
  49. 49. Component-Based DevelopmentProject CharterAnalysis Pattern IdentificationExternal Component Interface AnalysisSystem Component Interface AnalysisComponent Model Technology IdentificationComponent IdentificationComponent SelectionComponent Design AdaptationComponent ImplementationComponent TestComponent AssemblyModule TestComponent Configuration SpecificationSystem TestDeploymentMaintenance
  50. 50. StandardsAppletsCORBARMICOM
  51. 51. Java Enterprise System Architecture
  52. 52. Enterprise User Interfacing:Web-based Java applets and desktop Java application clients canbe built using Java-based GUI techniques and can be hosted instandalone J2SE environments.
  53. 53. Enterprise Data EnablingThe Java Database Connectivity (JDBC) solution is used tocommunicate with databases. J2EE Web, EJB application, andapplication client containers all utilize the JDBC API
  54. 54. Distributed Enterprise Communications Enabling:Technologies for distributed communications such as CORBA,RMI, DCOM, TCP/IP, and Web-based HTTP are all possible withinJava enterprise environments, whether theyre embedded in Webservers, application servers, standalone Java applications, orenterprise user interface clients.
  55. 55. Common Services for Distributed Enterprise CommunicationsNaming services enable the lookup of named objects across anetwork.Directory services allow for more sophisticated searching ofobjects via attribute descriptions of those network objects.Trading services offer a more dynamic means to connect withservices on a network.
  56. 56. Enterprise Systems AssuranceVarious properties of systems assurance suchas reliability, availability, maintainability, safety,and security are more inherent properties of asystem as opposed to a distinct service.
  57. 57. Enterprise Web EnablingJava Servlets and Java Server Pages are thestandard J2EE-based mechanisms for receivingWeb-based requests and for generating HTML-or XML-based responses
  58. 58. Enterprise Applications EnablingEJBs are the primary means defined within theJ2EE to create server-side application businesslogic.
  59. 59. Enterprise DataDatabase BasicsRelational DatabasesObject DatabasesRDBMSs Versus ODBMSsRelational/Object TranslationsCLIsEmbedded SQLODBCJDBC
  60. 60. JDBCJDBC is used to java application program canaccess the Database.JDBC is an API for theJava programming language that defines how aclient may access a database. It providesmethods for querying and updating data in adatabase.
  61. 61. JDBC Architecture (cont.) Application JDBC DriverJava code calls JDBC libraryJDBC loads a driverDriver talks to a particular databaseAn application can work with several databases byusing all corresponding driversIdeal: can change database engines without changingany application code (not always in practice)
  62. 62. Difference between JDBC and ODBCODBC is used for managing any kind of database and JDBC is specially created to supportthe java programs.Open Database Connectivity (ODBC) isdeveloped by MicrosoftsJDBC is developed by sun micro system.
  63. 63. JDBC DriversA JDBC driver is a software componentenabling a Java application to interact with adatabaseType I: “Bridge”Type II: “Native”Type III: “Middleware”Type IV: “Pure”
  64. 64. JDBC Drivers (Fig.) Type I ODBC ODBC “Bridge” Driver Type IIJDBC CLI (.lib) “Native” Type III Middleware “Middleware” Server Type IV “Pure”
  65. 65. Type I DriversType1 drivers use a bridge technology toconnect a java client to an ODBC databaseservice.Use bridging technologyRequires installation/configuration on clientmachinesNot good for Webe.g. ODBC Bridge
  66. 66. Type II DriversUse Native API driversThe native API converts JDBC commands toDBMS specific native calls.Requires installation/configuration on clientmachinesUsed to leverage existing CLI libraries
  67. 67. Type III DriversCalls middleware server, usually on databasehostVery flexible -- allows access to multipledatabases using one driver
  68. 68. Type IV Drivers100% Pure JavaUse Java networking libraries to talk directly todatabase enginesOnly disadvantage: need to download a newdriver for each database enginee.g. Oracle, mSQL
  69. 69. JAVA APIJava.sql.DriverManagerJava.sql.ConnectionJava.sql.statementJava.sql.Resultset
  70. 70. Java.sql.DriverManagerA class that registers JDBC drivers andsupplies connection.The most commonly used method isDriverManager.getConnection()
  71. 71. ConnectionA connection is an active link to the data base through which a java program can read and write data.
  72. 72. StatementA statement is an an object that allows SQL statement to be sent through a connection and retrieve the resultset.
  73. 73. ResultSetA table of data representing a database resultset, which is usually generated by executing astatement that queries the database.
  74. 74. Steps to perform JDBC interaction1.Establish a connection2.Create JDBC Statements3.Execute SQL Statements4.GET ResultSet5.Close connections
  75. 75. A Simple JDBC application import java.sql.*; public class jdbctest { loadDriver public static void main(String args[]){ getConnection try{ Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver"); createStatement Connection con = DriverManager.getConnection (“jdbc:odbc:DSN", "user", "passwd"); execute(SQL) Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery Result handling ("select name, number from pcmtable where number < 2");yes while(rs.next()) System.out.println(rs.getString(1) + " (" + rs.getInt(2) + ")"); More results ? stmt.close() con.close(); no } catch(Exception e){ closeStatment System.err.println(e); closeConnection }}}
  76. 76. Statement InterfaceThis statement interface will have the following three methods to process the SQL command from the application.1.executeQuery()2.executeUpdate()3.execute()
  77. 77. executeQuery()executeQuery() method is used only for select statement of SQL commands.For ExampleResultSet rs=stmt. executeQuery(“select * from table”)
  78. 78. executeUpdate()executeUpdate() method is used for other SQL commands like insert,delete,updateetc.
  79. 79. execute()execute() method is used when more than one ResultSet is used.
  80. 80. ReusltSet Interface To retrieve record details the following methods are being used. next(): used to move from row to row first(): used to move first record in the data base last(): used to move last record in the data base previous(): used to move previous record in the data base.absolute(): Moves to the position n in the data base.Relative(n): Move to the relative record from the present record. To retrieve field information the following methods are being used. getInt() getDouble() getString()
  81. 81. MULTI TIER APPLICATION A multi-tier architecture is basically a client-server architecture in which the application isto be executed by more than one program. In mutli tier architecture the middleware isserver to which the client submits some dataand then the server sends this input data to thedata base.
  82. 82. MULTI TIER ARCHITECTURE Business logic tier Data base tierPresentation tier Request Application Data Client Data base server Response
  83. 83. Advanced JDBCScrollable Result SetsUpdateable Result SetsBatch UpdatesAdvanced Data TypesStored ProceduresDatabase Naming via JNDIConnection PoolsDistributed Transactions
  84. 84. Scrollable Result SetsForward-onlyScroll-insensitiveScroll-sensitive
  85. 85. Scroll-insensitive Scroll-sensitive result sets also allow one to scroll forward and backward and allow forabsolute and relative positioning
  86. 86. Scroll-sensitive Scroll-sensitive result sets also allow one to scroll forward and backward and allow forabsolute and relative positioning
  87. 87. Creating Scrollable Result SetsConnection connection = … // Get connection as usualStatement statement =connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE)ResultSet rs = statement.executeQuery("SELECT * FROM CUSTOMER");
  88. 88. Updateable Result SetsUpdateable result sets in JDBC 2.0 now allow for the update of rows,insertion of rows, and deletion of rows in a result set all through theResultSet interface itself, whereas JDBC 1.0 previously returned onlyresult sets that were read-onlyRead-onlyUpdateable
  89. 89. Updating Rowsint columnIndexFirstName = resultSet.findColumn ("FIRST_NAME");resultSet.updateString(columnIndexFirstName ,"Tony");orresultSet.updateString("FIRST_NAME","Tony");
  90. 90. Canceling UpdatesresultSet.cancelRowUpdates();Deleting RowsresultSet.deleteRow();
  91. 91. Batch UpdatesThe JDBC 2.0 Core API has introduced a new feature that enables you tocreate a batch of update commands associated with a statement andsubsequently submit the entire batch of commands to the database in asingle call.
  92. 92. Executing a Batch Updateconnection.setAutoCommit(false);Statement statement = this.getStatement();try{statement.addBatch("INSERT INTO STATE VALUES(VA, VIRGINIA)");statement.addBatch("INSERT INTO STATE VALUES(MD, MARYLAND)");int[] nResults = statement.executeBatch();}
  93. 93. Advanced Data TypesBLOBs (binary large objects) represent a very large set of binary data CLOBs (character large objects) represent a very large set of character data
  94. 94. Stored ProceduresMost databases provide a set of helper functions that database programmers canuse to operate on data while it is in the database versus retrieving it, computingsome result, and possibly updating the database with the new value.

×