CIS 764 Database Systems Engineering L 7 ADF
CIS 764 Database Systems Engineering L 7. ADF + EJB Context: Oracle Application Development Framework …but … only EJB homework for now. Fall 2007 http: //www. cis. ksu. edu 1
CIS 764 Database Systems Engineering Oracle Fusion http: //en. wikipedia. org/wiki/Oracle_Fusion_Middleware … the whole middleware suite … application server (including OC 4 J) BEPL manager (business process execution language) business rules system messaging service ADF <<<<<<<<<<<<<<< JDeveloper Toplink Forms services Business Intelligence tools (monitoring, mining, analysis) Portal & portlets Identity & single sign-on … others. . the integration of e. Bus components (as People. Soft) into a SOA. Fall 2007 http: //www. cis. ksu. edu 2
CIS 764 Database Systems Engineering e. Week. com January 19, 2006 “ The lack of detail in Oracle's Fusion Application presentation suggests to some industry experts that the company is not at the halfway point in developing a merged suite. “ Fall 2007 http: //www. cis. ksu. edu 3
CIS 764 Database Systems Engineering ADF http: //en. wikipedia. org/wiki/Oracle_Application_Development_Framework included in JDev, ADF is the conceptual model, components, and wizards possible model components: EJB, Web. Service, Top. Link, ADF_business_components controller: Struts, JSF (Java Server Faces) view: Swing, JSP, JSF all components conf via XML, for easy reconfig, reuse. Fall 2007 http: //www. cis. ksu. edu 4
CIS 764 Database Systems Engineering ADF Index Page http: //www. oracle. com/technology/products/adf/index. html ADF Overview, http: //www. oracle. com/technology/products/jdev/collateral/ papers/1013/adf_10. 1. 3_overview. pdf 11 pages, 2006 Fall 2007 http: //www. cis. ksu. edu 5
CIS 764 Database Systems Engineering Fall 2007 http: //www. cis. ksu. edu 6
CIS 764 Database Systems Engineering Fall 2007 http: //www. cis. ksu. edu 7
CIS 764 Database Systems Engineering GUI components Swing … only in Java apps (not in server) JSP …. . Weak components (button, form ), not automated data binding. JSF …. Web components , w data binding. ADF Faces … Oracle’s own extensions of JSF and with DB binding for use in apps. Fall 2007 http: //www. cis. ksu. edu 8
CIS 764 Database Systems Engineering http: //www. oracle. com/technology/products/adf/learnadf. html ADF Learning Center: two tracks: * IDE Fusion … JSF, ADF Faces, ADF Model, ADF Business Components http: //www. oracle. com/technology/products/jdev/viewlets/1013/ ADF_Overview_Viewlet_viewlet_swf. html an animation and SC example * Java programmer…. JSF, ADF Faces , ADF Model , EJB 3. 0, Top. Link Fall 2007 http: //www. cis. ksu. edu 9
CIS 764 Database Systems Engineering http: //www. oracle. com/technology/obe/ADF_tutorial_1013/ADF_tutorial. pdf 170 pp … pdf for sample application, Service. Company. . Service requests for large appliances http: //www. oracle. com/technology/obe/ADF_tutorial_1013/index. htm index page for the following: http: //www. oracle. com/technology/products/jdev/samples/srdemo. html completed SC demo web app (required JUnit extension to JDev) http: //download. oracle. com/otn_hosted_doc/jdeveloper/1013/adfdevguide. pdf 674 pp ADF guide ! Fall 2007 http: //www. cis. ksu. edu 10
CIS 764 Database Systems Engineering Assignment: just listen to the following Steve Muench , ADF weblog http: //radio. weblogs. com/0118231/stories/2005/06/24/jdeveloper. Adf. Screencasts. htm l Select #4: ( animated demo w audio) Creating a Databound, Master/Detail Swing Panel Using JGoodies Form Layout http: //www. oracle. com/technology/products/jdev/tips/muench/screencasts/ simplejgoodies/binding_demo. html? _template=/ocom_item_templates/print Fall 2007 http: //www. cis. ksu. edu 11
CIS 764 Database Systems Engineering EJB 3 POJO + Annotations => EJB 3. 0 Resources http: //www. oracle. com/technology/tech/java/ejb 30. html Introduction: http: //www. oracle. com/technology/tech/java/newto/introejb. htm or Java World: (has more code examples) http: //www. javaworld. com/javaworld/jw-08 -2004/jw-0809 -ejb. html Fall 2007 http: //www. cis. ksu. edu 12
CIS 764 Database Systems Engineering Entity bean … bound to entity data, with unique key value; can contain multiple subitems. where is the concept of a result set ? Session bean … “session beans generally represent actions …” << bad OO ! “process entity” vs “data entity” Stateless … “do not have internal state” ( ) … rather: do not keep track of the callers state ! Statefull …. . maintains the conversation state across multiple method invocations (e. g. a shopping cart) Beans have an associated deployment descriptor Beans have own QL … “OO version of sql “ Fall 2007 http: //www. cis. ksu. edu 13
CIS 764 Database Systems Engineering EJB annotations http: //www. fnogol. de/archives/2005/05/13/ejb-30 -annotations-cheat-sheet/ Fall 2007 http: //www. cis. ksu. edu 14
CIS 764 Database Systems Engineering Fall 2007 http: //www. cis. ksu. edu 15
CIS 764 Database Systems Engineering import javax. ejb. Stateless. *; @Stateless(name="Calculate. EJB") public class Calculate. EJBBean implements Calculate. EJB { int value = 0; public String increment. Value() { value++; return "value incremented by 1"; } } Fall 2007 http: //www. cis. ksu. edu 16
CIS 764 Database Systems Engineering import javax. persistence. *; import java. util. Array. List; import java. util. Collection; @Entity @Table(name = "EMPLOYEES") public class Employee implements java. io. Serializable { private int emp. Id; private String e. Name; private double sal; @Id @Column(name="EMPNO", primary. Key=true) /* getters and setters here … see next slide } Fall 2007 http: //www. cis. ksu. edu 17
CIS 764 Database Systems Engineering public int get. Emp. Id( ) { return emp. Id; } public void set. Emp. Id(int emp. Id) { this. emp. Id = emp. Id; } public String get. Ename( ) { return e. Name; } public void set. Ename(String e. Name) { this. e. Name = e. Name; } public double get. Sal( ) { return sal; } public void set. Sal(double sal) { this. sal = sal; } public String to. String() { String. Buffer buf = new String. Buffer(); buf. append("Class: "). append(this. get. Class(). get. Name()). append(" : : "). append(" emp. Id: "). append(get. Emp. Id()). append(" ename: "). append(get. Ename()). append("sal: "). append(get. Sal()); return buf. to. String(); } ? ? ? Why the to. String method <<<<<<<< ? ? ? Why Array. List and Collection Fall 2007 http: //www. cis. ksu. edu 18
CIS 764 Database Systems Engineering import javax. naming. Context; import javax. naming. Initial. Context; public class Calculateejb. Client { public static void main(String [] args) { Context context = new Initial. Context(); Calculate. EJB myejb = (Calculate. EJB)context. lookup("java: comp/env/ejb/Calculate. EJB"); myejb. increment. Value(); } } ? ? ? Where does this “client” run ? ? Fall 2007 http: //www. cis. ksu. edu 19
CIS 764 Database Systems Engineering Homework: Oracle EJB 3 Simple Tutorial http: //www. oracle. com/technology/obe 1013 jdev/10131_ejb_30/ejb_30. htm Do an “in essence” version for the PO DB. Note: this is not a web app. The client has remote access to the bean. Post snapshots in JDev and running the client. Fall 2007 http: //www. cis. ksu. edu 20
CIS 764 Database Systems Engineering Note: Future requirements: Contribute some tutorial content … Contribute some technical presentation …. … prior approval of topics is required. Fall 2007 http: //www. cis. ksu. edu 21
CIS 764 Database Systems Engineering end. Fall 2007 http: //www. cis. ksu. edu 22
- Slides: 22