© Blackboard, Inc. All rights reserved. My First Building Block as a Content Type Heather Natour Senior Lead Engineer Blackboard Inc. July 18 th 1:30pm.

Slides:



Advertisements
Similar presentations
17 Copyright © 2005, Oracle. All rights reserved. Deploying Applications by Using Java Web Start.
Advertisements

JSP and web applications
Struts Portlet Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Struts Portlet Adding an Action Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without.
Site Collection, Sites and Sub-sites
Business Development Suit Presented by Thomas Mathews.
Walkthrough of Java APIs Presented By Tracy Engwirda 28 September, 2005.
A Toolbox for Blackboard Tim Roberts
A Blackboard Building Block™ Crash Course for Web Developers
Extending JIRA Rachel Wright July 15, 2014 See slide “Notes” section for commentary and talking points.
Using JavaServer Pages Harry R. Erwin, PhD CIT304/CSE301.
My First Building Block Presented By Tracy Engwirda 28 September, 2005.
Object-Oriented Enterprise Application Development Tomcat 3.2 Configuration Last Updated: 03/30/2001.
WEB1P servintro1 Introduction to servlets and JSP Dr Jim Briggs.
DT211/3 Internet Application Development
JSP Architecture  JSP is a simple text file consisting of HTML or XML content along with JSP elements  JSP packages define the interface for the compiled.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
Introduction to Java web programming Dr Jim Briggs JWP intro1.
Future Directions for Leveraging Advanced XML Tools and Building Custom XML Solutions Denise Draper DAT321 Microsoft Corporation.
Blackboard Look and Feel through Tag Libraries Presented By Tracy Engwirda 29 September, 2005.
® IBM Software Group © 2006 IBM Corporation How to read/write XML using EGL This Learning Module shows how to utilize an EGL Library to read/write an XML.
Course Textbook: Build Your Own ASP.Net Website: Chapter 2
Overview of JSP Technology. The need of JSP With servlets, it is easy to – Read form data – Read HTTP request headers – Set HTTP status codes and response.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
WaveMaker Visual AJAX Studio 4.0 Training Studio Overview.
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
System for Administration, Training, and Educational Resources for NASA SATERN Overview for Learners May 2006.
Integrating Forms, Reports and Discoverer into Portal Chris Ostrowski Technical Management Consultant TUSC Session id:
Using JavaBeans and Custom Tags in JSP Lesson 3B / Slide 1 of 37 J2EE Web Components Pre-assessment Questions 1.The _____________ attribute of a JSP page.
Data File Access API : Under the Hood Simon Horwith CTO Etrilogy Ltd.
V0.1 BlackBerry HTML5/WebWorks Applications for the BlackBerry ® PlayBook™ Tablet BlackBerry Academic Program Module 5 - Writing HTML5/WebWorks API Extensions.
© Blackboard, Inc. All rights reserved. My First Java Building Block for the Blackboard Content System Stephanie Cupp Senior Product Analyst Blackboard.
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Session 1 SESSION 1 Working with Dreamweaver 8.0.
ASP/ASP.NET: Tricks and Tips How to get Microsoft’s Programming Language to work for you By Wade Tripp Park University
Chapter 7 Using Custom Tag Libraries and the JSP Standard Tag Library.
® IBM Software Group © 2007 IBM Corporation Best Practices for Session Management
Java server pages. A JSP file basically contains HTML, but with embedded JSP tags with snippets of Java code inside them. A JSP file basically contains.
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
Blackboard Building Blocks Portal Modules and Module Types Monday, November 16, 2015 Tom Joyce, Product Manager, Product Development.
Blackboard and Content Types John Knight Blackboard Inc.
JSP Custom Tags. Prerequisites Servlet API Mapping to JSP implicit objects JavaServer Pages Basic syntax Implementation via servlet API XML.
Implementing and Using the SIRWEB Interface Setup of the CGI script and web procfile Connecting to your database using HTML Retrieving data using the CGI.
Java Enterprise Edition Programming Page 1 of 9Configuring Servlets Web Application Context Name  In multiple web applications, a “context name” is used.
Looking at various Rich Message options in KRAD Kuali University: Apply Now Lab : Rich Messages Lab Objectives Understand what Rich Messages are and how.
CS562 Advanced Java and Internet Application Introduction to the Computer Warehouse Web Application. Java Server Pages (JSP) Technology. By Team Alpha.
Blackboard Building Blocks™: Data Integration and Administration Raymond Peterson, Blackboard, Inc.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
Portal Modules & Module Types Heather Natour Senior Software Engineer, Blackboard Community System.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
CHAPTER 7 LESSON C Creating Database Reports. Lesson C Objectives  Display image data in a report  Manually create queries and data links  Create summary.
IBM Express Runtime Quick Start Workshop © 2007 IBM Corporation Deploying a Solution.
: Information Retrieval อาจารย์ ธีภากรณ์ นฤมาณนลิณี
J2EE JSP Custom Tag Libraries 1 3 JSP: Custom Tag Libraries.
JQUERY AND AJAX
17 Copyright © 2004, Oracle. All rights reserved. Integrating J2EE Components.
Customizing Share Document Previews Will Abson Senior Integrations Engineer and Share Extras Project Lead
Day 22, Slide 1 CSE 103 Day 22 Non-students: Please logout by 10:12. Students:
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
1 Middle East Users Group 2008 Self-Service Engine & Process Rules Engine Presented by: Ryan Flemming Friday 11th at 9am - 9:45 am.
Business Directory REST API
CARA 3.10 Major New Features
USING DREAMWEAVER Contents: Assigning a Root Folder
Data File Import / Export
USING DREAMWEAVER MX 2004 Contents: Assigning a Root Folder
Presentation transcript:

