Transitioning from Groovy to Spruce

Groovy is a dynamic language with static-typing and static compilation capabilities, for the Java platform. It integrates smoothly with any Java program and immediately delivers to your application powerful features, including scripting capabilities, Domain-Specific Language authoring, runtime and compile-time meta-programming and functional programming. Transitioning to Spruce, a TypeScript-based framework, from a Groovy and potentially Grails background involves adapting to a new ecosystem centered around JavaScript and TypeScript for full-stack web development.

Key Differences between Groovy and Spruce Development

GroovySpruce
Programming LanguageGroovyTypeScript
IDEIntelliJ IDEA, EclipseVisual Studio Code
App LifecycleControlled by frameworks like GrailsNo Equivalent
UI DesignN/A for CLI; Grails for web viewsHeartwood, ViewControllers
Event HandlingEvent listeners in frameworksMercury
Data PersistenceGORM in GrailsData Stores
Error HandlingTry-Catch BlocksTry-Catch Blocks, SpruceErrors
TestingSpock, JUnitTDD by the 3 laws
User AuthenticationSpring Security (with Grails)Mercury, Authenticator
User PermissionsSpring Security ACL (with Grails)Mercury, Authorizor

Programming Language

Groovy

Coming soon...

Spruce

import {
 AbstractSkillViewController,
 CardViewController,
 ViewControllerOptions,
 buildSkillViewLayout,
 SkillView
} from '@sprucelabs/heartwood-view-controllers'

export default class RootSkillViewController extends AbstractSkillViewController {
 public static id = 'root'
 protected cardVc: CardViewController

 public constructor(options: ViewControllerOptions) {
  super(options)
  this.cardVc = this.Controller('card', {
   header: {
    title: 'Hello, World!',
   }
  })
 }

 public render(): SkillView {
  return buildSkillViewLayout('grid', {
   cards: [this.cardVc.render()]
  })
 }
}

IDE

Coming soon...

App Lifecycle

Coming soon...

UI Design

Coming soon...

Event Handling

Coming soon...

Data Persistence

Coming soon...

Error Handling

Coming soon...

Testing

Coming soon...

User Authentication

Coming soon...

User Permissions

Coming soon...

Something Missing?

Request Documentation Enhancement

Now What?

Install the Development Theatre
It looks like you are using Internet Explorer. While the basic content is available, this is no longer a supported browser by the manufacturer, and no attention is being given to having IE work well here.