using third-party frameworks in building blocks™ david ashman principal architect, product...

Download Using Third-Party Frameworks in Building Blocks™ David Ashman Principal Architect, Product Development

If you can't read please download the document

Upload: dulcie-freeman

Post on 24-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

  • Slide 1
  • Using Third-Party Frameworks in Building Blocks David Ashman Principal Architect, Product Development
  • Slide 2
  • Disclaimer USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS I may make statements about our future offerings or functionality. While it is our best intentions that these things will be made available, we cannot provide any assurances that they will be available until they are made available. If there are further questions, please speak with our general counsel.
  • Slide 3
  • Who is this for? USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Intermediate to advanced Blackboard Building Block developers. Understands how to create a simple JSP-based Blackboard Building Block. Familiar with a variety of APIs available in Blackboard Learn. Not covering Basic Blackboard Building Block APIs
  • Slide 4
  • Presentation Format USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Focus on code Live demos Examples Code samples available after DevCon.
  • Slide 5
  • Overview USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Using Spring in your Blackboard Building Block Using Hibernate in your Blackboard Building Block
  • Slide 6
  • Spring is a layered Java/J2EE application platform, based on code published in Expert One-on-One J2EE Design and Development by Rod Johnson SpringSource (http://www.springsource.org) USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS What is Spring?
  • Slide 7
  • USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Program to interfaces, not classes. OO design trumps implementation technologies, such as J2EE. Testability is essential. KISS principal Doesnt replace good technologies (Hibernate, JDO, etc), just fosters integration.
  • Slide 8
  • Spring in Building Blocks USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Integrating Spring Annotations vs XML configuration Required Libraries spring.jar spring-webmvc.jar Bootstrapping Spring
  • Slide 9
  • Spring in Building Blocks USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Demo
  • Slide 10
  • Spring in Building Blocks USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Inversion of Control Hollywood Principal - Dont call me, Ill call you. Simplifies access to Blackboard Learn APIs.
  • Slide 11
  • Spring in Building Blocks USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Spring MVC POJOs as web endpoints Simpler, more flexible API compared to Struts
  • Slide 12
  • Spring in Building Blocks USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Demo
  • Slide 13
  • Hibernate is concerned with helping your application to achieve persistence. So what is persistence? Persistence simply means that we would like our applications data to outlive the applications process. Jboss Community (http://www.hibernate.org) USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS What is Hibernate?
  • Slide 14
  • USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Natural Programming Model Persistence using natural OOP idioms. Transparent Persistence No interfaces or base classes, just annotations or XML configuration. High Performance Lazy initialization, smart fetching and optimistic locking. Reliability and Scalability Extensibility Advanced Query Facilities HQL, JPAQL (Java Persistence API Query Language) and SQL.
  • Slide 15
  • But what about DB Loaders and Persisters? USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS What is Hibernate?
  • Slide 16
  • Open Database Initiative USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Were publishing our schema! The schema may change, but youll know about it and how its changed. Use other technologies to reach our data for difference use cases. Be careful how you use the schema for updates there is often business logic around the updates and bypassing Blackboard Learn code to update the database can have unexpected side effects.
  • Slide 17
  • Hibernate in Building Blocks USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Hibernate uses a standard Java DataSource to access the Blackboard Learn schema BbDatabaseDataSource This method will allow connections to participate in the same transactions as the rest of the Blackboard Learn system since they are from the same connection pool.
  • Slide 18
  • Hibernate in Building Blocks USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Demo
  • Slide 19
  • Hibernate in Building Blocks USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Custom schemas can now be created with Blackboard Building Blocks Embed schema.xml files Framework will create the schema objects Hibernate can handle the persistence for you.
  • Slide 20
  • Spring/Hibernate in Building Blocks USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Lets tie it all together Spring IoC connects to the API. Spring MVC creates your endpoint. Hibernate accesses your data.
  • Slide 21
  • Spring/Hibernate in Building Blocks USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS Demo
  • Slide 22
  • Questions? USING THIRD-PARTY FRAMEWORKS IN BUILDING BLOCKS