Download presentation
Presentation is loading. Please wait.
Published byBernard Harper Modified over 9 years ago
1
© Blackboard, Inc. All rights reserved. Developing Blackboard Building Blocks: Getting Started John Knight Senior Engineer Blackboard Inc. July 18 th
2
Overview Goals Blackboard ® Building Blocks ® Technology Java/JSP Development Tools Blackboard Building Block Development – Tools and Techniques
3
Now a word from our lawyers… 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 various important factors, including the factors discussed in the "Risk Factors" section of our most recent 10-K filed with the SEC. In addition, the forward-looking statements included in this press release represent the Company's views as of July 18, 2005. 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 18, 2005. Blackboard, in its sole discretion, may delay or cancel the release of any product or functionality described in this presentation.
4
Audience Basic to Intermediate Java developer Java/JSP/Servlet development is assumed Blackboard Building Block development is not assumed, but is helpful Familiarity with, but not necessarily expertise in, current Java development tools
5
Goals Focus on process and environment, rather than Blackboard Building Block technology Cover a selection of tools that are available to build Blackboard Building Blocks Describe techniques and practices that will make the development process easier
6
Blackboard Building Blocks Technology Extensibility mechanism for Blackboard Provide drop-in functionality, or... Provide a bridge to an external system Standards-based Blackboard Building Blocks are Java webapps with additional metadata Rely on/integrate with embedded Tomcat engine
7
Blackboard 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
Anatomy of a Blackboard Building Block Package (.war/.zip file) Platform DescriptorBlackboard Manifest Web Resources Libraries web.xml (Servlets) Servlets, JSP (Java).class,.jar files (Java) bb-manifest.xml
9
The Process Feature Planning Defines what you’ll need in terms of entry points Set up the build environment Local Blackboard server works best Perform an initial build Get entry points defined Install the Blackboard Building Block Iterate Build/rebuild Redeploy
10
The Build Stages Compile Custom.java files compiled into.class files Stage Web app structure is created from other components Package Web app structure is zipped into the.war file Deploy An alternate to “package”, depending on the cycle
11
The Process Preliminary Feature Planning Environment Set-up Initial Build/ Install CompileStagePackage CompileStageDeploy Iterate
12
The Process Initial Install vs. Re-deploy Initial Install reads manifest and establishes the entry points Re-deploy simply makes Blackboard Building Block inactive, then makes it Available again Cycles webapp, reloads classes Inactive/Available cycle unnecessary for JSP changes
13
Example – The Build Environment JDK 1.4/5.x – The core Java library you’ll need Eclipse 3.x – An IDE for editing/debugging/formatting Ant 1.6.2 – A tool to automate many of the tasks (within Eclipse and via shell automation) ... All Freely Available
14
The Tools – JDK Version is dependent on which Blackboard install is targeted 6.0.11 and higher supports 1.4.x 6.3 and higher require 5.x New language features are extremely nice
15
The Tools – Ant An Apache Software Foundation project Not bound to Blackboard release Samples developed against 1.6.2, but should work against earlier versions
16
The Tools – Eclipse Java IDE with substantial productivity features Ant integration Refactoring JUnit integration Plugins (e.g., SCM integration, JSP editing) You’ll need 3.1 if you’re developing with JDK 5.x
17
The Strategy Organize the workspace to separate the different types of files you’ll work on Web Files (JSPs) Logic Files (.java files, servlets, etc.) Configuration Files (.tld,.xml) Etc. Use a tool that will automate the transformation of each artifact into the next Build the configuration to support rapid iteration Use the tools to support unit development, unit testing, and debugging Better encapsulated, smaller units helps make the iteration easier
18
Organizing the workspace...
19
Example – The Directories Compiled Classes Config Files Library Files Java Source “Prep” Directory JSP/HTML/Image
20
Automating the environment...
21
An Ant Primer Build utility to manage compile/build tasks and dependencies Uses XML as the syntax (compare to make, etc). Core data model: project target task Targets define dependencies and contain tasks Tasks are the units of work... Many built-in tasks (javac, jar, copy, etc.) Easy to customize
22
An Ant Primer File typically named “build.xml” Ant will automatically process that file if no file argument is provided Arguments can include specific targets Project default target is used if no target is provided. E.g., c:\projects\sample>ant c:\projects\sample>ant compile c:\projects\sample>ant -f alternate.xml compile
23
Example – A Simplified Build File Init properties, files Compile Java Files Copy files to staging Create.war file Copy to install
24
Example – Build File
25
Example – Eclipse Integration
26
Making It Easier The Starting Block Server Blackboard Building Block to Install, Cycle, and Uninstall An Ant task to invoke the Starting Block from your build environment
27
Using the tools...
28
Test Driven Development Write objects that can be used independently of the container Re-use Testability Get used to writing methods (and tests) corresponding to user interface features
29
Example – JUnit Integration
30
Debugging A valuable and under-used technique Avoid System.out.println() like the plague Limitations actually encourage better practices If you’re used to stepping through code, and hate the lack of JSP source correlation, you’ll build better business objects Caveat: environment is slightly different, notably, the security manager is not enabled by default
31
Debugging – How To Stop the Blackboard Tomcat instance Open a command line, define the JPDA environment variables Execute the shell launcher that brings Tomcat up in JPDA mode Connect with debugger of choice
32
Debugging – How To (Windows) » c:\blackboard\apps\tomcat> net stop bb-tomcat » c:\blackboard\apps\tomcat> set JPDA_ADDRESS=2222 » c:\blackboard\apps\tomcat> set JPDA_TRANSPORT=dt_socket » c:\blackboard\apps\tomcat> bin\blackboard-tomcat.bat jpda start
33
Debugging – How To (Unix) » /usr/local/blackboard/>./tools/admin/ServiceController.sh services.appserver.stop » /usr/local/blackboard/> export JPDA_ADDRESS=2222 » /usr/local/blackboard/> export JPDA_TRANSPORT=dt_socket » c:\blackboard\apps\tomcat>./bin/blackboard-tomcat.sh jpda start
34
Debugging – Connecting
35
Debugging – Connected
37
Conclusion Planning your build environment can help ease some of the headache of Blackboard Building Block development Use tools that help automate the process
38
Resources Ant: http://ant.apache.org/http://ant.apache.org/ Eclipse: http://www.eclipse.org/http://www.eclipse.org/ Java/JDK: http://java.sun.com/http://java.sun.com/ Blackboard Building Blocks: http://buildingblocks.blackboard.com/ http://buildingblocks.blackboard.com/
39
Questions
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.