Skip to content

Commit

Permalink
patch: fix navigation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
TalhaFaisalglor committed Mar 26, 2024
1 parent a28472b commit 6852dd1
Show file tree
Hide file tree
Showing 14 changed files with 170 additions and 149 deletions.
9 changes: 7 additions & 2 deletions src/pages/_includes/widgets/navigation.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
<nav id="main-nav">
<ul class="nav-top-level">
<li id="mobile-search">
<a href="{{ '/search' | url }}" title="Search the site">{{ mdiSearch() }}</a>
</li>
<a href="{{ '/search/' | url }}" title="Search the site">{{ mdiSearch() }}</a>
<a href="{{ '/getting-started/' | url }}" class="btn-text">Getting Started</a>
<a href="{{ '/ideology/' | url }}" class="btn-text">Ideology</a>
<a href="{{ '/concepts/' | url }}" class="btn-text">Concepts</a>
<a href="{{ '/dev-onboarding/' | url }}" class="btn-text">Developer Onboarding</a>
<a href="{{ '/resources/' | url }}" class="btn-text">Resources</a>
</li>
{% for topLink in mainNavData.links %}
{% set isCurrentParent = topLink.url == activeParent.url %}
{% if isCurrentParent %}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/getting-started/frameworks/android.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Android
title: Transitioning from Android to Spruce
---
<style>
#language-selector {
Expand Down
28 changes: 13 additions & 15 deletions src/pages/getting-started/frameworks/django.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Django
title: Transitioning from Django to Spruce
---
<style>
#language-selector {
Expand Down Expand Up @@ -55,24 +55,22 @@ tr:nth-child(even) {
}
</style>

# 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.

## Key Differences between Django and Spruce Development

| Development Aspect | Django | Spruce |
|---------------------------|--------------------------|--------------------------|
| **Programming Language** | Python | TypeScript |
| **Framework** | Django | Spruce Framework |
| **Template Engine** | Django Templates | HTML, CSS, JavaScript/TypeScript |
| **ORM** | Django ORM | Data Stores with Schemas |
| **Routing** | Django URL Dispatcher | Centralized Event System |
| **API Integration** | Django REST Framework | HTTP Requests, Sockets via Mercury Client |
| **Data Persistence** | SQL Databases with ORM | Flexible Data Stores |
| **Error Handling** | Exception Handling | Try-Catch Blocks in TypeScript |
| **Testing** | Django Test Suite | Jest, Mocha |
| **User Authentication** | Django Authentication | Token-Based Authentication |
| | Django | Spruce |
|-----------------------|--------------------------|--------------------------|
| **Programming Language** | Python | TypeScript |
| **IDE** | PyCharm, VS Code | Visual Studio Code |
| **App Lifecycle** | Managed by Django | No Equivalent |
| **UI Design** | Django Templates | Heartwood, ViewControllers |
| **Event Handling** | Signals | Mercury |
| **Data Persistence** | Django ORM | Data Stores |
| **Error Handling** | Try-Except Blocks | Try-Catch Blocks, SpruceErrors |
| **Testing** | Django's Test Framework | TDD by the 3 laws |
| **User Authentication** | Django's Authentication System | Mercury, Authenticator |
| **User Permissions** | Django's Permission Framework | Mercury, Authorizor |

### Programming Language

Expand Down
28 changes: 13 additions & 15 deletions src/pages/getting-started/frameworks/flask.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Flask
title: Transitioning from Flask to Spruce
---
<style>
#language-selector {
Expand Down Expand Up @@ -55,24 +55,22 @@ tr:nth-child(even) {
}
</style>

# 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.

## Key Differences between Flask and Spruce Development

| Development Aspect | Flask | Spruce |
|---------------------------|--------------------------|--------------------------|
| **Programming Language** | Python | TypeScript |
| **Framework** | Flask | Spruce Framework |
| **Template Engine** | Jinja2 | HTML, CSS, JavaScript/TypeScript |
| **State Management** | Flask Global, Flask-Login| Stores with Schemas |
| **Routing** | Flask Routing | Centralized Event System |
| **API Integration** | Flask RESTful | HTTP Requests, Sockets via Mercury Client |
| **Data Persistence** | Flask-SQLAlchemy | Data Stores |
| **Error Handling** | Try-Except Blocks | Try-Catch Blocks in TypeScript |
| **Testing** | unittest, pytest | Jest, Mocha |
| **User Authentication** | Flask-Login, Flask-JWT | Token-Based Authentication |
| | Flask | Spruce |
|-----------------------|--------------------------|--------------------------|
| **Programming Language** | Python | TypeScript |
| **IDE** | PyCharm, VS Code | Visual Studio Code |
| **App Lifecycle** | Managed by Flask | No Equivalent |
| **UI Design** | Jinja2 Templates | Heartwood, ViewControllers |
| **Event Handling** | Routes and View Functions | Mercury |
| **Data Persistence** | SQLAlchemy, Flask-SQLAlchemy | Data Stores |
| **Error Handling** | Try-Except Blocks, Error Handlers | Try-Catch Blocks, SpruceErrors |
| **Testing** | Flask Testing, PyTest | TDD by the 3 laws |
| **User Authentication** | Flask-Login, Flask-Security | Mercury, Authenticator |
| **User Permissions** | Flask-Principal, Custom Decorators | Mercury, Authorizor |

