Upload
alfresco-software
View
4.031
Download
6
Embed Size (px)
DESCRIPTION
This session will introduce Spring/Alfresco development tools such as WebScript editor, WebScript Documentation plugin, FreeMarker editor, JavaScript editor, Surf Roo addon and Surf Spring template projects. We'll demonstrate how to use these tools to create, build, deploy and test Surf or Webscript-based projects. We'll also have a discussion on the future of Alfresco development tools and the SDK.
Citation preview
1
Spring Surf Developer Tools
Dave DraperUI Engineer, Alfresco
Twitter: @_DaveDraper
2
First, Some Background Information...
3
Spring Surf Overview
• Rapid web-tier view composition – Spring MVC View Resolver
• FreeMarker, Groovy, PHP, JSP pages• WebScript, FTL, Groovy, PHP or JSP components
• Simple JavaScript, Groovy controllers• Remote API – REST processing• Portlets• WebScripts – standalone REST API tier
4
Overview
•The Development Tools are:• A Set of Eclipse Plug-ins• Part of Spring Surf Project• Intended for use with SpringSource Tool Suite
• Use Spring Web Script Runtime APIs• Spring/Maven Driven
5
Components
• Web Script Runtime Plug-in (available from Spring Surf Update Site)
• Web Script Description XML Wizard/Editor• Web Script Package Description XML Wizard/Editor• Web Script Schema Description XML Wizard/Editor
• JavaScript editor extension• FreeMarker editor extension• Spring Web Script/Surf Code Snippets• Spring Surf Template Project• Spring Surf Roo Add-on
6
Spring Surf Plug-in
7
Pre-requisites
• Download and install SpringSource Tool Suite
• Custom Eclipse implementation for aimed at Spring developers
• Includes WTP• Embeds TC server
• Install JBoss FreeMarker Editor
8
Download SpringSource Tool Suite
9
Add JBoss Update Site
10
Add FreeMarker IDE Plug-in
11
Add SpringSurf update site
12
Add SpringSurf plug-in
13
Web Script Runtime Plug-in
• Declares dependencies on the other Spring Surf Development Tool Plug-ins
• Provide Required Libraries and Spring Application Context XML
• Custom Editors Use Same Runtime APIs
14
Web Script Description XML Wizard/Editor
• Create/Edit Web Script Description XML• Links for Creating/Editing
• View Templates• Controller Template • Configuration File• Message Properties etc.
• Real-time Validation• Option for Controlling Local Web Script Loading
• Multiple Editor Options• Custom Visual Editor • Schema Based Tree Editor• Source Editor
15
Web Script Package XML Wizard/Editor
• Create/Edit Web Script Package Description XML
• Group Web Scripts into Java Style Packages• For Documentation Only
• Spring Surf Documentation Maven Plug-in
• Real-time Validation• Multiple Editor Options
• Custom Visual Editor • Schema Based Tree Editor• Source Editor
16
Web Script Schema XML Wizard/Editor
• Create/Edit Web Script Schema XML• Provide Format Definitions and Samples for
• Request Messages• Response Messages• Request Parameters
• For Documentation Only• Spring Surf Documentation Maven Plug-in
• Real-time Validation• Multiple Editor Options
• Custom Visual Editor • Schema Based Tree Editor• Source Editor
17
JavaScript Editor Extension
• Extension of Web Tools Platform (WTP) JavaScript Development Tools (JSDT) Plug-in
• Provides Code Completion for Spring Surf functions/properties
• Provide JSDoc for Spring Surf JavaScript Library
• Generated by Spring Surf Documentation Plug-in• Use Custom Java Annotations for Code Samples and Documentation
18
Adding Spring Surf JavaScript Library
19
Code Snippets
• Extension of Eclipse/WTP Code Snippet View• Spring Surf Code Snippets
• Generated by Spring Surf Documentation Maven Plug-in
• Developers Provide Code Snippets using Custom Java Annotations
20
FreeMarker Editor Extension
• Based on JBoss FreeMarker IDE• Custom Code Completion Assistant
• Context Parameters from Web Script Runtime APIs• Root Objects, Object Methods and Method Parameters• Custom Java Annotations
21
Spring Surf Template Project
22
Download SpringSurf Plug-in
23
Spring Surf Template Project
• Generate Sample Project for Spring Surf• Come with Sample Pages, Templates, Modules etc.• Use Jetty Plug-in for Testing
• SVN location: spring-surf-devtools\spring-surf-eclipse-extensions\spring-surf-sts-templates
• Extends com.springsource.sts.core.resources defining a URL from which to download the Spring Surf template.
24
Spring Roo Add-On
25
What is Spring Roo?
• Command line tool aimed at developers creating enterprise applications based on Spring Framework
• Uses AspectJ ITD to assist development without affecting primary Java files edited by the user
• Code completion to save typing• Context sensitive commands• Developer guidance through “hint” command• Monitors file changes and updates Aspects accordingly
26
Install SpringSurf Roo Add-on
27
Spring Surf Roo Add-on
• Add Spring Surf to a New or Existing Spring Project
• Easy to Develop, Test and Deploy• Manage All Assets of Spring Surf Project
• Pages• Templates• Components• Add-ons etc.
28
Demo and Q&A