Академический Документы
Профессиональный Документы
Культура Документы
The Client
This project has been sponsored by Intel IIT B point of contact Prof. Umesh Bellur
Problem Definition
This project aims at putting together an integrated e-Learning environment for a university student. This will also be used by distance education programs offered by institutes, in order to enable students to avail of the academic facilities from any computer connected to the internet.
Basic terminology
Session Beans (verb) Model business processes. They represent actions Entity Beans (noun) Model Business data They are data object, java objects that cache database information
EJB Container
House enterprise beans and make them available for clients to invoke remotely Provide an environment in which enterprise beans can run Invisible middlemen
EJB Architecture
Basic Terminology
EJB container takes care of making sure the entity bean object stays around.
You as the bean programmer can take over the responsibility of managing the "persistence" of the data -- of where the data stays when the server is not running or when the bean is not in memory.
Requirement Specs
Admin
Instructor
Managing user accounts, course registration approval Login,Create / Modify course details, set Quizzes, assign grades Login, Register / Unregister for courses, take quizzes, view lectures in offline mode Open-Source and Freeware Support over Internet and Intranet
Student
Non-Functional Requirements
Technology Decisions
Client
Client Integrated Environment
Communication Protocol
Internet
Server
Speed
Slow. Everything must Fast. Can instantly scroll wait for the server to since the client can cache process and transmit the and process data locally. next screen of information.
Specs
Servlet
Request Processor
DB Manager
Database
Simple and Intuitive. Uses HTTP over the internet and simple JDBC to communicate with the database server. As compared with J2EE server
Light
WebServices ???
RMI offers an order of magnitude better performance than other alternatives, being at least 8.5 times faster than Web Services HTTP-to-servlet is more than 4 times slower than web services.
Why EJBs?
Management
CMP vs BMP
BMP CMP Avoid unnecessary Done using dirty CMP engine handles stores flags, but it requires this more coding and is error-prone Coding JDBC sql queries have to be code. Lesser Coding
EntityBean
EntityBean
Database
EntityBean EntityBean
Session Facade
Performance An Entity bean is equivalent to a row in the database. If the Entity beans were to be accessed directly, a network call would result for each row access.
On the other hand, a Session bean is equivalent to a stored procedure. Accessing a session bean that is colocated with an entity bean emulates accessing a row through a stored procedure.
Session Facade
Reusability The session bean layer is powerful because it externalizes all business logic from the entity beans. This means the entity beans contain data and datarelated logic only. This promotes high re-use of entity beans. Data abstraction layer The session bean layer is a facade. The particular way the session bean persists (via JDBC directly or via entity beans) is an implementation detail of the session bean. The decision about whether to use JDBC or entity beans can be deferred until a later date.
E-R Diagram
Object Model
Class Diagram
EJB Architecture (session bean, entity bean concepts) BMP vs CMP Concept of CMR Configuring JBoss 4.0 Configuring Postgres 8.0 on JBoss Serial Primary Key Writing Deployment Descriptors
Challenge
Trying
to synchronize the Intel deadlines with the syslab deadlines throughout this course
Deployment Descriptor
<entity> <ejb-name>course</ejb-name> <local-home>vclassroom.course.ejb.CourseLocalHome</localhome> <local>vclassroom.course.ejb.CourseLocal</local> <ejb-class>vclassroom.course.ejb.CourseBean</ejb-class> <persistence-type>Container</persistence-type> <reentrant>False</reentrant> <cmp-version>2.x</cmp-version> <abstract-schema-name>course</abstract-schema-name> <prim-key-class>java.lang.Integer</prim-key-class> <primkey-field>courseId</primkey-field> <cmp-field> <field-name>courseId</field-name> </cmp-field>
Deployment Descriptor
<query> <query-method> <method-name>ejbSelectprerequisites</method-name> <method-params> <method-param>java.lang.Integer</methodparam> </method-params> </query-method> <ejb-ql><![CDATA[SELECT OBJECT(p) FROM course as c, IN(c.prereqCourses) p WHERE c.courseId = ?1]]> </ejb-ql> </query> </entity>
J2EE Architecture
Enterprise
Java Beans
JBoss 4.0 Postgres 8.0 EJB-QL Swing (work in progress) Patterns Session Faade, Recursive Meta pattern, Chain of responsibility
The Timeline
Before MidSem
After Midsem
Overview of the system requirements from Intel Requirement Specification Document prepared and presented to Intel Architecture + Design Documentation Prototype : Demo with the old architecture Login, Registration, Quiz Deliverable Client + Server implementation of modules Change in architecture Protocol + Server Side Learning Curve for new technology EJBs, J2EE architecture Technology survey - Exploring options like JDO, Web Services Configurations JBoss 4.0, Postgres 8.0 Design of new architecture Presentation to Intel Detailed Design specification documentation Deliverable Server Side coding + documentation Login, Registration, Quiz