Sakai

   ,
   -    ,   1-2   , 2008




                  Sakai            构


                         Xingtang Hu(Hu2@i...
,
            ,
2006                /
2006
2002
2001

Lance Speelmon,
Oncourse      Sakai     构   ,

Michael Korcuska,
Sak...
• Sakai
• Sakai   构
  – Tomcat                   (classloader)
  – Spring                      (components
    manager)
• ...
Sakai
•
•    ,   ,
•
•
•            Java
•
Sakai
•              AuthzGroupService
•          SiteService
•            ToolManager
•          SessionManager
•          Cont...
Sakai
•
    –                       UserDirectoryProvider – map your local user information
        (eg in LDAP, IMS Enter...
Sakai
• Sakai           J2EE (Servlet)
  (container)
  – Tomcat, WebSphere, WebLogic
• Sakai     (tool)                   ...
,
•       Tools(web)
    –                          (persistence)
    –                              presentation (GUI)
• ...
Sakai
•                  构
                                            Presentation Services (SAF)

     TOOLS
•
•        ...
Sakai                                 构
                                           Shared



         Model               ...
构
构 3-tier architecture      External


 Presentation              User




Business Logic          Other Apps




 Data A...
Presentation Layer
3-tier architecture    •
                       •            (GUI)
  Presentation
                     ...
Logic Layer
3-tier architecture   •                

  Presentation        •
                      •
                     ...
Data Access Layer
3-tier architecture     •

  Presentation          •

                        •
 Business Logic         ...
关
3-tier architecture   •       ,
                          减
  Presentation        •


 Business Logic




  Data Access
Sakai
    Component Manager
•   Spring      bean
        Sakai    ,

•
•      Sakai
Sakai
Component Manager
Tomcat                        (Container)
         Tomcat – The Server
                    Services
                      ...
Tomcat (J2EE)




•                  Java ClassLoaders
•   Servlet   (container)
•   Web            (ClassLoaders)
    ,
Sakai                               (ClassLoaders)

                                             APIs up here
            ...
Sakai                (Tools)
•   Sakai        (Tools)                 Servlet
    –                               RSF, JSF...
Spring         (beans)

• Spring                            (
        (Dependency Injection)/
    IoC     )
•       Java
 ...
Springy


•                web.xml
             (ContextLoaderListener)
•                    (bean definitions)
•         ...
Sakai                    开
• Sakai        (component)
  –                       (API module)
      •            Java      ...
Sakai              (Services)
• Sakai     (services)            Spring
  (context)            Spring beans
• 每 Sakai      ...
Spring                   Sakai                 (Services)
•   Sakai          (APIs) Java        (interfaces)
•   每 Sakai  ...
ComponentManager
    mgr.get(“org.sakaiproject.site.api.SiteService”);




•      Spring
     (ApplicationContext)

•     ...
Sakai                                     构
• 4
   –                    Api (interfaces)
       •            Logic - busin...
构




URL: http://issues.sakaiproject.org/confluence/x/BGo
Sakai                                     构
•             org.sakaiproject - base package prefix
     – You could also use...
构




URL: http://issues.sakaiproject.org/confluence/x/BGo
Sakai Java

      :
•                        ( event service)
•         ActiveMQ   构
2




                                           1




m_eventTrackingService = (EventTrackingService)    3
ComponentManag...
Sakai




Sakai
Sakai              Java   (Applications)




           Sakai
                   关




           Sakai                  启...
http://java.sun.com/products/jsp/


JSF    http://java.sun.com/javaee/javaserverfaces/


       http://www2.caret.cam.ac.u...
Java Server Pages
•    开
•      启    ,
•   Sakai           运
•               ,
•
JSF
              Java Server Faces
•             Java                                 APIs
        (managing state),     ...
JSF
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %...
Reasonable Server Faces
•     Spring                (web
  programming framework)
•       XHTML       ,    UI
  Code 离
•  ...
<html>
<head><title>RSF sample</title></head>
<body>
   <h1>Hello <span rsf:id=“user-name”>User Name</span></h1>
   Today ...
Oncourse CL                                                                                  ,迁
           Su/Fall 04     ...
Oncourse CL          构




            (IUB):
         (IUPUI):
Sakai
 •
                                           WEB             SYS
INSTITUTION             USERS SITES        SERVE  ...
Sakai

•
•      COMMUNITY PROCESSES —             Sakai    contact Mark Norton, Sakai
    Community Process WG Chair (mark...
?




http://sakaiproject.org/
Sakai

   ,
   -    ,   1-2   , 2008




                                      !

                                   (hu2@...
Sakai Technical
Sakai Technical
Upcoming SlideShare
Loading in...5
×

Sakai Technical

1,234

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,234
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Sakai Technical

  1. 1. Sakai , - , 1-2 , 2008 Sakai 构 Xingtang Hu(Hu2@iupui.edu) Lance Speelmon(lance@indiana.edu) Michael Korcuska(mkorcuska@gmail.com) / SAKAI 1 21 , 2008
  2. 2. , , 2006 / 2006 2002 2001 Lance Speelmon, Oncourse Sakai 构 , Michael Korcuska, Sakai 运
  3. 3. • Sakai • Sakai 构 – Tomcat (classloader) – Spring (components manager) • Sakai 开 – (Tools and services) – (WebApp structure) • Sakai
  4. 4. Sakai • • , , • • • Java •
  5. 5. Sakai
  6. 6. • AuthzGroupService • SiteService • ToolManager • SessionManager • ContentHostingService • CourseManagementService
  7. 7. Sakai • – UserDirectoryProvider – map your local user information (eg in LDAP, IMS Enterprise, Kerberos) into Sakai – GroupProvider – CourseManagementProvider – PortalHandler (new in Sakai 2.4) – register new top-level handlers in the Sakai portal URL space – EntityProducer – export primary entities handled by your service as 1st-class Sakai “Entities” (resolvable by URLs, addressible by Events, searchable) • Sakai
  8. 8. Sakai • Sakai J2EE (Servlet) (container) – Tomcat, WebSphere, WebLogic • Sakai (tool) , Servlet • Sakai (component) Sakai API , Spring Beans
  9. 9. , • Tools(web) – (persistence) – presentation (GUI) • Services / Components(API/Impl) – Must provide documented API – presentation (not aware of HTML at all) – , (not data models) • Framework(Tomcat) – tools and service – common capabilities – domain objects
  10. 10. Sakai • 构 Presentation Services (SAF) TOOLS • • 离 Abstract Tool Layout • SERVICES Tool Code (Java) • • • (APIs) FRAMEWORK • Application Services • • Common Services (SAF) Kernel (SAF)
  11. 11. Sakai 构 Shared Model Logic-api Public-api (business logic) (service) Components Dao-api (data access) Logic-impl (business logic) Webapps Dao-impl Tool (data access) (presentation) URL: http://issues.sakaiproject.org/confluence/x/BGo
  12. 12. 构 构 3-tier architecture External Presentation User Business Logic Other Apps Data Access Database
  13. 13. Presentation Layer 3-tier architecture • • (GUI) Presentation (client view) • Business Logic business logic data access Data Access
  14. 14. Logic Layer 3-tier architecture • Presentation • • (presentation) Business Logic (data access) Data Access
  15. 15. Data Access Layer 3-tier architecture • Presentation • • Business Logic (presentation ) (business logic) Data Access
  16. 16. 关 3-tier architecture • , 减 Presentation • Business Logic Data Access
  17. 17. Sakai Component Manager • Spring bean Sakai , • • Sakai
  18. 18. Sakai Component Manager
  19. 19. Tomcat (Container) Tomcat – The Server Services Engine (Catalina) Hosts Realm AJP Connector Valves Context 8009 SSL Connector Valves JSPs Servlets 8443 HTTP Connector Valves 8080
  20. 20. Tomcat (J2EE) • Java ClassLoaders • Servlet (container) • Web (ClassLoaders) ,
  21. 21. Sakai (ClassLoaders) APIs up here Components in here Tools in here Component1 Component2 • Sakai J2EE ClassLoader layout • Sakai (webapps) Servlets – URLClassLoader – • – components.xml (Spring file), web web.xml – , Servlet (dispatches)
  22. 22. Sakai (Tools) • Sakai (Tools) Servlet – RSF, JSF Velocity – web (web.xml) file (tools/ toolname.xml) • App Builder (Plugin) – (applicationContext.xml) Spring (context) , Sakai (services) Spring – Spring (JARs ) 份, (Web application)
  23. 23. Spring (beans) • Spring ( (Dependency Injection)/ IoC ) • Java (getters ) (setters) • Spring ( init() )
  24. 24. Springy • web.xml (ContextLoaderListener) • (bean definitions) • Sakai (services)
  25. 25. Sakai 开 • Sakai (component) – (API module) • Java (interface definitions) (constants) • JAR (shared area) – (Impl module) • (API interfaces ) • Spring (components.xml ) Spring (context) • WAR (components area)
  26. 26. Sakai (Services) • Sakai (services) Spring (context) Spring beans • 每 Sakai (component) Spring components.xml • Sakai 启 , .
  27. 27. Spring Sakai (Services) • Sakai (APIs) Java (interfaces) • 每 Sakai (APIs) • Sakai Spring (components.xml) Spring bean • : Spring Sakai (UserDirectoryService) <bean id="org.sakaiproject.user.api.UserDirectoryService“ class="org.sakaiproject.user.impl.DbUserService" init-method=“init” destroy-method="destroy" singleton="true"> ...... <property name="autoDdl“ value=“${auto.ddl}”/> <property name="cacheMinutes“ value=“5”/> </bean>
  28. 28. ComponentManager mgr.get(“org.sakaiproject.site.api.SiteService”); • Spring (ApplicationContext) • id Class
  29. 29. Sakai 构 • 4 – Api (interfaces) • Logic - business logic and dao apis • Model - POJOs (value/data objects) • Public - Service API (if you have one) • Hbm - Hibernate HBM files – Impl (implementations) • Dao - data access implementation • Logic - business logic implementation • Tests - programmatic tests (unit/integration) – Pack (component definitions) • Spring (Sakai components.xml) – Tool (webapp) • Java src/java - java classes used by your tool only • 关 src/webapp - xml, jsp, html, other meta files URL: http://issues.sakaiproject.org/confluence/x/BGo
  30. 30. 构 URL: http://issues.sakaiproject.org/confluence/x/BGo
  31. 31. Sakai 构 • org.sakaiproject - base package prefix – You could also use your local prefix (e.g. uk.ac.cam.caret) • org.sakaiproject.app-name • Use something unique for app-name, long is good – dao - data access – hbm – hibernate mapping files – Logic – business logic – Model – value/data objects – Service – public api – Tool – webapp • Add impl to represent implementations URL: http://issues.sakaiproject.org/confluence/x/BGo
  32. 32. 构 URL: http://issues.sakaiproject.org/confluence/x/BGo
  33. 33. Sakai Java : • ( event service) • ActiveMQ 构
  34. 34. 2 1 m_eventTrackingService = (EventTrackingService) 3 ComponentManager.get("org.sakaiproject.event.api.EventTracking Service");
  35. 35. Sakai Sakai
  36. 36. Sakai Java (Applications) Sakai 关 Sakai 启 Sakai 启
  37. 37. http://java.sun.com/products/jsp/ JSF http://java.sun.com/javaee/javaserverfaces/ http://www2.caret.cam.ac.uk/rsfwiki/ http://java.sun.com/products/servlet/ http://jakarta.apache.org/velocity/ AJAX http://en.wikipedia.org/wiki/AJAX
  38. 38. Java Server Pages • 开 • 启 , • Sakai 运 • , •
  39. 39. JSF Java Server Faces • Java APIs (managing state), (handling events), (defining navigation) • JSP 渲 – JSPs 渲 • (tag libraries) • , URL: http://java.sun.com/javaee/javaserverfaces/
  40. 40. JSF <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <html> <head><title>JSF sample</title></head> <body> <f:view> <h1><h:outputText value=“Hello #{user.name}"/></h1> <h:dataTable id=“items" value="#{itemsBean.items}" var=“item"> <h:column> <h:outputText value="#{item.value}" /> </h:column> </h:dataTable> </f:view> </body> </html>
  41. 41. Reasonable Server Faces • Spring (web programming framework) • XHTML , UI Code 离 • Lightweight • AJAX Javascript URL: http://jakarta.apache.org/velocity/
  42. 42. <html> <head><title>RSF sample</title></head> <body> <h1>Hello <span rsf:id=“user-name”>User Name</span></h1> Today is <span rsf:id=“current-date”>1/1/2006</span><br/> <table> <tr rsf:id=“items:”> <td rsf:id=“item-value”>item value here</td> </tr> </table> </body> </html>
  43. 43. Oncourse CL ,迁 Su/Fall 04 Spring 05 Su/Fall 05 Spring 06 Su/Fall 06 We Are Here – December 2005 Oncourse 2 Fall ’05 by Web form request only Pilot Period – Limited Release CL 1.5 CL 2.0 CL 2.1 CL 2.x Sakai 开 构 Indiana, Michigan, Stanford Oncourse CL and MIT 05 Oncourse CL
  44. 44. Oncourse CL 构 (IUB): (IUPUI):
  45. 45. Sakai • WEB SYS INSTITUTION USERS SITES SERVE INTEGRATION RS Indiana* 121,468 53,979 16 PeopleSoft UNISA 92,000 4 Novell, ActiveDirectory Michigan 67,281 17,453 8 UMIAC, Kerebos Yale 14,569 4 Banner, CAS Fernando Pessoa 5,250 2,000 UCT 4,040 48 2 PeopleSoft, Novell Nsure Etudes Alliance** 2,560 79 UC, Merced 1,230 305 1 Banner, uPortal Totals 308,398 73,864 34 *Indiana University: 2006 , 108,190 Oncourse CL . **Etudes Alliance : 200 , 450 (07 02 ). Sakai (Oncourse)
  46. 46. Sakai • • COMMUNITY PROCESSES — Sakai contact Mark Norton, Sakai Community Process WG Chair (markjnorton@earthlink.net). • 开 DEVELOPMENT — 开 join Sakai-Dev DG; review existing projects, requirements, feature requests or contribute new tools and/or services; contact Peter Knoop, Project Coordinator (knoop@umich.edu), or Anthony Whyte, Sakai Technical Liaison (arwhyte@umich.edu). • INFRASTRUCTURE — QA servers, JIRA/Confluence hosting, contact Peter Knoop. • QA — join QA Work Group, contact Megan May, QA Coordinator (mmmay@indiana.edu). • REQUIREMENTS & USE CASE DEVELOPMENT — join the Requirements WG; contact Mara Hancock, REQ WG chair (mara@media.berkeley.edu).
  47. 47. ? http://sakaiproject.org/
  48. 48. Sakai , - , 1-2 , 2008 ! (hu2@iupui.edu) Sakai/Oncourse http://www.sakaiproject.org/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×