### Programming Language

Expand Down
29 changes: 14 additions & 15 deletions src/pages/getting-started/frameworks/groovy.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Groovy
title: Transitioning from Groovy to Spruce
---
<style>
#language-selector {
Expand Down Expand Up @@ -55,24 +55,23 @@ tr:nth-child(even) {
}
</style>

# 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

| Development Aspect | Groovy | Spruce |
|---------------------------|--------------------------|--------------------------|
| **Programming Language** | Groovy/Java | TypeScript |
| **Framework** | Grails | Spruce Framework |
| **ORM** | GORM | Data Stores with Schemas |
| **MVC Architecture** | Grails MVC | Modular Architecture |
| **Template Engine** | GSP | HTML, CSS, JavaScript/TypeScript |
| **API Integration** | Grails REST Controllers | HTTP Requests, Sockets via Mercury Client |
| **Data Persistence** | SQL/NoSQL with GORM | Flexible Data Stores |
| **Error Handling** | Exception Handling | Try-Catch Blocks in TypeScript |
| **Testing** | Spock, JUnit | Jest, Mocha |
| **Routing** | URLMappings | Centralized Event System |
| | Groovy | Spruce |
|-----------------------|--------------------------|--------------------------|
| **Programming Language** | Groovy | TypeScript |
| **IDE** | IntelliJ IDEA, Eclipse | Visual Studio Code |
| **App Lifecycle** | Controlled by frameworks like Grails | No Equivalent |
| **UI Design** | N/A for CLI; Grails for web views | Heartwood, ViewControllers |
| **Event Handling** | Event listeners in frameworks | Mercury |
| **Data Persistence** | GORM in Grails | Data Stores |
| **Error Handling** | Try-Catch Blocks | Try-Catch Blocks, SpruceErrors |
| **Testing** | Spock, JUnit | TDD by the 3 laws |
| **User Authentication** | Spring Security (with Grails) | Mercury, Authenticator |
| **User Permissions** | Spring Security ACL (with Grails) | Mercury, Authorizor |


### Programming Language

Expand Down
29 changes: 13 additions & 16 deletions src/pages/getting-started/frameworks/laravel.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Laravel
title: Transitioning from Laravel to Spruce
---
<style>
#language-selector {
Expand Down Expand Up @@ -55,25 +55,22 @@ tr:nth-child(even) {
}
</style>

# Transitioning from Laravel to Spruce

Laravel is a PHP framework designed for web application development that follows the MVC (Model-View-Controller) architectural pattern. Spruce, in contrast, is a TypeScript-based framework that also covers full-stack development but leverages JavaScript's ecosystem. This guide will help you draw parallels between familiar Laravel concepts and Spruce's architecture, offering a clear path to apply your existing Laravel skills to Spruce development.

## Key Differences between Laravel and Spruce Development

| Development Aspect | Laravel | Spruce |
|--------------------------|--------------------------|--------------------------|
| **Programming Language** | PHP | TypeScript |
| **Framework** | Laravel | Spruce Framework |
| **IDE** | PHPStorm, others | Visual Studio Code |
| **UI Design** | Blade Templates | HTML, CSS, JavaScript/TypeScript |
| **Data Management** | Eloquent ORM | Schemas |
| **Event Handling** | Events, Broadcasting | Centralized Event System |
| **API Integration** | Laravel API Resources | HTTP Requests, Sockets via Mercury Client |
| **Data Persistence** | SQL with Eloquent | Various databases with Stores |
| **Error Handling** | Exception Handling with `try-catch` | Try-Catch Blocks in TypeScript |
| **Testing** | PHPUnit, Laravel Dusk | Jest, Mocha |
| **User Authentication** | Built-in Auth, Passport | Token-Based Methods, Web-Based Authentication |
| | Laravel | Spruce |
|-----------------------|--------------------------|--------------------------|
| **Programming Language** | PHP | TypeScript |
| **IDE** | PhpStorm, VS Code | Visual Studio Code |
| **App Lifecycle** | Lifecycle managed by Laravel | No Equivalent |
| **UI Design** | Blade Templates | Heartwood, ViewControllers |
| **Event Handling** | Events and Listeners | Mercury |
| **Data Persistence** | Eloquent ORM | Data Stores |
| **Error Handling** | Try-Catch Blocks, Error Handling Mechanisms in Laravel | Try-Catch Blocks, SpruceErrors |
| **Testing** | PHPUnit, Laravel Dusk | TDD by the 3 laws |
| **User Authentication** | Built-in Auth, Sanctum, Passport | Mercury, Authenticator |
| **User Permissions** | Gates and Policies | Mercury, Authorizor |