© Blackboard, Inc. All rights reserved. My First Building Block as a Content Type Heather Natour Senior Lead Engineer Blackboard Inc. July 18 th 1:30pm

Overview » Types of Content Oriented Building Block Integrations » Look at Various Implementations » Tips and Tricks » Questions

Types of Integrations » Content-Handlers which work with internal data structures and use Building Block perisisters for data storage » Content-Handlers which work with internal data structures and use other means for storage (XML, Java Property Files, etc) » Content-Handlers which simply link to an external system

Before we look at differences… » Let’s examine the commonalities…. » Let’s quickly walk through our Building Block Planning Process (From the My First Building Block Presentation) »

Planning » Where are you going to hook your application into Blackboard?

User Interface Integration Content-Handlers appear under the “add other” pull down from the content areas.

Planning » Which APIs are you going to use?

API Capabilities » Building Blocks API » Announcement (read and write) » Calendar (read and write) » Content (read and write) » Gradebook (read and write) » Session (read and write) » File system (read and write) » *User (read) » *Course (read) » *Membership (read)

Structure of the Building Block » It’s a standard JAVA Web Application (Webapp) with some additional descriptive data (XML Files) that is used by Blackboard to manage registration, deployment, security, and management.

Directory Structure

Package Format » A webapp is a zip file with a specific directory structure » WinZip, PkZip, or Java’s Jar utility will all create the correct package » Even though it is a zip file, the extension does not matter (.zip,.war,.bb will all work)

WEB-INF » Hidden from web » Contents » web.xml » bb-manifest.xml » Config directory » Classes directory » Lib directory

Config Directory » Hidden from web » Only directory that is owned by your building block » Can contain anything » No size limit

Custom Code and Libraries » Classes » Stored in WEB-INF\classes » Jars » Stored in WEB-INF\lib » Automatically on classpath via custom classloader

Manifest Structure » Bb-manifest.xml » Set of directives the developer provides » Building Blocks Configuration » Application Definitions » Content Handlers » UI Links » Portal Modules » Security Declarations » Let’s Take a Look at one for content …

Bb-manifest.xml »

Bb-manifest.xml »... » »... Set Handler Set Create, Modify, and Remove handlers

Bb-manifest.xml »... »

Now we know the structure… » Once we have decided our directory layout and created (customized) our bb-manifest.xml file, we are ready to look at the JSP pages which comprise our webapp.

With that… » We need to setup a structure for our webapp

Deploy the skeleton » It’s far easier to deploy the skeleton webapp and then make your changes directly on your DEVELOPMENT server. » Files are located in blackboard/content/ci/bb_bb60/xxx-xxxx/webapp »

Some good things to know… » Course ID and Container ID are passed to pages » If you use the taglibs (BbUI and BbData) you will always have access to the session data, user data, consistent UI widgets, etc. » You have access to read/write files to your webapps config space » Good for configuration data or application data!

Create.jsp » <% » /////////////////////////////////////////////////////////// » // Filename: Create.jsp » // Desc: Part of the sample content-handler, this file » // is responsible for displaying the form to gather » // the data for the creation of the content object. » /////////////////////////////////////////////////////////// » %> » page import=" » blackboard.platform.*, » blackboard.platform.plugin.*" » errorPage="/error.jsp" » %> » Page Imports Import Tag Libs Establish Context

