Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianconcept committed Feb 10, 2024
1 parent 8c1607e commit a4ec571
Showing 1 changed file with 36 additions and 17 deletions.
53 changes: 36 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
# Ride
The Smalltalk web application framework with productivity as a feature.


[![Release](https://img.shields.io/github/v/tag/sebastianconcept/ride?label=release)](https://github.com/sebastianconcept/ride/releases)
[![Unit Tests](https://github.com/sebastianconcept/ride/actions/workflows/build.yml/badge.svg)](https://github.com/sebastianconcept/ride/actions/workflows/build.yml)

![Tests](https://img.shields.io/badge/tests-3-green)
[![Coverage Status](https://codecov.io/github/sebastianconcept/ride/coverage.svg?branch=main)](https://codecov.io/gh/sebastianconcept/ride/branch/master)

[![Pharo 10](https://img.shields.io/badge/Pharo-10-%23383932.svg)](https://pharo.org/download)
[![Pharo 11](https://img.shields.io/badge/Pharo-11-%23383932.svg)](https://pharo.org/download)

[![License](https://img.shields.io/badge/license-MIT-green)](./LICENSE.txt)
[![Release](https://img.shields.io/github/v/tag/sebastianconcept/ride?label=release)](https://github.com/sebastianconcept/ride/releases)
[![Forks](https://img.shields.io/github/forks/sebastianconcept/ride?style=sociall)]()
[![Social](https://img.shields.io/github/stars/sebastianconcept/ride?style=social)]()

[![Commits](https://img.shields.io/github/commit-activity/m/sebastianconcept/ride)](https://github.com/sebastianconcept/ride/graphs/commit-activity)

[![Pharo 10](https://img.shields.io/badge/Pharo-10-%23aac9ff.svg)](https://pharo.org/download)

## Features

- MVP - Model-View-Presenter architecture.
Expand Down Expand Up @@ -62,6 +65,7 @@ Essential core:
Metacello new
baseline: 'Ride';
repository: 'github://sebastianconcept/ride';
onConflict: [ :ex | ex useIncoming ];
load.
```

Expand All @@ -70,46 +74,61 @@ All optionals:
Metacello new
baseline: 'Ride';
repository: 'github://sebastianconcept/ride';
load: #( 'Core' 'Tests' 'Examples' ).
onConflict: [ :ex | ex useIncoming ];
load: #( 'Core' 'Tests' ).
```

### Snippets
Handy to start stop the Ride in the Welcome example app:
```Smalltalk
"Stop anything Ride running and reset anything being in any cache at any level"
Ride stop; reset.
"Your application, say BlogApp, will have its own helper class:"
"Your application, say BlogApp, has its own helper RideService subclass"
"Install BlogApp as the Ride service"
BlogApp install.
BlogApp stop.
"Start and stop the service"
BlogApp start.
BlogApp stop.
"Service restart"
BlogApp restart.
```

### Enhancing developer productivity
Ride offers you a convenient way to quickly create the basic elements needed for implementing a feature based in a new model. For example, given a `Blog` web application to publish `Post` and `Comment` models, you could:

```smalltalk
"Set the default package that will be the destination of the generated code"
Ride create defaultPackageName: 'Blog'.
"Set the default package name that will be the destination of the code generated by Ride's builder"
Ride create app setPackageNameTo: #Blog.
"Create a RideModel subclass Post used as app domain state"
Ride create model for: #Post.
"Create the foundational Smalltalk code and files of the project using the given root word 'Blog' "
Ride create app for: #Blog.
"Create the skeleton for having basic CRUD features in a model named `Post`"
Ride create mvp crud for: #Post.
"Create a RidePresenter subclass PostsPresenter"
Ride create presenter for: #Post.
"Create the skeleton for having basic CRUD features in a model named `Comment`"
Ride create mvp crud for: #Comment.
"Create the template templates/views/posts/index.stt"
Ride create view stt for: #Post.
"Create a RideModel subclass Subscription used to store people subscribed to your blog."
Ride create model for: #Subscription.
"Create a RidePresenter subclass SubscriptionPresenter"
Ride create presenter for: #Subscription.
"Create the template templates/views/subscriptions/index.stt"
Ride create view stt for: #Subscription.
```

## MVP

Using these basic code generators, Ride also can create the elemental Model-View-Presenter code for a given model:

```smalltalk
"Create the model and presenter classes and mustache template file for Post"
"Create the model and presenter classes and STTemplate file for Post"
Ride create mvp for: #Post.
"Same as before but PostsPresenter loads custom JavaScript"
Expand All @@ -123,4 +142,4 @@ Ride create mvp crud for: #Post.
If you need an API and you like to keep concerns organized with MVP, this is how you can generate its boilerplate code:
```smalltalk
Ride create api crud for: #Post.
```
```

0 comments on commit a4ec571

Please sign in to comment.