Presentation is loading. Please wait.

Presentation is loading. Please wait.

© Blackboard, Inc. All rights reserved. B2 APIs in Detail Tracy Engwirda Principal Consultant Blackboard Inc. July 19 th.

Similar presentations


Presentation on theme: "© Blackboard, Inc. All rights reserved. B2 APIs in Detail Tracy Engwirda Principal Consultant Blackboard Inc. July 19 th."— Presentation transcript:

1 © Blackboard, Inc. All rights reserved. B2 APIs in Detail Tracy Engwirda Principal Consultant Blackboard Inc. July 19 th

2 Any statements in this presentation about future expectations, plans and prospects for the Company, including statements about the Company, the Building Blocks Program 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 Actual results may differ materially from those indicated by such forward-looking statements as a result of various important factors, including: product development, and other factors discussed in our Registration Statement filed on Form S-1 with the SEC. In addition, the forward-looking statements included in this press release represent the Company’s views as of July 19, The Company anticipates that subsequent events and developments will cause the Company’s views to change. However, while the Company may elect to update these forward- looking statements at some point in the future, the Company specifically disclaims any obligation to do so. These forward-looking statements should not be relied upon as representing the Company’s views as of any date subsequent to July 19, Legal Information…

3 Overview » Background » API Overview » High level review of packages, patterns » System Extension Overview

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 Design Goals – High Level » Decouple persistence from data objects » XML and Database » Originally targeted for import/export » Database abstraction » Iterative functionality » Start with simple objects, mapped to the legacy schema » Managed extensibility » System extensions and deployment model

6 A Little History… Import/Export R6 Portal R6 Gradebook R6 Assessment Module Developer Kit Building Blocks

7 Building Blocks Architecture Core Services Data Objects Business Layer (JSP, Servlet, Struts) View Layer (JSP, Servlet, Tag Library) Log Security ConfigPersistence Session I18NVXI ContextPlug-ins

8 Road Map » Data objects and packages » What data can I see? » Persistence objects and packages » How do I get to the data? » Service objects and packages » How do I log it, authenticate it, etc.?

9 Data Objects blackboard.data » Object view of the schema » 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

10 Data Objects – BbObject » Base object for all data objects » Common attributes – Primary Key (Id), dates, etc. » “Smart” attributes » Properties stored in an internal map, instead of member variables » Smart load, dirty flag » Id attribute helps define lifecycle » Id.UNSET_ID – default id for new objects

11 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 » Custom content types should create and manipulate Content objects; not CourseDocument objects. » CourseDocument can be used to manipulate the base “Item” type

12 Data Objects – Content » ContentHandler » Ties content to URI-based “handlers” » This is really the B2 “glue” for custom content » IsFolder » Can the object contain other objects » IsLesson » Should the contents be displayed sequentially » Plus many more added in Bb 6.3

13 Data Object – Content

14 Data Objects – Course blackboard.data.course » Course and Organization » Organization overrides course for specific attributes » Course Enrolment » CourseMembership » Enumerated roles » CourseMembership.Role.INSTRUCTOR » Course Groups and Group Enrolment

15 Data Objects - Gradebook » blackboard.data.gradebook » LineItem » Defines the “columns” in a course gradebook » Score » Wraps the actual outcome for a given line item

16 Data Objects – Misc. » Announcement » Wraps, well, announcements » Can be system or course level » Calendar » Wrap entries in the calendar » Course and System level

17 Persistence Objects » Intended to be decoupled from data objects » Interfaces allow replaceable persistence implementations » Currently proprietary to Blackboard » BbPersistenceManager » Ties together different aspects of persistence » Loader/Persister broker » Container

18 Persistence Objects – Id » Used to encapsulate the unique identifier for each data object » Primary key, and more… » Data type » Container (database) » GUIDs are not used, so keys can collide

19 Persistence Objects – Loaders » Base interface to get at data » Roughly one-to-one correspondence to data objects » All type-specific loaders are geared towards known predicates » loadById() » loadByUserIdandType() » Performance. Ad hoc queries can kill the system… » Schema stability.

20 Persistence Objects – Persisters » Perform any action that manipulates data » Again, one-to-one correspondence with data objects » “Smart” update » Id object state determines insert vs. update

