SlideShare uma empresa Scribd logo
1 de 18
Ge#ng
started

with
Sakai
development
               Steve
Swinsburg
  Senior
So8ware
Engineer
/
Sakai
Fellow
2009
       The
Australian
NaBonal
University
               September
2010
Development
environment
                                                What
are
Sakai
tools?
                                                     The
Kernel
                                                Dependency
injecBon



                                                  Overview


4th
Australian
Sakai
Conference
‐
September
15‐17,
2010                 2
Development
environment
• Requirements:
  • Java
1.6
  • Maven
2.2.1
  • Tomcat
5.5.30
• Sakai
Programmer’s
Cafe
  • Includes
manual
and
code
samples
  • h_p://bit.ly/sakai‐programmers‐cafe
• Sakai
app
builder
  • Eclipse
plugin
      4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   3
What
are
Sakai
tools?


•   A
collecBon
of
webapps
•   Shared
API’s
•   Linked
implementaBons
•   Glued
together
(via
Spring)



        4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   4
Sakai
tools
(the
webapp)
• Just
a
normal
webapp
with
a
bit
of
‘glue
in

  web.xml

• The
webapp
servlet
  • Standard
Tomcat
setup,
registers
the
app
  
   <servlet>
          <servlet-name>sakai.myapp</servlet-name>
          <servlet-class>
              org.sakaiproject.myapp.tool.MyAppServlet
          </servlet-class>
      </servlet>



       4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   5
Sakai
tools
(the
webapp)
• The
request
filter

  • Maintains
the
session
   <filter>
       <filter-name>sakai.request</filter-name>
       <filter-class>
            org.sakaiproject.util.RequestFilter
       </filter-class>
       <!-- can configure this with init-params -->
   </filter>
   <filter-mapping>
       <filter-name>sakai.request</filter-name>
       <servlet-name>sakai.myapp</servlet-name>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
   </filter-mapping>

       4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   6
Sakai
tools
(the
webapp)
• A
tool
listener:
<listener>
    <listener-class>
        org.sakaiproject.util.ToolListener
    </listener-class>
</listener>


• OpBonal
Sakai/Spring
listener:




<listener>
    <listener-class>
        org.sakaiproject.util.ContextLoaderListener
    </listener-class>
</listener>



       4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   7
Sakai
tools
(the
webapp)
• The
tool
registraBon:
  • Special
convenBon
/
locaBon
  • Must
have
unique
id’s
that
match
  • WEBAPP/tools/sakai.myapp.xml
  <?xml version="1.0"?>
  <registration>
      <tool id="sakai.myapp"
          title="My Great Application"
          description="This is my new great application">
          <category name="myworkspace" />
          <configuration name="functions.require" />
      </tool>
  </registration>



       4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   8
Sakai
tools
(the
webapp)
• Many
different
frameworks
  • Wicket,
RSF,
JSP,
Servlets,
even
HTML/JS
  • Some
have
their
own
web.xml
setup


• Portal
wrapper
and
your
markup
to
give
a

  consistent
look
and
feel

• JSR‐168
portlet
support

      4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   9
The
rest
of
Sakai




4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   10
The
rest
of
Sakai




4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   11
The Component Manager
• Webapps
normally
run
in
isolaBon
• To
allow
communicaBon,
service
is
separated
from

  the
webapp.
• ComponentManager
loads
the

  ‘components’
(services)
and
makes
them
available

  to
the
webapps,
thus
allowing
communicaBon.




      4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   12
The Kernel
• Previously
were
inside
tools
themselves
• Split
out
the
core
services
into
a
‘kernel’
  • UserDirectoryService
  • SiteService
  • ToolService
  • SecurityService
  • EmailService
  • EventTrackingService
  • ContentHosBngService
       4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   13
Dependency
injecBon
• Via
Spring
(preferred):
  • Service wiring in TOMCAT/components/
    myapp-pack/WEB-INF/components.xml
  • setters (getters) in the impl class

 <bean id="org.sakaiproject.myapp.logic.SakaiProxy"
    class="org.sakaiproject.myapp.logic.SakaiProxyImpl”
    init-method="init">
       <property name="securityService"
       ref="org.sakaiproject.authz.api.SecurityService" />
       <property name="userDirectoryService"
       ref="org.sakaiproject.user.api.UserDirectoryService" />
 </bean>



        4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   14
Dependency
injecBon
• Via
the
ComponentManager
staBc
cover
• No
Spring
wiring
needed
• Useful
upgrade
for
legacy
code
   • Directly
in
class,
in
init/constructor
private UserDirectoryService uds;

