Pharo 6.0 Generating Ruby-on-Rails Applications

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Pharo 6.0 Generating Ruby-on-Rails Applications

Peter Fisk
Hi everyone, The latest version of my "Rails Express" rapid application development environment is built in Pharo 6.0. Here is a blog post with a few screenshots and some explanation. https://railsexpress.quora.com/Pharo-6-Generating-Ruby-on-Rails-Applications I mostly programmed in Smalltalk from 1987 until 1997 using ParcPlace VisualWorks and then IBM VisualAge. Pharo is now better than either of those two frameworks. Congratulations to the Pharo team for all your great work! Regards, -- Peter Fisk

Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

Hannes Hirzel
Thank you for sharing, Peter.

Good that you 'rediscovered' Smalltalk!

Most interesting point of what you write

<citation>
Ruby-on-Rails, of course, has built-in generators that can create data
models, controllers, views, etc. And there are also more sophisticated
application generators such as Yeoman.

These generators are based on templates and are great as far as they go.

Where my Smalltalk approach is different is the level of abstraction.
The Smalltalk models are not bound to any particular target language
and could just as easily be used to generate PHP Laravel, NodeJS, or
Java applications.
</citation>

This is similar to a Pillar document object model.
A object model (an app or a document) may be inspected in the  dynamic
Smalltalk environment and rendered in different ways.

Regards
Hannes

On 9/1/17, Peter Fisk <[hidden email]> wrote:

> Hi everyone,The latest version of my "Rails Express" rapid application
> development environment is built in Pharo 6.0.Here is a blog post with a
> few
> screenshots and some explanation.
> https://railsexpress.quora.com/Pharo-6-Generating-Ruby-on-Rails-Applications
> <https://railsexpress.quora.com/Pharo-6-Generating-Ruby-on-Rails-Applications>
>
> I mostly programmed in Smalltalk from 1987 until 1997 using ParcPlace
> VisualWorks and then IBM VisualAge.Pharo is now better than either of those
> two frameworks.Congratulations to the Pharo team for all your great
> work!Regards,-- Peter Fisk
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Screenshot_2017-09-01.png (122K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

Brad Selfridge
In reply to this post by Peter Fisk
Hi Peter,

Really good work. I'm impressed. Pharo is really gaining some cutting edge
options. I would like to know a lot more about your framework. Thanks for
the effort.



-----
Brad Selfridge
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Brad Selfridge
Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

Hannes Hirzel
Hello Brad

In this context it is probably useful to (re-)read the thesis by Lukas Rengli

http://scg.unibe.ch/archive/masters/Reng06a.pdf

<citation page=3>
As a complete example of how we applied a meta-model to a Web application
we present Pier, the second version of a fully object-oriented implementation
of a content management system and Wiki engine. ....

We describe the lessons learned from using the Magritte meta-model to build
applications.
</citation>

It contains a lot of good insights - see 'Lessons learned'.
The writing style might be terse and abstract but there is also a
Pharo book about Magritte.

In a pristine Pharo image, as soon as you start writing your own class
definitions to model your domain you are actually creating a Domain
Specific Language (DSL).

This language describes your application domain. If we talk about web
applications, you describe in an abstract way the domain objects and
GUI elements.

The challenge is that this DSL language is easy to write, understand,
teach and maintain.

From the model (part of it most often is a tree of objects) you have
visitor walking through the object net and creating reports.

It is easy to quickly come up with something which works but often it
is idiosyncratic, thus difficult to understand for other people.

Maybe Peter can share some insights about his experience writing a
model to then generate a Ruby-on-Rails-app.

Pillar is another example of such an approach. You create a document
object model and then have various exporter objects to generate
slides, web pages and very nice books. It is accessible code and you
can learn from it. The emphasis is on static content but some dynamic
content seems to be possible as well.

Regards
Hannes


On 9/2/17, Brad Selfridge <[hidden email]> wrote:

> Hi Peter,
>
> Really good work. I'm impressed. Pharo is really gaining some cutting edge
> options. I would like to know a lot more about your framework. Thanks for
> the effort.
>
>
>
> -----
> Brad Selfridge
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

Hannes Hirzel
To follow up on this, maybe the easiest is to read

https://ci.inria.fr/pharo-contribution/view/Books/job/Magritte/lastSuccessfulBuild/artifact/book-result/MagritteBooklet.pdf

to have the domain model aspect covered. Magritte has a generator for
Morphic and Seaside.

It would be nice to have more open source generators....

--Hannes

On 9/2/17, H. Hirzel <[hidden email]> wrote:

> Hello Brad
>
> In this context it is probably useful to (re-)read the thesis by Lukas
> Rengli
>
> http://scg.unibe.ch/archive/masters/Reng06a.pdf
>
> <citation page=3>
> As a complete example of how we applied a meta-model to a Web application
> we present Pier, the second version of a fully object-oriented
> implementation
> of a content management system and Wiki engine. ....
>
> We describe the lessons learned from using the Magritte meta-model to build
> applications.
> </citation>
>
> It contains a lot of good insights - see 'Lessons learned'.
> The writing style might be terse and abstract but there is also a
> Pharo book about Magritte.
>
> In a pristine Pharo image, as soon as you start writing your own class
> definitions to model your domain you are actually creating a Domain
> Specific Language (DSL).
>
> This language describes your application domain. If we talk about web
> applications, you describe in an abstract way the domain objects and
> GUI elements.
>
> The challenge is that this DSL language is easy to write, understand,
> teach and maintain.
>
> From the model (part of it most often is a tree of objects) you have
> visitor walking through the object net and creating reports.
>
> It is easy to quickly come up with something which works but often it
> is idiosyncratic, thus difficult to understand for other people.
>
> Maybe Peter can share some insights about his experience writing a
> model to then generate a Ruby-on-Rails-app.
>
> Pillar is another example of such an approach. You create a document
> object model and then have various exporter objects to generate
> slides, web pages and very nice books. It is accessible code and you
> can learn from it. The emphasis is on static content but some dynamic
> content seems to be possible as well.
>
> Regards
> Hannes
>
>
> On 9/2/17, Brad Selfridge <[hidden email]> wrote:
>> Hi Peter,
>>
>> Really good work. I'm impressed. Pharo is really gaining some cutting
>> edge
>> options. I would like to know a lot more about your framework. Thanks for
>> the effort.
>>
>>
>>
>> -----
>> Brad Selfridge
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

kilon.alios
In reply to this post by Peter Fisk
Well done ! :) 