21 Accessing Persisters and Loaders » They’re interfaces, not directly instantiated by callers » BbPersistenceManager is the broker » Most have a Default object for direct access ContentDbLoader loader = ContentDbLoader.Default.getInstance()

22 Putting It Together Content content = new Content(); content.setTitle(); // etc... ContentDbPersister contentPersister = ContentDbPersister.Default.getInstance(); contentPersister.persist( content );

23 Putting It Together – v2 Content content = new Content(); content.setTitle(); // etc... // new reflection-based persistence methods content.persist();

24 Services » Infrastructure for common utility functions » Exposed as interfaces (mostly) » Lookup via BbServiceManager

25 Service Lookups LogService logService = BbServiceManager.getLogService(); LocaleManager locMgr = BbServiceManager.getLocaleManager(); ContextManager ctxMgr = (ContextManager)BbServiceManager.lookupService( ContextManager.class );

26 Services – Context blackboard.platform.context » Critical entry point that all code must call » Context wraps information about current request to get the correct database connection » Interact via ContextManager.setContext() and ContextManager.releaseContext()

27 Services – Session blackboard.platform.session » State for the current browser-based client » Stores authentication status » Cookie-based session management » Database persistent 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

28 Services – Filesystem blackboard.platform.filesystem » FileSystemService - Broker different file system locations » Course and content » E.g., getContentDirectory()

29 Services – Log blackboard.platform.log » Simple write-only log implementation » Supports configurable levels » Written before log4j and JDK 1.4

30 Services - Security Blackboard.platform.security » Authentication and Authorization » AccessManagerService

31 Package Base » Mix of utility objects » BbList – List implementation that can enforce type safety » Not really useful externally; since it implements List, and you have to cast anyway, that’s what you should use » Will probably be replaced with a generic alternative » BbEnum – base class for all type-safe enumerations » NestedRuntimeException/NestedException – pre-JDK 1.4 facility for chaining exceptions

32 Package Base » FormattedText – encapsulation of text data entered via standard Text boxes » Defines enumeration for Smart, Plain, and HTML text » GenericComparator – Comparator implementation that can sort based on arbitrary properties » Works with String, Boolean, Dates, and Comparable

33 Administrative APIs blackboard.admin.* » APIs geared towards data integration » Formerly called the “Event” APIs » Repackaged to be more consistent with B2 APIs » Compatibility layer supported » Base classes used in Snapshot

34 Administrative APIs » Follows IMS Data Model » Person, Course (Group), and Membership » Additional objects for Blackboard usage » Category » Data Source » Defines logically related entities that can be managed independently via Snapshot

35 Portal blackboard.portal.external » CustomData is all you’ll need… » getModuleData() » getModulePersonalizationData() » Store name/value » Value can be string, or binary object

36 Beyond APIs – UI Integration » Tag Libraries » Encapsulate re-usable UI components to capture the Blackboard look and feel » Tag Library Descriptors » Re-use within individual web applications ».tld files

37 Beyond APIs - Deployment » Not an API, per se » Critical aspect of extension development » XML manifest used to generate records in the database that define navigation, content brokering

38 Anatomy of a System Extension Package (.war/.zip file) Platform Descriptor Blackboard Manifest Web Resources Libraries web.xml (Servlets) Servlets, JSP (Java).class,.jar files (Java)

39 System Extension Deployment » Standard Java-based web application » Same basic mechanism, based on Servlet specification » Additional Blackboard metadata » bb-manifest.xml » Defines “entry points”—links that can be rendered from the Blackboard UI

40 System Extension Deployment

41 System Extension Deployment Application installed to demonstrate storage techniques

42 System Extension Deployment

43

44 Tying It All Together » Each JSP or servlet will require touching several different APIs 1. Set context 2. Authorize current User 3. Load content object 4. Access Gradebook data 5. Perform custom calculation 6. Log result 7. Render results (bracketed via tags) 8. Release context

45 Thoughts » There are a lot of classes to look at… » Focus on the type of Building Block you need to build » Take it methodically, iteratively. What’s your first goal? Second goal? » Think of combining functions » What can I do using Content with Gradebook?

46 Thank you » Questions?


Download ppt "© Blackboard, Inc. All rights reserved. B2 APIs in Detail Tracy Engwirda Principal Consultant Blackboard Inc. July 19 th."

Similar presentations


Ads by Google