Skip to content

Commit

Permalink
minor: from scratch documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidg3 committed May 20, 2024
1 parent ce89112 commit 47e2e2e
Show file tree
Hide file tree
Showing 12 changed files with 466 additions and 353 deletions.
57 changes: 28 additions & 29 deletions src/pages/getting-started/frameworks/android.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: Transitioning from Android to Spruce
---
# Transitioning from Android to Spruce

Android development typically involves Java or Kotlin, while Spruce is a TypeScript-based platform.
Android development typically involves Java or Kotlin, while Spruce is a TypeScript-based platform.

While Android focuses on front-end and does support directly implementing some backend type functionality, most times an Android app is communicating with a remote API to do it's work. Spruce, on the other hand, is a "full-stack platform" that allows for both beautiful UI's and robust back-ends.

Expand Down Expand Up @@ -54,40 +52,41 @@ struct ContentView: View {
ContentView()
}
```

#### Spruce

```typescript
import {
AbstractSkillViewController,
CardViewController,
ViewControllerOptions,
buildSkillViewLayout,
SkillView
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()]
})
}
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
### IDE

```
placeholder
Expand Down Expand Up @@ -129,7 +128,7 @@ placeholder
```

### Testing
### Testing

```
placeholder
Expand All @@ -148,4 +147,4 @@ placeholder
```
placeholder
```
```
55 changes: 27 additions & 28 deletions src/pages/getting-started/frameworks/django.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: Transitioning from Django to Spruce
---
# Transitioning from Django to Spruce

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Spruce is a TypeScript-based framework that offers full-stack development capabilities. This guide will help Django developers understand how to transition their skills to work with Spruce.

Expand Down Expand Up @@ -50,40 +48,41 @@ struct ContentView: View {
ContentView()
}
```

#### Spruce

```typescript
import {
AbstractSkillViewController,
CardViewController,
ViewControllerOptions,
buildSkillViewLayout,
SkillView
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()]
})
}
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
### IDE

```
placeholder
Expand Down Expand Up @@ -125,7 +124,7 @@ placeholder
```

### Testing
### Testing

```
placeholder
Expand All @@ -144,4 +143,4 @@ placeholder
```
placeholder
```
```
55 changes: 27 additions & 28 deletions src/pages/getting-started/frameworks/flask.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: Transitioning from Flask to Spruce
---
# Transitioning from Flask to Spruce

Flask is a Python web framework that provides the tools necessary for building simple web applications quickly. On the other hand, Spruce is a TypeScript-based full-stack framework designed to create scalable web applications with a focus on modern web development practices. This guide will help Flask developers understand how to transition to Spruce.

Expand Down Expand Up @@ -50,40 +48,41 @@ struct ContentView: View {
ContentView()
}
```

#### Spruce

```typescript
import {
AbstractSkillViewController,
CardViewController,
ViewControllerOptions,
buildSkillViewLayout,
SkillView
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()]
})
}
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
### IDE

```
placeholder
Expand Down Expand Up @@ -125,7 +124,7 @@ placeholder
```

### Testing
### Testing

```
placeholder
Expand All @@ -144,4 +143,4 @@ placeholder
```
placeholder
```
```
56 changes: 27 additions & 29 deletions src/pages/getting-started/frameworks/groovy.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: Transitioning from Groovy to Spruce
---
# 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.

Expand All @@ -19,7 +17,6 @@ Groovy is a dynamic language with static-typing and static compilation capabilit
| **User Authentication** | Spring Security (with Grails) | Mercury, Authenticator |
| **User Permissions** | Spring Security ACL (with Grails) | Mercury, Authorizor |


### Programming Language

#### iOS
Expand Down Expand Up @@ -51,40 +48,41 @@ struct ContentView: View {
ContentView()
}
```

#### Spruce

```typescript
import {
AbstractSkillViewController,
CardViewController,
ViewControllerOptions,
buildSkillViewLayout,
SkillView
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()]
})
}
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
### IDE

```
placeholder
Expand Down Expand Up @@ -126,7 +124,7 @@ placeholder
```

### Testing
### Testing

```
placeholder
Expand All @@ -145,4 +143,4 @@ placeholder
```
placeholder
```
```
Loading

0 comments on commit 47e2e2e

Please sign in to comment.