Skip to content

Commit

Permalink
reviewed in full
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianconcept committed Jan 29, 2024
1 parent 352d3f8 commit 30808c5
Show file tree
Hide file tree
Showing 15 changed files with 980 additions and 420 deletions.
6 changes: 0 additions & 6 deletions _includes/connection.html

This file was deleted.

13 changes: 10 additions & 3 deletions _includes/findAll.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<div class="shell">
{% highlight st %}
"Get all models of a given Mapless class from the repository"
"Get all models of a given Mapless class from the repository"
allTasks := repository findAll: Task.

"Same but when your Mapless class can do its own getRepository"
"Same within the repository context"
repository do: [ allTasks := Task findAll ].

"Same but when your Mapless class can do its own getRepository
(uses the MaplessCurrentRepository DynamicVariable)"
allTasks := Task findAll.

"Getting a specific model using its id"
Expand All @@ -22,8 +26,11 @@
offset: 20
sort: { #description -> 1 } asDictionary.

"Same query but with a PostgreSQL backend instead"
"If we'd be using PostgreSQL instead and wanting the same data"
criteria := 'maplessData->> ''description'' LIKE ''Try%'''.

"The criteria filter here is used in the predicate of the SQL sentence
that Mapless creates for querying this"
userTasksAboutTryingThings := Task find: criteria
limit: 10
offset: 20
Expand Down
2 changes: 1 addition & 1 deletion _includes/intention.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h5 class="h5NoTop">Why Mapless?</h5>
<div class="thumb">
<a href="https://sebastiansastre.co/" target="_blank" >
<img alt="Sebastian Sastre portrait" src="images/p3.jpg" width="68">
<img alt="Sebastian Sastre portrait" src="images/seb.jpeg" width="68">
</a>
</div>

Expand Down
6 changes: 3 additions & 3 deletions _includes/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ <h2 class="catchPhrase"><em>Obscenely</em> simple object persistence</h2>
<div class="col-md-4">
<div class="appeal leftAppeal">
<h3>Simple</h3>
<p>Low maintenance for real. No instVars. No getters and no setters - just saved models with your data.</p>
<p>Low maintenance for real. No instance variables, no getters, and no setters just saved models with your data.</p>
<a href="#updating">Add data to a model →</a>
</div>
</div>
<div class="col-md-4">
<div class="appeal middleAppeal">
<h3>Composable</h3>
<p>Do you need to compose models? But of course you do! No mapping required, just add those (sub)models, save its children first and you're good to go.</p>
<p>Do you need to compose models? But of course you do! No mapping requiredjust add those (sub)models, save its children first, and you're good to go.</p>
<a href="#composability">Compose models →</a>
</div>
</div>
<div class="col-md-4">
<div class="appeal rightAppeal">
<h3>Portable</h3>
<p>Shared API across backends. i.e.: start with SQLite and easily move to MongoDB or PostgreSQL while caching with Redis.</p>
<p>Shared API across backends. For example, start with SQLite and easily move to MongoDB or PostgreSQL while caching with Redis.</p>
<a href="#portability">Data portability →</a>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions _includes/navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
repository do: [ task alert class = MaplessReference ].
"=> true"

"At this point, Mapless never queried to fetch the data that belongs to the alert of that task..."

"Alert as (sub)model in task, is lazily fetched with the first message
and responding as if always would have been ready"
repository do: [ task alert message ].
Expand Down
2 changes: 1 addition & 1 deletion _includes/repository.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="shell">
{% highlight st %}
"Create the repository object to use the 'TryingMapless' database.
This repository is for a local standalone MongoDB at localhost:27017"
This repository is for a standalone MongoDB listening on localhost:27017"
databaseName := 'TryingMapless'.
repository := MaplessMongoRepository
for: databaseName
Expand Down
Loading

0 comments on commit 30808c5

Please sign in to comment.