ComponentManager manager =
org.sakaiproject.component.cover.ComponentManager.getInstance();

uds =
(UserDirectoryService)manager.get(UserDirectoryService.class);



        4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   15
Dependency
injecBon
• Via
the
staBc
covers
• StaBc
methods
around
API
methods
that
delegate

  to
actual
API
method
• Deprecated!
Don’t
use
them!


                                        no code sample!




      4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   16
Dependency
injecBon
• For
a
simple
webapp
with
no
service
API,
inject

  directly
into
the
webapp
via
Spring
  • e.g.
servlets

    TOMCAT/webapps/myapp-tool/WEB-INF/
    applicationContext.xml




       4th
Australian
Sakai
Conference
‐
September
15‐17,
2010   17
Questions?



Development
environment
walkthrough,
Eclipse
plugin,
best
pracBces,

HOWTOs
and
code
samples
all
available
on
Confluence



                  h,p://bit.ly/sakai‐programmers‐cafe




  4th
Australian
Sakai
Conference
‐
September
15‐17,
2010              18

Mais conteúdo relacionado

Semelhante a Getting started with Sakai development

Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy
WSO2
 
Commercial Development And Sakai
Commercial Development And SakaiCommercial Development And Sakai
Commercial Development And Sakai
mbanting
 
Resume_2016Aug
Resume_2016AugResume_2016Aug
Resume_2016Aug
I-Fan Chu
 

Semelhante a Getting started with Sakai development (20)

Sakai Overview 06-2004
Sakai Overview 06-2004Sakai Overview 06-2004
Sakai Overview 06-2004
 
Masakari project onboarding
Masakari project onboardingMasakari project onboarding
Masakari project onboarding
 
Building Enterprise Apps with Sencha & DeftJS
Building Enterprise Apps with Sencha & DeftJSBuilding Enterprise Apps with Sencha & DeftJS
Building Enterprise Apps with Sencha & DeftJS
 
React or Angular and SharePoint Framework Development
React or Angular and SharePoint Framework DevelopmentReact or Angular and SharePoint Framework Development
React or Angular and SharePoint Framework Development
 
SOA/SCA FraScAti
SOA/SCA FraScAtiSOA/SCA FraScAti
SOA/SCA FraScAti
 
Storlets Project Update for Train
Storlets Project Update for TrainStorlets Project Update for Train
Storlets Project Update for Train
 
Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy
 
Commercial Development And Sakai
Commercial Development And SakaiCommercial Development And Sakai
Commercial Development And Sakai
 
Apidays Paris 2023 - OpenAPI 3.1 and Spring-Boot 3 - What's New?, Badr Nass L...
Apidays Paris 2023 - OpenAPI 3.1 and Spring-Boot 3 - What's New?, Badr Nass L...Apidays Paris 2023 - OpenAPI 3.1 and Spring-Boot 3 - What's New?, Badr Nass L...
Apidays Paris 2023 - OpenAPI 3.1 and Spring-Boot 3 - What's New?, Badr Nass L...
 
Java Community and Overview Track - March 2016
Java Community and Overview Track - March 2016Java Community and Overview Track - March 2016
Java Community and Overview Track - March 2016
 
JCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptxJCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptx
 
Jakarta EE: Today and Tomorrow
Jakarta EE: Today and TomorrowJakarta EE: Today and Tomorrow
Jakarta EE: Today and Tomorrow
 
BEST REST in OpenStack
BEST REST in OpenStackBEST REST in OpenStack
BEST REST in OpenStack
 
OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17
 
VAST 8.0
VAST 8.0VAST 8.0
VAST 8.0
 
Media Mosa : Architecture and Features, Utrecht, 10 June 2010
Media Mosa : Architecture and Features, Utrecht,  10 June 2010Media Mosa : Architecture and Features, Utrecht,  10 June 2010
Media Mosa : Architecture and Features, Utrecht, 10 June 2010
 
Cisco ONE Enterprise Cloud (UCSD) Hands-on Lab
Cisco ONE Enterprise Cloud (UCSD) Hands-on LabCisco ONE Enterprise Cloud (UCSD) Hands-on Lab
Cisco ONE Enterprise Cloud (UCSD) Hands-on Lab
 
Resume_2016Aug
Resume_2016AugResume_2016Aug
Resume_2016Aug
 
Lightweight Java in the Cloud
Lightweight Java in the CloudLightweight Java in the Cloud
Lightweight Java in the Cloud
 
MediaMosa architecture & features
MediaMosa architecture & features MediaMosa architecture & features
MediaMosa architecture & features
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Getting started with Sakai development

Notas do Editor