I added your answer to Pharo Wiki "How to" section https://github.com/pharo-project/pharo/blob/master/wiki/contents/howto.md

On Sat, Sep 2, 2017 at 12:05 AM Peter Fisk <[hidden email]> wrote:
Hi everyone, The latest version of my "Rails Express" rapid application development environment is built in Pharo 6.0. Here is a blog post with a few screenshots and some explanation. https://railsexpress.quora.com/Pharo-6-Generating-Ruby-on-Rails-Applications I mostly programmed in Smalltalk from 1987 until 1997 using ParcPlace VisualWorks and then IBM VisualAge. Pharo is now better than either of those two frameworks. Congratulations to the Pharo team for all your great work! Regards, -- Peter Fisk

Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

Hannes Hirzel
Dimitris,

more info for the wiki here

    https://railsexpress.quora.com/  and

    https://github.com/pdfisk/rails-express

HH.

On 9/7/17, Dimitris Chloupis <[hidden email]> wrote:

> Well done ! :)
>
> I added your answer to Pharo Wiki "How to" section
> https://github.com/pharo-project/pharo/blob/master/wiki/contents/howto.md
>
> On Sat, Sep 2, 2017 at 12:05 AM Peter Fisk <[hidden email]> wrote:
>
>> Hi everyone, The latest version of my "Rails Express" rapid application
>> development environment is built in Pharo 6.0. Here is a blog post with a
>> few screenshots and some explanation.
>> https://railsexpress.quora.com/Pharo-6-Generating-Ruby-on-Rails-Applications
>> I mostly programmed in Smalltalk from 1987 until 1997 using ParcPlace
>> VisualWorks and then IBM VisualAge. Pharo is now better than either of
>> those two frameworks. Congratulations to the Pharo team for all your
>> great
>> work! Regards, -- Peter Fisk
>> ------------------------------
>> Sent from the Pharo Smalltalk Users mailing list archive
>> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at
>> Nabble.com.
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

Hannes Hirzel
@Dimitris

And actually probably the most interesting link

    http://railsexpress.com/

On 9/7/17, H. Hirzel <[hidden email]> wrote:

> Dimitris,
>
> more info for the wiki here
>
>     https://railsexpress.quora.com/  and
>
>     https://github.com/pdfisk/rails-express
>
> HH.
>
> On 9/7/17, Dimitris Chloupis <[hidden email]> wrote:
>> Well done ! :)
>>
>> I added your answer to Pharo Wiki "How to" section
>> https://github.com/pharo-project/pharo/blob/master/wiki/contents/howto.md
>>
>> On Sat, Sep 2, 2017 at 12:05 AM Peter Fisk <[hidden email]> wrote:
>>
>>> Hi everyone, The latest version of my "Rails Express" rapid application
>>> development environment is built in Pharo 6.0. Here is a blog post with
>>> a
>>> few screenshots and some explanation.
>>> https://railsexpress.quora.com/Pharo-6-Generating-Ruby-on-Rails-Applications
>>> I mostly programmed in Smalltalk from 1987 until 1997 using ParcPlace
>>> VisualWorks and then IBM VisualAge. Pharo is now better than either of
>>> those two frameworks. Congratulations to the Pharo team for all your
>>> great
>>> work! Regards, -- Peter Fisk
>>> ------------------------------
>>> Sent from the Pharo Smalltalk Users mailing list archive
>>> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at
>>> Nabble.com.
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

Hannes Hirzel
OK, RailsExpress

Rails Express is Peter Fisk's  attempt to make web development both
easy and enjoyable. It feels like Smalltalk, but it is built 100% in
Ruby-on-Rails.

So it is NOT about the Pharo 6.0 Generator; did not find the source
code yet ....

On 9/7/17, H. Hirzel <[hidden email]> wrote:

> @Dimitris
>
> And actually probably the most interesting link
>
>     http://railsexpress.com/
>
> On 9/7/17, H. Hirzel <[hidden email]> wrote:
>> Dimitris,
>>
>> more info for the wiki here
>>
>>     https://railsexpress.quora.com/  and
>>
>>     https://github.com/pdfisk/rails-express
>>
>> HH.
>>
>> On 9/7/17, Dimitris Chloupis <[hidden email]> wrote:
>>> Well done ! :)
>>>
>>> I added your answer to Pharo Wiki "How to" section
>>> https://github.com/pharo-project/pharo/blob/master/wiki/contents/howto.md
>>>
>>> On Sat, Sep 2, 2017 at 12:05 AM Peter Fisk <[hidden email]> wrote:
>>>
>>>> Hi everyone, The latest version of my "Rails Express" rapid application
>>>> development environment is built in Pharo 6.0. Here is a blog post with
>>>> a
>>>> few screenshots and some explanation.
>>>> https://railsexpress.quora.com/Pharo-6-Generating-Ruby-on-Rails-Applications
>>>> I mostly programmed in Smalltalk from 1987 until 1997 using ParcPlace
>>>> VisualWorks and then IBM VisualAge. Pharo is now better than either of
>>>> those two frameworks. Congratulations to the Pharo team for all your
>>>> great
>>>> work! Regards, -- Peter Fisk
>>>> ------------------------------
>>>> Sent from the Pharo Smalltalk Users mailing list archive
>>>> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at
>>>> Nabble.com.
>>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

kilon.alios
i will wait for further explanation because when it comes to web dev i am clueless

On Thu, Sep 7, 2017 at 2:59 PM H. Hirzel <[hidden email]> wrote:
OK, RailsExpress

Rails Express is Peter Fisk's  attempt to make web development both
easy and enjoyable. It feels like Smalltalk, but it is built 100% in
Ruby-on-Rails.

So it is NOT about the Pharo 6.0 Generator; did not find the source
code yet ....

On 9/7/17, H. Hirzel <[hidden email]> wrote:
> @Dimitris
>
> And actually probably the most interesting link
>
>     http://railsexpress.com/
>
> On 9/7/17, H. Hirzel <[hidden email]> wrote:
>> Dimitris,
>>
>> more info for the wiki here
>>
>>     https://railsexpress.quora.com/  and
>>
>>     https://github.com/pdfisk/rails-express
>>
>> HH.
>>
>> On 9/7/17, Dimitris Chloupis <[hidden email]> wrote:
>>> Well done ! :)
>>>
>>> I added your answer to Pharo Wiki "How to" section
>>> https://github.com/pharo-project/pharo/blob/master/wiki/contents/howto.md
>>>
>>> On Sat, Sep 2, 2017 at 12:05 AM Peter Fisk <[hidden email]> wrote:
>>>
>>>> Hi everyone, The latest version of my "Rails Express" rapid application
>>>> development environment is built in Pharo 6.0. Here is a blog post with
>>>> a
>>>> few screenshots and some explanation.
>>>> https://railsexpress.quora.com/Pharo-6-Generating-Ruby-on-Rails-Applications
>>>> I mostly programmed in Smalltalk from 1987 until 1997 using ParcPlace
>>>> VisualWorks and then IBM VisualAge. Pharo is now better than either of
>>>> those two frameworks. Congratulations to the Pharo team for all your
>>>> great
>>>> work! Regards, -- Peter Fisk
>>>> ------------------------------
>>>> Sent from the Pharo Smalltalk Users mailing list archive
>>>> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at
>>>> Nabble.com.
>>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

