I am bringing my Reddit example back up to date (https://medium.com/concerning-pharo/reddit-st-in-10-cool-pharo-classes-1b5327ca0740) for an upcoming Pharo Booklet.
I used to depend on and load Glorp+PostgreSQL in my Configuration as follows: spec project: 'Glorp' with: [ spec className: 'ConfigurationOfGlorp'; versionString: #stable; repository: 'http://www.smalltalkhub.com/mc/DBXTalk/Configurations/main' ]. spec project: 'PostgresV2' with: [ spec className: 'ConfigurationOfPostgresV2'; versionString: #bleedingEdge; repository: 'http://www.smalltalkhub.com/mc/PharoExtras/PostgresV2/main' ]. spec package: 'GlorpDriverPostgreSQL' with: [ spec repository: 'http://www.smalltalkhub.com/mc/PharoExtras/PostgresV2/main'; postLoadDoIt: #postLoadGlorpPostgresNativeDriverDBXTalkPharo; requires: #( 'Glorp' 'PostgresV2' ) ]. This works fine in Pharo 6 now. My first question is, is this the 'correct' way of loading Glorp+PostgreSQL ? Do I get the latest, maintained code this way ? My second question is, why is #stable not available for Pharo 6 for PostgresV2, what should be done to fix this and could someone add it ? Thx, Sven |
The "recommended" way would be to use ConfigurationOfGarageGlorp and
use Garage's PostgreSQL driver (which is a fork from the PostgresV2 one). However I couldn't tell whether there is a difference (both in performance and/or features) between them because the codebase moves a glaciar speed; I'm aware of some users that prefer to stick with the old driver (pgV2) instead of the Garage alternative (which isn't much maintained either), since both preserve the API and different Glorp drivers (adapters) corrects any difference. In the booklets Stef published days ago there is a link to the one of Glorp I wrote, there is a snippet of the "recommended" way to load Glorp using the Garage configurations. Which one you choose is up to you. Regards! Esteban A. Maringolo 2017-05-16 6:58 GMT-03:00 Sven Van Caekenberghe <[hidden email]>: > I am bringing my Reddit example back up to date (https://medium.com/concerning-pharo/reddit-st-in-10-cool-pharo-classes-1b5327ca0740) for an upcoming Pharo Booklet. > > I used to depend on and load Glorp+PostgreSQL in my Configuration as follows: > > spec project: 'Glorp' with: [ > spec > className: 'ConfigurationOfGlorp'; > versionString: #stable; > repository: 'http://www.smalltalkhub.com/mc/DBXTalk/Configurations/main' ]. > > spec project: 'PostgresV2' with: [ > spec > className: 'ConfigurationOfPostgresV2'; > versionString: #bleedingEdge; > repository: 'http://www.smalltalkhub.com/mc/PharoExtras/PostgresV2/main' ]. > > spec > package: 'GlorpDriverPostgreSQL' > with: [ > spec > repository: 'http://www.smalltalkhub.com/mc/PharoExtras/PostgresV2/main'; > postLoadDoIt: #postLoadGlorpPostgresNativeDriverDBXTalkPharo; > requires: #( 'Glorp' 'PostgresV2' ) ]. > > This works fine in Pharo 6 now. > > My first question is, is this the 'correct' way of loading Glorp+PostgreSQL ? Do I get the latest, maintained code this way ? > > My second question is, why is #stable not available for Pharo 6 for PostgresV2, what should be done to fix this and could someone add it ? > > Thx, > > Sven > > |
In reply to this post by Sven Van Caekenberghe-2
On Tue, May 16, 2017 at 11:58:50AM +0200, Sven Van Caekenberghe wrote:
> I am bringing my Reddit example back up to date (https://medium.com/concerning-pharo/reddit-st-in-10-cool-pharo-classes-1b5327ca0740) for an upcoming Pharo Booklet. Hi Sven, I've adapted your Reddit application to work with Glorp-SQLite. It was pretty much simply subclassing RedditDatabaseResource and wiring up #newGlorpSession. It's a nice demo of Glorp's pluggability. Pierce |
> On 17 May 2017, at 16:01, Pierce Ng <[hidden email]> wrote: > > On Tue, May 16, 2017 at 11:58:50AM +0200, Sven Van Caekenberghe wrote: >> I am bringing my Reddit example back up to date (https://medium.com/concerning-pharo/reddit-st-in-10-cool-pharo-classes-1b5327ca0740) for an upcoming Pharo Booklet. > > Hi Sven, > > I've adapted your Reddit application to work with Glorp-SQLite. It was pretty > much simply subclassing RedditDatabaseResource and wiring up #newGlorpSession. > It's a nice demo of Glorp's pluggability. That is cool. We should definitively keep a reference to that. Thanks. > Pierce > |
2017-05-17 11:04 GMT-03:00 Sven Van Caekenberghe <[hidden email]>:
> >> On 17 May 2017, at 16:01, Pierce Ng <[hidden email]> wrote: >> >> On Tue, May 16, 2017 at 11:58:50AM +0200, Sven Van Caekenberghe wrote: >>> I am bringing my Reddit example back up to date (https://medium.com/concerning-pharo/reddit-st-in-10-cool-pharo-classes-1b5327ca0740) for an upcoming Pharo Booklet. >> I've adapted your Reddit application to work with Glorp-SQLite. It was pretty >> much simply subclassing RedditDatabaseResource and wiring up #newGlorpSession. >> It's a nice demo of Glorp's pluggability. > > That is cool. We should definitively keep a reference to that. Thanks. And it's better to get a non devops savvy user to get started, because it avoids installing a PgSQL server. Regards! Esteban A. Maringolo |
Ahhhh this can be good for the reddit booklet :) But sven has the last word on it. On Wed, May 17, 2017 at 7:35 PM, Esteban A. Maringolo <[hidden email]> wrote: 2017-05-17 11:04 GMT-03:00 Sven Van Caekenberghe <[hidden email]>: |
In reply to this post by Esteban A. Maringolo
> On 17 May 2017, at 19:35, Esteban A. Maringolo <[hidden email]> wrote: > > 2017-05-17 11:04 GMT-03:00 Sven Van Caekenberghe <[hidden email]>: >> >>> On 17 May 2017, at 16:01, Pierce Ng <[hidden email]> wrote: >>> >>> On Tue, May 16, 2017 at 11:58:50AM +0200, Sven Van Caekenberghe wrote: >>>> I am bringing my Reddit example back up to date (https://medium.com/concerning-pharo/reddit-st-in-10-cool-pharo-classes-1b5327ca0740) for an upcoming Pharo Booklet. > >>> I've adapted your Reddit application to work with Glorp-SQLite. It was pretty >>> much simply subclassing RedditDatabaseResource and wiring up #newGlorpSession. >>> It's a nice demo of Glorp's pluggability. >> >> That is cool. We should definitively keep a reference to that. Thanks. > > And it's better to get a non devops savvy user to get started, because > it avoids installing a PgSQL server. Yes and no. On macOS, http://postgresapp.com is dead simple for any user. > Regards! > > Esteban A. Maringolo > |
I just forked the booklet today and was working through it. I don’t know if your changes were already in there, but most things are working for me. I have hit a few typos and inconsistencies that I’ve noted and I would recommend a change to the unit test bit as it feels weird to add a test assert contract method onto the link class (I think its better on the test class).
Tim
|
> On 24 May 2017, at 01:36, Tim Mackinnon <[hidden email]> wrote: > > I just forked the booklet today and was working through it. I don’t know if your changes were already in there, but most things are working for me. I have hit a few typos and inconsistencies that I’ve noted and I would recommend a change to the unit test bit as it feels weird to add a test assert contract method onto the link class (I think its better on the test class). The assert is indeed a bit unconventional but as was explained, it is on purpose / by design. That way it can be shared and used in more places (also outside the unit tests). I would try not to change the actual code to keep the documentation in sync (unless really needed). > Tim > >> On 17 May 2017, at 19:03, Sven Van Caekenberghe <[hidden email]> wrote: >> >>> >>> On 17 May 2017, at 19:35, Esteban A. Maringolo <[hidden email]> wrote: >>> >>> 2017-05-17 11:04 GMT-03:00 Sven Van Caekenberghe <[hidden email]>: >>>> >>>>> On 17 May 2017, at 16:01, Pierce Ng <[hidden email]> wrote: >>>>> >>>>> On Tue, May 16, 2017 at 11:58:50AM +0200, Sven Van Caekenberghe wrote: >>>>>> I am bringing my Reddit example back up to date (https://medium.com/concerning-pharo/reddit-st-in-10-cool-pharo-classes-1b5327ca0740) for an upcoming Pharo Booklet. >>> >>>>> I've adapted your Reddit application to work with Glorp-SQLite. It was pretty >>>>> much simply subclassing RedditDatabaseResource and wiring up #newGlorpSession. >>>>> It's a nice demo of Glorp's pluggability. >>>> >>>> That is cool. We should definitively keep a reference to that. Thanks. >>> >>> And it's better to get a non devops savvy user to get started, because >>> it avoids installing a PgSQL server. >> >> Yes and no. >> >> On macOS, http://postgresapp.com is dead simple for any user. >> >>> Regards! >>> >>> Esteban A. Maringolo > |
Hi Sven - my suggestion would be to simply put it on the links TestClass, it's a minor change that preserves your same flow.
I had noticed that Stef had a note at this point as he hadn't understood what you were trying to convey, and I think this simply sorts it. I'll try and submit my fork today so you guys can decide. Or you can take the other charges. I don't mind, as it's been a great way to get back into pharo. I just need to get my seaside bit cleared up (which is surprising as I had predicted glorp and Postgres would be the stumbling block) Tim Sent from my iPhone Sent from my iPhone > On 24 May 2017, at 06:22, Sven Van Caekenberghe <[hidden email]> wrote: > > >> On 24 May 2017, at 01:36, Tim Mackinnon <[hidden email]> wrote: >> >> I just forked the booklet today and was working through it. I don’t know if your changes were already in there, but most things are working for me. I have hit a few typos and inconsistencies that I’ve noted and I would recommend a change to the unit test bit as it feels weird to add a test assert contract method onto the link class (I think its better on the test class). > > The assert is indeed a bit unconventional but as was explained, it is on purpose / by design. That way it can be shared and used in more places (also outside the unit tests). I would try not to change the actual code to keep the documentation in sync (unless really needed). > >> Tim >> >>>> On 17 May 2017, at 19:03, Sven Van Caekenberghe <[hidden email]> wrote: >>>> >>>> >>>> On 17 May 2017, at 19:35, Esteban A. Maringolo <[hidden email]> wrote: >>>> >>>> 2017-05-17 11:04 GMT-03:00 Sven Van Caekenberghe <[hidden email]>: >>>>> >>>>>> On 17 May 2017, at 16:01, Pierce Ng <[hidden email]> wrote: >>>>>> >>>>>> On Tue, May 16, 2017 at 11:58:50AM +0200, Sven Van Caekenberghe wrote: >>>>>>> I am bringing my Reddit example back up to date (https://medium.com/concerning-pharo/reddit-st-in-10-cool-pharo-classes-1b5327ca0740) for an upcoming Pharo Booklet. >>>> >>>>>> I've adapted your Reddit application to work with Glorp-SQLite. It was pretty >>>>>> much simply subclassing RedditDatabaseResource and wiring up #newGlorpSession. >>>>>> It's a nice demo of Glorp's pluggability. >>>>> >>>>> That is cool. We should definitively keep a reference to that. Thanks. >>>> >>>> And it's better to get a non devops savvy user to get started, because >>>> it avoids installing a PgSQL server. >>> >>> Yes and no. >>> >>> On macOS, http://postgresapp.com is dead simple for any user. >>> >>>> Regards! >>>> >>>> Esteban A. Maringolo > > |
In reply to this post by Sven Van Caekenberghe-2
On Wed, May 17, 2017 at 04:04:18PM +0200, Sven Van Caekenberghe wrote:
> > On 17 May 2017, at 16:01, Pierce Ng <[hidden email]> wrote: > > I've adapted your Reddit application to work with Glorp-SQLite. It was pretty > > much simply subclassing RedditDatabaseResource and wiring up #newGlorpSession. > > It's a nice demo of Glorp's pluggability. > > That is cool. We should definitively keep a reference to that. Thanks. I've published the port on http://smalltalkhub.com/#!/~PierceNg/RedditSQLite. Pierce |
Free forum by Nabble | Edit this page |