Create.jsp » <% » if (!PlugInUtil.authorizeForCourseControlPanel(request, response)) » return; » %> » » "> » » "> » » SAMPLE CONTENT HANDLER » Check for Auth Doc and Course Taglibs Course and Content IDs are passed in Breadcrumb

Create.jsp

» » Yes No » Create.jsp

»

Create.jsp

Create_proc.jsp » Just the Highlights! » // retrieve the Db persistence manager from the persistence service » BbPersistenceManager bbPm = BbServiceManager.getPersistenceService().getDbPersistenceManager(); » // generate the internal IDs for the course and parent » Id courseId = bbPm.generateId(Course.COURSE_DATA_TYPE,request.getParameter("course_id")); » Id parentId = bbPm.generateId(CourseDocument.COURSE_DOCUMENT_DATA_TYPE,request.getParameter("parent_ id")); » // create a new content iteam » Content courseDoc = new Content(); » //set the title » courseDoc.setTitle(request.getParameter("title"));

Create_proc.jsp » // set the main data (as HTML data) » String strMainData = request.getParameter("maindata"); » FormattedText text = new FormattedText(strMainData,FormattedText.Type.HTML); » courseDoc.setBody( text ); » // set the parent ID » courseDoc.setParentId(parentId); » » // set the content handler » courseDoc.setContentHandler( "resource/x-bb-samplecontent" ); » // set the course ID » courseDoc.setCourseId( courseId ); » // Set to Track the content or not » String strTracked = request.getParameter("isTrack"); » if (strTracked.equalsIgnoreCase("true")) { » courseDoc.setIsTracked(true); » } else { » courseDoc.setIsTracked(false); » }

Create_proc.jsp » // validate the new content idem » courseDoc.validate(); » // Persist the object » ContentDbPersister contentPersister = (ContentDbPersister) bbPm.getPersister( ContentDbPersister.TYPE ); » contentPersister.persist( courseDoc );

Modify and Modify_proc » Almost identical to create process. » See the sample Content Handler for details » Remove is optional clean up

Demonstration

We covered the most basic… » Let’s touch on more advanced topics: » Storing additional parameters » Relative Referencing of the content_id » Linking to external resources » Import/Export/Copy/Migration Issues

Storing additional parameters » What types of data do you want to store? » In what do you want to store it? » In JAVA property files » As XML? » As Serialized Java Objects? » In your own proprietary (and somewhat creative formats)

» Where do you store the parameters? » In the webapp’s config directory? » In the content’s directory » In the content itself (hidden) » Externally Storing additional parameters

Using the webapps config dir » // Get the Configuration Directory » File dir = PlugInUtil.getConfigDirectory(“bb","sample-contenthandler"); » // get the config file » File cfg = new File(dir, “custom.properties"); » // If it doesn't exist yet, create a blank one » if (!cfg.exists()) { » cfg.createNewFile(); » FileOutputStream f = null; » try { » f = new FileOutputStream(cfg); » } catch (FileNotFoundException e){ » out.println("Can't find the file"); » } » Properties p = new Properties(); » // Write them out to the conf file » p.setProperty(“name",“value"); » p.store(f,“My Configuration File"); » f.close(); » }

Using the content directory » FileSystemService fileSysService; » fileSysService = (FileSystemService)BbServiceManager. lookupService( FileSystemService.class ); » java.io.File fileContentDirectory = fileSysService.getContentDirectory(course, courseDocId); » Advantages » Content on file system in this directory is PORTABLE with import/export/copy/migration » Can be referenced with the syntax rather than hard coded

Storing Data in the Content » Why not use the content item itself and store your other data in the MAIN DATA blob? » Use comment blocks to mask your data » Advantages: complete portability, no external dependencies » Disadvantages: ALL Data in this field is rendered by the content engine in the user view.

Externally » You can simply insert a URL to your own content engine in the Blackboard content item. » Advantages: » Many to One relationship between content and raw data » Setup own system for management and deployment » Disadvantages: » Content is ignorant of copy/import/export/migration and all copies will still point to the hard coded URL

Summary » We’ve seen how to create a new content-handler from scratch » We’ve seen the structure of the webapp and walked through an example of one. » We talked about the various places, structures, and methods of storing content and the advantages and disadvantages of each.

© Blackboard, Inc. All rights reserved. Thank you!