A_Blackboard_Building_Block_Crash_Course_for_Web_D

Download Report

Transcript A_Blackboard_Building_Block_Crash_Course_for_Web_D

A Blackboard Building Block™
Crash Course for Web Developers
Murali Yellepeddy, Architect
Agenda
• Blackboard Building Block Introduction
• Hooks into the platform
• B2 Manager
• Blackboard API
®
• Tag libraries
• Security
• Q&A
Introduction
• If you've ever built a webapp for Tomcat®,
WebLogic®, WebSphere®, etc Or a portlet for
uPorta®l, Liferay®, etc - you've essentially already
built a Blackboard Building Block
• Blackboard itself is nothing more than a bunch of
webapps running on Tomcat
®
®
Blackboard Architecture
Bb App Server(s)
Client
Bb DB Server
Apache /
IIS
Static files .html
Tomcat
.jsp pages
/webapp pages
Locale images
Collab
Server
chat & virtual
classroom
Oracle® /
SQL*
Server®
Blackboard Building Block
Contents
• B2s are most-closelyrelated to a portlet in that
it's a simple webapp with
1 extra XML file that tells
Blackboard where your
app will hook into it
webapp
Manifest (XML)
BB-Manifest.XML
• Describes the web application to the Blackboard
plug-in manager
– Metadata
• Allows to extend functionality
–
–
–
–
–
Custom Content
Links
Portal Modules
Register to Notifications
Gradable Items
• Security
– Entitlements
– Permissions
Basic Structure of a BlackboardManifest File
<?xml version="1.0" encoding="ISO-8859-1"?>
<manifest>
<!-- core extension information -->
<plugin>
<!-- general information: name, handle, etc. -->
<http-actions> ... </http-actions>
<!– Register to Notifications -->
<extension-defs> ... </extension-defs>
<!-- Custom Portal Modules -->
<module-defs> ... </module-defs>
<!–- Score Providers -->
<score-providers> ... </score-providers>
Basic Structure of a BlackboardManifest File
<!-- custom content handlers -->
<content-handlers>
<content-handler> ...
</content-handler>
</content-handlers>
<!-- Tools defined by this extension -->
<application-defs>
<application> ... </application>
</application-defs>
<permissions>
</plugin>
</manifest>
... </permissions>
Example Code
• Hello World Mashup content handler
• Adds a course tool
®
Blackboard B2 Manager
What to use to build it..
• Just like a webapp, you can use whichever
framework technology you want to use - Struts &
Spring are the most common.
• You can also use straight JSPs for the most basic
of projects, but using MVC is recommended as a
better practice
• Similarly, you can easily add supporting libraries
such as those from the Apache Commons projects
to avoid reinventing the wheel for common tasks.
Note, a lot of libraries already ship with Blackboard
Learn™(check /blackboard/apps/tomcat/lib)
®
®
Blackboard Look & Feel
• Easy to render the user interface using the
Blackboard tag libraries - similar to the JSTL
libraries (Java) or SharePoint web part Web UI
Controls used to render HTML.
• The tag libraries inherit the look/feel, usability, and
accessibility of the core product
• You can also roll your own UI using straight HTML if
desired
Example Code
Javascript
• Blackboard uses Prototype.
• You can layer additional AJAX technologies on top
of it such as Scriptaculous for slick web 2.0-like
behavior.
• Would not recommend using JQuery as sometimes
Prototype and JQuery don't interact so well.
Another one to look at is AjaxTags.
®
Blackboard API to Access
Blackboard Data
• Base persistence objects are defined in the
package, blackboard.persist, with sub-packages
including
–
–
–
–
–
–
announcement
calendar
content
course
gradebook
user
Context vs Persistence
Context tag
– Current Session
– Current Page
– Who am I?
– Where am I?
Persistence objects
– Permanent Data
Store
– Retrieve or
update data
– Single objects
• UserId given
UserName
– Lists of objects
• All users in a
course
• All courses for a
user
Permissions
• Wrapper around Java security
• Allows administrators to allow or deny a building
block based on what it is trying to access
References
• Documentation and API reference
– http://www.edugarage.com
• Tag libraries:
– Current versions on your Blackboard Learn Server
…/blackboard/content/WEB-INF/config/taglibs
– Generate documentation (html-format)
https://taglibrarydoc.dev.java.net/
Questions ?
Please provide feedback for this session by emailing
[email protected].
The subject of the email should be title of this
session:
A Building Block Crash Course for Web Developers