28
Spring Surf Developer Tools 1 Dave Draper UI Engineer, Alfresco Twitter: @_DaveDraper

Spring Surf Development Tools

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

Page 1: Spring Surf Development Tools

1

Spring Surf Developer Tools

Dave DraperUI Engineer, Alfresco

Twitter: @_DaveDraper

Page 2: Spring Surf Development Tools

2

First, Some Background Information...

Page 3: Spring Surf Development Tools

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

Page 4: Spring Surf Development Tools

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

Page 5: Spring Surf Development Tools

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

Page 6: Spring Surf Development Tools

6

Spring Surf Plug-in

Page 7: Spring Surf Development Tools

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

Page 8: Spring Surf Development Tools

8

Download SpringSource Tool Suite

Page 9: Spring Surf Development Tools

9

Add JBoss Update Site

Page 10: Spring Surf Development Tools

10

Add FreeMarker IDE Plug-in

Page 11: Spring Surf Development Tools

11

Add SpringSurf update site

Page 12: Spring Surf Development Tools

12

Add SpringSurf plug-in

Page 13: Spring Surf Development Tools

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

Page 14: Spring Surf Development Tools

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

Page 15: Spring Surf Development Tools

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

Page 16: Spring Surf Development Tools

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

Page 17: Spring Surf Development Tools

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

Page 18: Spring Surf Development Tools

18

Adding Spring Surf JavaScript Library

Page 19: Spring Surf Development Tools

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

Page 20: Spring Surf Development Tools

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

Page 21: Spring Surf Development Tools

21

Spring Surf Template Project

Page 22: Spring Surf Development Tools

22

Download SpringSurf Plug-in

Page 23: Spring Surf Development Tools

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.

Page 24: Spring Surf Development Tools

24

Spring Roo Add-On

Page 25: Spring Surf Development Tools

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

Page 26: Spring Surf Development Tools

26

Install SpringSurf Roo Add-on

Page 27: Spring Surf Development Tools

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.

Page 28: Spring Surf Development Tools

28

Demo and Q&A