Peter Fisk
In reply to this post by Peter Fisk
Hi everyone, The RailsExpress.com website will be updated over the coming days to reflect what I am currently working on in Pharo 6.0. I have found that the "Smalltalk like" environment in Ruby isn't powerful enough to implement a fully automated web application generator. That is why I changed to Pharo a couple of weeks ago - progress using Pharo has been incredibly fast. So, my primary focus from now on will be development using Pharo on my Macintosh. The "Smalltalk like" environment in Ruby actually uses an interpreter (written in Ruby) that was designed to run Smalltalk byte codes. It would be trivial to run Smalltalk instead of Ruby using the framework. The rational for running Ruby instead of Smalltalk was to make it more accessible to Ruby-on-Rails developers. An interesting fact is that the Ruby/Smalltalk interpreter is already running nicely on the web (in a Rails environment using Qooxdoo libraries for the GUI) and also running on my Mac using JRuby with a Java Swing GUI. And it could be used with some modifications to run Smalltalk in the same environments. My goal is to build an "AI" that can automate most of the work that web developers do. Smalltalk is the only environment that I know of that can implement such an AI in a short period of time. BTW, I have read the material about Pier and Magritte which is very interesting, especially in regards to the DSL. My approach to building the GUI has been to model the Qooxdoo class structure in Smalltalk and use the Smalltalk objects to build the required code when I send them a "renderOn: aStream" message. I will be posting more Pharo related information on my Rails Express Quora blog. Regards, -- Peter

Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

Stephane Ducasse-3
Hi peter

About magritte, feel free to extend it and let us know.

stef

On Thu, Sep 7, 2017 at 2:54 PM, Peter Fisk <[hidden email]> wrote:

> Hi everyone, The RailsExpress.com website will be updated over the coming
> days to reflect what I am currently working on in Pharo 6.0. I have found
> that the "Smalltalk like" environment in Ruby isn't powerful enough to
> implement a fully automated web application generator. That is why I changed
> to Pharo a couple of weeks ago - progress using Pharo has been incredibly
> fast. So, my primary focus from now on will be development using Pharo on my
> Macintosh. The "Smalltalk like" environment in Ruby actually uses an
> interpreter (written in Ruby) that was designed to run Smalltalk byte codes.
> It would be trivial to run Smalltalk instead of Ruby using the framework.
> The rational for running Ruby instead of Smalltalk was to make it more
> accessible to Ruby-on-Rails developers. An interesting fact is that the
> Ruby/Smalltalk interpreter is already running nicely on the web (in a Rails
> environment using Qooxdoo libraries for the GUI) and also running on my Mac
> using JRuby with a Java Swing GUI. And it could be used with some
> modifications to run Smalltalk in the same environments. My goal is to build
> an "AI" that can automate most of the work that web developers do. Smalltalk
> is the only environment that I know of that can implement such an AI in a
> short period of time. BTW, I have read the material about Pier and Magritte
> which is very interesting, especially in regards to the DSL. My approach to
> building the GUI has been to model the Qooxdoo class structure in Smalltalk
> and use the Smalltalk objects to build the required code when I send them a
> "renderOn: aStream" message. I will be posting more Pharo related
> information on my Rails Express Quora blog. Regards, -- Peter
> ________________________________
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

philippeback
In reply to this post by Peter Fisk
Peter,

How hard would it be to generate other languages? e.g. PHP for Zend Framework 2.

Best,

Phil