### Programming Language

Expand Down
28 changes: 13 additions & 15 deletions src/pages/getting-started/frameworks/python.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Python
title: Transitioning from Python to Spruce
---
<style>
#language-selector {
Expand Down Expand Up @@ -55,24 +55,22 @@ tr:nth-child(even) {
}
</style>

# Transitioning from Python to Spruce

Python development often involves using dynamic scripting languages and various frameworks like Django or Flask. Spruce, on the other hand, uses TypeScript. This guide will help you connect your Python expertise to Spruce’s architecture, showing how to adapt and apply your existing skills in a new environment.

## Key Differences between Python and Spruce Development

| Development Aspect | Python | Spruce |
|--------------------------|-------------------------|--------------------------|
| **Programming Language** | Python | TypeScript |
| **IDE** | PyCharm, others | Visual Studio Code |
| **UI Design** | Templates (Django/Flask)| HTML, CSS, JavaScript/TypeScript |
| **Data Management** | Django ORM, SQLAlchemy | Schemas |
| **Event Handling** | URL Routing | Centralized Event System |
| **API Integration** | Django REST Framework, Flask | HTTP Requests, Sockets via Mercury Client |
| **Data Persistence** | SQLite, PostgreSQL, others | Stores |
| **Error Handling** | Try-Except Blocks | Try-Catch Blocks in TypeScript |
| **Testing** | unittest, pytest | Jest, Mocha |
| **User Authentication** | Django Authentication System, Flask-Login | Token-Based Methods, Web-Based Authentication |
| | Python | Spruce |
|-----------------------|--------------------------|-------------------------|
| **Programming Language** | Python | TypeScript |
| **IDE** | PyCharm, VS Code | Visual Studio Code |
| **App Lifecycle** | Depends on the framework or context | No Equivalent |
| **UI Design** | Tkinter for desktop GUI, Frameworks like Django or Flask for web | Heartwood, ViewControllers |
| **Event Handling** | Event loops in frameworks, Callbacks | Mercury |
| **Data Persistence** | SQLite, SQLAlchemy, Django ORM | Data Stores |
| **Error Handling** | Try-Except Blocks | Try-Catch Blocks, SpruceErrors |
| **Testing** | Unittest, PyTest | Jest, Testing Library |
| **User Authentication** | Depends on the framework; Flask-Login, Django's auth system | Mercury, Authenticator |
| **User Permissions** | Framework-specific; Django's permission framework, Flask-Principal | Mercury, Authorizor |

### Programming Language

Expand Down
27 changes: 13 additions & 14 deletions src/pages/getting-started/frameworks/react.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: React
title: Transitioning from React to Spruce
---
<style>
#language-selector {
Expand Down Expand Up @@ -55,23 +55,22 @@ tr:nth-child(even) {
}
</style>

# Transitioning from React to Spruce

React is a library for building user interfaces, primarily focused on the front-end. Spruce is a full-stack framework that uses TypeScript, expanding on the concepts you're familiar with from React and applying them throughout the entire stack. This guide will help you understand how to transition from React's component-based architecture to Spruce's full-stack development approach.

## Key Differences between React and Spruce Development

| Development Aspect | React | Spruce |
|---------------------------|--------------------------|--------------------------|
| **Programming Language** | JavaScript/TypeScript | TypeScript |
| **Library/Framework** | React.js | Spruce Framework |
| **State Management** | Component State, Redux | Stores with Schemas |
| **Routing** | React Router | Centralized Event System |
| **API Integration** | Fetch API, Axios | HTTP Requests, Sockets via Mercury Client |
| **Data Persistence** | Local State, Context API | Data Stores |
| **Error Handling** | Error Boundaries | Try-Catch Blocks in TypeScript |
| **Testing** | Jest, React Testing Library | Jest, Mocha |
| **User Authentication** | Context API, Auth0 | Token-Based Authentication |
| | React | Spruce |
|-----------------------|--------------------------|--------------------------|
| **Programming Language** | JavaScript/TypeScript | TypeScript |
| **IDE** | VS Code, WebStorm | Visual Studio Code |
| **App Lifecycle** | Component Lifecycle, Hooks | No Equivalent |
| **UI Design** | JSX, CSS Modules | Heartwood, ViewControllers |
| **Event Handling** | Synthetic Events | Mercury |
| **Data Persistence** | State Management (Redux, Context API) | Data Stores |
| **Error Handling** | Error Boundaries, Try-Catch in Async Code | Try-Catch Blocks, SpruceErrors |
| **Testing** | Jest, React Testing Library | TDD by the 3 laws |
| **User Authentication** | Context API for State Management, Third-Party Services (Auth0, Firebase) | Mercury, Authenticator |
| **User Permissions** | Custom Logic, Third-Party Libraries | Mercury, Authorizor |

### Programming Language

Expand Down
Loading

0 comments on commit 6852dd1

Please sign in to comment.