Skip to content

sebastianconcept/ride

Repository files navigation

Ride

The Smalltalk web application framework with productivity as a feature.

Release Unit Tests

Coverage Status

Pharo 11 Pharo 10

License Social

Commits

Features

  • MVP - Model-View-Presenter architecture.
  • Declarative routing.
  • Multiple View options for rendering HTML, JSON, XML and more.
  • Default Views based in smart efficient templates using STTemplate.
  • Versatile and comfortable persistence without lock-in using Mapless.
  • Intuitive conventions.
  • Made with scalability and performance in mind.
  • RESTful.
  • Builder to scaffold useful code fast.
  • Basic validation. To be done.
  • Optional custom JavaScript for presenters.
  • AJAX via htmx.
  • Able to deploy containerized from day one. To be done.

  1. Description
  2. Examples
  3. Hello World
  4. Install
  5. Guides
  6. Talks

Description

Ride is a framework designed for building Web Applications and RESTful APIs, optimizing for developer productivity while preserving production efficiency and scalability. Ride focuses on eliminating the hurdles to quickly build and deploy real projects without compromising your architecture's ability to scale in production.

It comes equipped with a builder that streamlines the process of scaffolding models, views, presenters, CRUD operations and their unit tests for the models you need. Ride removes many technical obstacles, allowing you to progress rapidly in your application development journey from proof of concept and startup product to a growing business.

Install

Fetch a fresh Pharo image

mkdir my-ride-app
cd my-ride-app
curl get.pharo.org/64/100 | bash
curl get.pharo.org/64/vm100 | bash

And run it

./pharo-ui Pharo.image

Install Ride in it

Metacello new
  baseline: 'Ride';
  repository: 'github://sebastianconcept/ride';
  onConflict: [ :ex | ex useIncoming ];
  load.

Examples

"Stop anything Ride that is currently running in the image and reset caches"
Ride stop; reset.

"A Ride-based application has its own helper RideService subclass. Like BlogApp in this example:"

"Install BlogApp as the Ride service"
BlogApp install.

"Start and stop the service"
BlogApp start.
BlogApp stop.

"Service restart"
BlogApp restart.

Enhanced developer productivity

Ride offers you a convenient way to quickly create the basic elements needed for implementing basic operations in a new model. For example, given a Blog web application to publish Post and Comment models, you could find the following snippets helpful for pushing useful things fast:

"Set the default package name that will be the destination
of the code generated by Ride's builder"
Ride create app setPackageNameTo: #Blog.

"Create the foundational Smalltalk code and files
of the project using the given root word 'Blog' "
Ride create app for: #Blog.

"Create the Smalltalk code and files for having
basic CRUD features in a model named `Post`"
Ride create mvp crud for: #Post.

"Same for a model named `Comment`"
Ride create mvp crud for: #Comment.

MVP

Ride also can help you create the raw elements of the Model-View-Presenter code separately for a given model:

"Create the model and presenter classes and STTemplate file at
`views/templates/posts/index.html.stt` for Post"
Ride create mvp for: #Post.

"Same as before but PostsPresenter loads custom JavaScript"
Ride create mvp withJs for: #Post.

Or even as its individual parts:

"Create a RideModel subclass Subscription used to
store people subscribed to the blog."
Ride create model for: #Subscription.

"Create a RidePresenter subclass SubscriptionPresenter"
Ride create presenter for: #Subscription.

"Create the template correponding to Subscription at
templates/views/subscriptions/index.stt"
Ride create view stt for: #Subscription.

API

If you need an API and you like to keep concerns organized with MVP, this is how you can generate its boilerplate code:

Ride create api crud for: #Post.

Guides

Talks

Ride was presented for the first time at Smalltalks 2023 organized by F.A.S.T. at Universidad Nacional de Quilmes.

November 2023

RAD with templates, htmx and stateless Smalltalk images by Sebastian Sastre