Download presentation
Presentation is loading. Please wait.
Published byEdmund Leonard Modified over 9 years ago
1
© Blackboard, Inc. All rights reserved. Java APIs in Depth: Blackboard Learning System and Community System David Ashman Senior Software Architect, Product Development Blackboard Inc.
2
2 Any statements in this presentation about future expectations, plans and prospects for Blackboard and other statements containing the words “believes,” “anticipates,” “plans,” “expects,” “will,” and similar expressions, constitute forward-looking statements within the meaning of The Private Securities Litigation Reform Act of 1995. Actual results may differ materially from those indicated by such forward-looking statements as a result of product development changes and other important factors discussed in our filings with the SEC. We may make statements regarding our product development and service offering initiatives, including the content of future product upgrades, updates or functionality in development. While such statements represent our current intentions, they may be modified, delayed or abandoned without prior notice and there is no assurance that such offering, upgrades, updates or functionality will become available unless and until they have been made generally available to our customers. About Forward Looking Statements
3
3 Overview » Background » API Overview » High level review of packages, patterns » System Extension Overview
4
4 Audience » Knowledge of Java programming » People who want an overview of the entire range of functionality exposed » (without resorting to reading the docs) » Thinking of building, don’t know what to look at first…
5
5 A Little History… Import/Export R6 Portal R6 Gradebook R6 Assessment Module Developer Kit Blackboard Building Blocks™ R7 Discussion Board
6
6 Blackboard Building Blocks™ Architecture Core Services Data Objects Business Layer Presentation Layer (JSP, Struts, Tag Library) Log Security ConfigPersistence Session I18NVXI ContextPlug-ins DB
7
7 Road Map » Core Services » How do I log it, authenticate it, etc.? » Persistence » How do I get to the data? » Data Objects » What data can I see?
8
© Blackboard, Inc. All rights reserved. Service APIs
9
9 Services » Infrastructure for common utility functions » Exposed as interfaces (mostly) » Lookup via BbServiceManager
10
10 Service Lookups LogService logService = BbServiceManager.getLogService(); LocaleManager locMgr = BbServiceManager.getLocaleManager(); ContextManager ctxMgr = (ContextManager)BbServiceManager.lookupService( ContextManager.class );
11
11 Services – Log » blackboard.platform.log.LogService » Simple write-only log implementation » Supports configurable levels » Decouples system from underlying logging implementation » Log4j » JDK 1.4 logging
12
12 Services – Filesystem » blackboard.platform.filesystem.FileSystemService » Broker different file system locations » Course and content » E.g., getContentDirectory()
13
13 Services - Security » blackboard.platform.security.AccessManagerService » Authentication » Authorization
14
14 Services – Session » blackboard.platform.session.BbSessionManagerService » State for the current browser-based client » Stores authentication status » Cookie-based session management » Persisted to the database to share between Perl and Java processes » Some assembly required » Not all HTTP-clients (e.g., media plugins for browsers) honor the host browser’s cookies
15
15 Services – Context » blackboard.platform.context.ContextManager » Represents the current request’s state » Who am I? » What course am I in? » What database am I supposed to talk to? » Critical entry point that all code must call » Interact via ContextManager service interface » ContextManager.setContext() » ContextManager.releaseContext()
16
© Blackboard, Inc. All rights reserved. Persistence APIs
17
17 Persistence APIs » Interfaces allow replaceable persistence implementations » Currently proprietary to Blackboard » Implements standard DAO Pattern » BbPersistenceManager » Ties together different aspects of persistence » Loader/Persister broker » Container
18
18 Persistence APIs – Id » Used to encapsulate the unique identifier for each data object » Defines the object’s lifecycle » Id.UNSET_ID – default id for new objects » Primary key, and more… » Data type » Container (database) » GUIDs are not used, so keys can collide
19
19 Persistence APIs – Loaders » Implements DAO Pattern for finding and loading data objects » All type-specific loaders are geared towards known predicates » loadById() » loadByUserIdandType() » Why? » Performance – Ad-hoc queries can kill the system… » API stability
20
20 Persistence APIs – Persisters » Implements DAO Pattern for inserting, updating and deleting data objects » “Smart” update » Id object state determines insert vs. update
21
21 Accessing Persisters and Loaders » Not directly instantiated » Always implemented as interfaces » BbPersistenceManager is the broker » Most have a Default object for direct access ContentDbLoader loader = ContentDbLoader.Default.getInstance()
22
22 Persistence Example Content content = new Content(); content.setTitle(“Foo”); // etc... ContentDbPersister contentPersister = ContentDbPersister.Default.getInstance(); contentPersister.persist( content );
23
© Blackboard, Inc. All rights reserved. Data Object APIs
24
24 Data Objects » blackboard.data.* » Object view of the database » Typed to wrap legacy database constructs » Type-safe enumerations for constrained database columns » User.Role.SYSTEM_ADMIN » Faithful adherence to existing schema has some interesting side effects
25
25 Data Objects – BbObject » Base object for all data objects » Common attributes » Primary Key (Id) » Creation date » Modification date » “Smart” attributes » Properties stored in an internal map, instead of member variables » Smart load, dirty flag
26
26 Data Objects – Content » blackboard.data.content » Content is the root object that can be used in the “content” areas of a course » All other objects are simple subclasses of Content that over-ride specific values » Different types of content » Folder » Can the object contain other objects? » Lesson » Should the contents be displayed sequentially? » Reviewable » Can the content be reviewed for Adaptive Release rules?
27
27 Data Objects – Content
28
28 Data Objects – Content » Content Handler » Ties content to URI-based “handlers” » Similar to mime types » resource/x-plugin-scorm » This is really the B2 “glue” for custom content » Custom content types should create and manipulate Content objects » Only interact with specific types when you KNOW you’re dealing with the correct type » Generally safer to only use Content object for custom content
29
29 Data Objects – Course and Organization » blackboard.data.course » Course and Organization » Organization extends Course and overrides specific attributes » Group » Represents a subset of the course members » CourseMembership » Represents enrollment in a course/organization » Enumerated roles » CourseMembership.Role.INSTRUCTOR » CourseMembership.Role.STUDENT » CourseMembership.Role.GRADER
30
30 Data Objects - Gradebook » blackboard.data.gradebook » Provides access to Blackboard course management system’s gradebook » LineItem » Represents individual gradeable items in a course gradebook » Score » Wraps the actual outcome for a given line item
31
31 Data Objects – Discussion Board » blackboard.data.discussionboard » Exposes Blackboard community system’s discussion board subsystem » Conference » Aggregates a collection of forums » Each course/organization has one default Conference » Forum » Encapsulates a collection of messages related to a common topic » Message » Individual message in a Forum » Can be threaded » Supports attachments
32
32 Other Data Objects » Announcement » Wraps, well, announcements » Can be system or course level » Calendar » Wrap entries in the calendar » Course and System level » CourseToc » Represents navigation paths within a course menu » Displayed inside a course
33
33 Other Core Objects » blackboard.base.BbList » List implementation that can enforce type safety » Implements java.util.List interface, so use that instead » Will probably be replaced with Java 5.0 Generics based List » blackboard.base.BbEnum » Base class for all type-safe enumerations » Will start using Java 5.0 enum constructs » blackboard.base.NestedRuntimeException and blackboard.base.NestedException » Pre-JDK 1.4 facility for chaining exceptions
34
34 Other Core Objects » blackboard.base.FormattedText » Encapsulation of text data entered via standard Text boxes » Defines enumeration for Smart, Plain, and HTML text » blackboard.base.GenericComparator » Comparator implementation that can sort based on arbitrary properties » Works with String, Boolean, Dates, and Comparable
35
© Blackboard, Inc. All rights reserved. Integration APIs
36
36 Portal » blackboard.portal.external » CustomData is all you’ll need… » Stores module and personalization information for a given module » Store key/value » Value can be string or binary object
37
37 User Interface Design » Tag Libraries » Encapsulate re-usable UI components to capture the Blackboard look and feel » Caret Pages » List Pages » Headers » Steps and Data Elements for data collection
38
38 Integration APIs » blackboard.admin.* » Formerly called the “Event” APIs » Repackaged to be more consistent with B2 APIs » Implements data model for Snapshot » Maps Blackboard data model to IMS standard » Person » Course (Group) » Membership » DataSource » Defines logically related entities that can be managed independently via Snapshot
39
© Blackboard, Inc. All rights reserved. Deployment
40
40 Anatomy of a Plugin Package (.war/.zip file) Platform Descriptor Blackboard Manifest Web Resources Libraries web.xml Servlets, JSP (Java).class,.jar files (Java)
41
41 Plugin Deployment » Standard Java-based web application » WEB-INF/bb-manifest.xml » Additional Blackboard metadata » Defines data that is stored into the database » Tools » Content Handlers » Portal Modules » Defines “entry points” » Links that can be rendered from the Blackboard UI
42
42 Plugin Deployment – General Information
43
43 Plugin Deployment – Content Handlers
44
44 Plugin Deployment – Tools Application installed to demonstrate storage techniques
45
45 Plugin Deployment – Portal Modules <module-type ext-ref="smpl-module" title="plugin.sample-module.title“ uicreatable="true"> module view.jsp edit.jsp admin.jsp
46
46 Plugin Deployment - Permissions <permission type="socket" name=“www.w3.org” actions="resolve,connect"/> <permission type="java.io.FilePermission" name="<<ALL FILES>>“ actions="read,write,delete"/> <permission type="persist" name="Content" actions="create,modify,delete"/> <permission type="persist" name="Outcome" actions="load,persist,delete"/>
47
47 Plugin Deployment - Localization » element indicates the extension is localized » Name and description values in bb-manifest.xml are used as bundle keys » Bundles are deployed under WEB-INF/bundles using bb-manifest-xx_XX.properties pattern for all supported locales
48
48 Plugin Deployment
49
49 What have we covered? » Core Service APIs » Persistence APIs – DAO Pattern » Data Objects » Integration APIs » Deployment
50
© Blackboard, Inc. All rights reserved. Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.