On Sep 7, 2017 14:54, "Peter Fisk" <[hidden email]> wrote:
Hi everyone, The RailsExpress.com website will be updated over the coming days to reflect what I am currently working on in Pharo 6.0. I have found that the "Smalltalk like" environment in Ruby isn't powerful enough to implement a fully automated web application generator. That is why I changed to Pharo a couple of weeks ago - progress using Pharo has been incredibly fast. So, my primary focus from now on will be development using Pharo on my Macintosh. The "Smalltalk like" environment in Ruby actually uses an interpreter (written in Ruby) that was designed to run Smalltalk byte codes. It would be trivial to run Smalltalk instead of Ruby using the framework. The rational for running Ruby instead of Smalltalk was to make it more accessible to Ruby-on-Rails developers. An interesting fact is that the Ruby/Smalltalk interpreter is already running nicely on the web (in a Rails environment using Qooxdoo libraries for the GUI) and also running on my Mac using JRuby with a Java Swing GUI. And it could be used with some modifications to run Smalltalk in the same environments. My goal is to build an "AI" that can automate most of the work that web developers do. Smalltalk is the only environment that I know of that can implement such an AI in a short period of time. BTW, I have read the material about Pier and Magritte which is very interesting, especially in regards to the DSL. My approach to building the GUI has been to model the Qooxdoo class structure in Smalltalk and use the Smalltalk objects to build the required code when I send them a "renderOn: aStream" message. I will be posting more Pharo related information on my Rails Express Quora blog. Regards, -- Peter

Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

Peter Fisk
Hi Phil,

I already have PHP support for CodeIgniter and Laravel.

Adding support for Zend Framework might take a day or so to implement.

Any framework which supports MVC and AJAX should be fairly easy to integrate
(eg Python/Django, NodeJS/Adonis, etc). The main difference amongst the
frameworks lies in the database object mappings.

The specific language support is handled by streams.

There are streams for HTML, CSS, JavaScript, PHP, Ruby, Python and
sub-streams for Ruby/Rails, JavaScript/Qooxdoo, and so on.

So, the framework is not at all Ruby or Ruby-on-Rails specific.

Cheers,

-- Peter




--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

philippeback
Nice. I'll definitely have a look because I need to prototype something quite domain heavy and it may help a lot.

Phil

On Fri, Sep 8, 2017 at 5:09 PM, Peter Fisk <[hidden email]> wrote:
Hi Phil,

I already have PHP support for CodeIgniter and Laravel.

Adding support for Zend Framework might take a day or so to implement.

Any framework which supports MVC and AJAX should be fairly easy to integrate
(eg Python/Django, NodeJS/Adonis, etc). The main difference amongst the
frameworks lies in the database object mappings.

The specific language support is handled by streams.

There are streams for HTML, CSS, JavaScript, PHP, Ruby, Python and
sub-streams for Ruby/Rails, JavaScript/Qooxdoo, and so on.

So, the framework is not at all Ruby or Ruby-on-Rails specific.

Cheers,

-- Peter




--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html



Reply | Threaded
Open this post in threaded view
|

Re: Pharo 6.0 Generating Ruby-on-Rails Applications

Hannes Hirzel
Maybe I should note that a Magritte is surely useful for ideas.
But a solution not using the Magritte modeling approach might be
better for the task of actually generating applications for different
systems / language environments.

Magritte is foremost about modelling domain objects to be used
_within_ the image. It is about descriptions (declarative style)
enriching the definitions of domain models.

A DSL following an imperative style (issuing  "build" commands) is
very fine as well.
The DSL code within the methods might be queried and model information
extracted in case of need if it is not explicit.

HH.

On 9/8/17, [hidden email] <[hidden email]> wrote:

> Nice. I'll definitely have a look because I need to prototype something
> quite domain heavy and it may help a lot.
>
> Phil
>
> On Fri, Sep 8, 2017 at 5:09 PM, Peter Fisk <[hidden email]> wrote:
>
>> Hi Phil,
>>
>> I already have PHP support for CodeIgniter and Laravel.
>>
>> Adding support for Zend Framework might take a day or so to implement.
>>
>> Any framework which supports MVC and AJAX should be fairly easy to
>> integrate
>> (eg Python/Django, NodeJS/Adonis, etc). The main difference amongst the
>> frameworks lies in the database object mappings.
>>
>> The specific language support is handled by streams.
>>
>> There are streams for HTML, CSS, JavaScript, PHP, Ruby, Python and
>> sub-streams for Ruby/Rails, JavaScript/Qooxdoo, and so on.
>>
>> So, the framework is not at all Ruby or Ruby-on-Rails specific.
>>
>> Cheers,
>>
>> -- Peter
>>
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
>>
>>
>