Sinatra-like framework?

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

Sinatra-like framework?

senTalker
Hello,

before I roll-out my own solution, I thought I should ask:

Are you aware of a Sinatra-like web-framework for Pharo?

http://www.sinatrarb.com/

Or can Zinc-HTTP do that more or less out-of-the-box?

Thanks!


Sebastian

P.S. As far as I understood Seaside-REST is not aimed at web-pages.

Reply | Threaded
Open this post in threaded view
|

Re: Sinatra-like framework?

Paul DeBruicker
Ratpack by Tim Felgentreff:  http://ss3.gemstone.com/ss/RatPack.html

He also has a repo for it up on github and I don't know which has the
most recent code


On 12/02/2012 02:50 PM, Sebastian Nozzi wrote:

> Hello,
>
> before I roll-out my own solution, I thought I should ask:
>
> Are you aware of a Sinatra-like web-framework for Pharo?
>
> http://www.sinatrarb.com/
>
> Or can Zinc-HTTP do that more or less out-of-the-box?
>
> Thanks!
>
>
> Sebastian
>
> P.S. As far as I understood Seaside-REST is not aimed at web-pages.
>


Reply | Threaded
Open this post in threaded view
|

Re: Sinatra-like framework?

senTalker
Thanks!

If you have a Stackoverflow account, you can add your answer here.

http://stackoverflow.com/questions/13674859/sinatra-like-web-framework-for-pharo-smalltalk

Otherwise I will answer the question myself, for future reference ;-)


2012/12/3 Paul DeBruicker <[hidden email]>:

> Ratpack by Tim Felgentreff:  http://ss3.gemstone.com/ss/RatPack.html
>
> He also has a repo for it up on github and I don't know which has the
> most recent code
>
>
> On 12/02/2012 02:50 PM, Sebastian Nozzi wrote:
>> Hello,
>>
>> before I roll-out my own solution, I thought I should ask:
>>
>> Are you aware of a Sinatra-like web-framework for Pharo?
>>
>> http://www.sinatrarb.com/
>>
>> Or can Zinc-HTTP do that more or less out-of-the-box?
>>
>> Thanks!
>>
>>
>> Sebastian
>>
>> P.S. As far as I understood Seaside-REST is not aimed at web-pages.
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Sinatra-like framework?

Stéphane Ducasse
In reply to this post by senTalker
Philippe marshall presented a solution in seaside at ESUG this year. So it is really possible.

Stef



On Dec 2, 2012, at 11:50 PM, Sebastian Nozzi wrote:

> Hello,
>
> before I roll-out my own solution, I thought I should ask:
>
> Are you aware of a Sinatra-like web-framework for Pharo?
>
> http://www.sinatrarb.com/
>
> Or can Zinc-HTTP do that more or less out-of-the-box?
>
> Thanks!
>
>
> Sebastian
>
> P.S. As far as I understood Seaside-REST is not aimed at web-pages.
>


Reply | Threaded
Open this post in threaded view
|

Re: Sinatra-like framework?

Stéphane Ducasse
In reply to this post by senTalker
I know that sven has a restful api on top of zinc.

Stef

On Dec 2, 2012, at 11:50 PM, Sebastian Nozzi wrote:

> Hello,
>
> before I roll-out my own solution, I thought I should ask:
>
> Are you aware of a Sinatra-like web-framework for Pharo?
>
> http://www.sinatrarb.com/
>
> Or can Zinc-HTTP do that more or less out-of-the-box?
>
> Thanks!
>
>
> Sebastian
>
> P.S. As far as I understood Seaside-REST is not aimed at web-pages.
>


Reply | Threaded
Open this post in threaded view
|

Re: Sinatra-like framework?

senTalker
In reply to this post by Stéphane Ducasse
2012/12/4 Stéphane Ducasse <[hidden email]>:
> Philippe marshall presented a solution in seaside at ESUG this year. So it is really possible.

You mean this?

http://www.slideshare.net/esug/advanced-seaside (slide 19)

I took a look at Seaside-REST and it seems this is already supported
there... (?)

Reply | Threaded
Open this post in threaded view
|

Re: Sinatra-like framework?

Janko Mivšek
In reply to this post by senTalker
Hi Sebastian,

Dne 02. 12. 2012 23:50, piše Sebastian Nozzi:
> Hello,
>
> before I roll-out my own solution, I thought I should ask:
>
> Are you aware of a Sinatra-like web-framework for Pharo?
>
> http://www.sinatrarb.com/
>
> Or can Zinc-HTTP do that more or less out-of-the-box?

What are your primary expectations? Simplicity, REST, flexibility, for
what kind of web apps?

Best regards
Janko

--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si

Reply | Threaded
Open this post in threaded view
|

Re: Sinatra-like framework?

senTalker
Hi Janko,

well, what I am looking for is:

* "nice" URLs (without Seaside-like session/callback query-parameters)
* simple URL mapping
* helping functionality (for dealing with query-params, cookies,
setting/getting HTTP headers, etc.)

Let's say for implementing a blog, or a simple web-page with basic
nagivation. Don't think I need more at the moment.

Best regards,
Sebastian

2012/12/4 Janko Mivšek <[hidden email]>:

> Hi Sebastian,
>
> Dne 02. 12. 2012 23:50, piše Sebastian Nozzi:
>> Hello,
>>
>> before I roll-out my own solution, I thought I should ask:
>>
>> Are you aware of a Sinatra-like web-framework for Pharo?
>>
>> http://www.sinatrarb.com/
>>
>> Or can Zinc-HTTP do that more or less out-of-the-box?
>
> What are your primary expectations? Simplicity, REST, flexibility, for
> what kind of web apps?
>
> Best regards
> Janko
>
> --
> Janko Mivšek
> Aida/Web
> Smalltalk Web Application Server
> http://www.aidaweb.si

Reply | Threaded
Open this post in threaded view
|

Re: Sinatra-like framework?

senTalker
With "URL mapping" I mean to variables/parameters, like:

/blog/post/{id}/{slur}

respondWithPost: id slur: slur
^ 'html for post'

Since I see you are involved with Aida... can Aida do something like
that? I am not much familiar with it...

Best regards,
Sebastian


2012/12/4 Sebastian Nozzi <[hidden email]>:

> Hi Janko,
>
> well, what I am looking for is:
>
> * "nice" URLs (without Seaside-like session/callback query-parameters)
> * simple URL mapping
> * helping functionality (for dealing with query-params, cookies,
> setting/getting HTTP headers, etc.)
>
> Let's say for implementing a blog, or a simple web-page with basic
> nagivation. Don't think I need more at the moment.
>
> Best regards,
> Sebastian
>
> 2012/12/4 Janko Mivšek <[hidden email]>:
>> Hi Sebastian,
>>
>> Dne 02. 12. 2012 23:50, piše Sebastian Nozzi:
>>> Hello,
>>>
>>> before I roll-out my own solution, I thought I should ask:
>>>
>>> Are you aware of a Sinatra-like web-framework for Pharo?
>>>
>>> http://www.sinatrarb.com/
>>>
>>> Or can Zinc-HTTP do that more or less out-of-the-box?
>>
>> What are your primary expectations? Simplicity, REST, flexibility, for
>> what kind of web apps?
>>
>> Best regards
>> Janko
>>
>> --
>> Janko Mivšek
>> Aida/Web
>> Smalltalk Web Application Server
>> http://www.aidaweb.si

Reply | Threaded
Open this post in threaded view
|

Re: Sinatra-like framework?

Janko Mivšek
In reply to this post by senTalker
Dne 04. 12. 2012 16:24, piše Sebastian Nozzi:

> Hi Janko,
>
> well, what I am looking for is:
>
> * "nice" URLs (without Seaside-like session/callback query-parameters)
> * simple URL mapping
> * helping functionality (for dealing with query-params, cookies,
> setting/getting HTTP headers, etc.)
>
> Let's say for implementing a blog, or a simple web-page with basic
> nagivation. Don't think I need more at the moment.

Look at Aida tutorial to see if it suits your needs:

        http://www.aidaweb.si/tutorial
       
For blog there is a Scribo CMS addon with (a bit outdated) blog
included. Wiki and website functionality is up to date.

Best regards
Janko

>
> Best regards,
> Sebastian
>
> 2012/12/4 Janko Mivšek <[hidden email]>:
>> Hi Sebastian,
>>
>> Dne 02. 12. 2012 23:50, piše Sebastian Nozzi:
>>> Hello,
>>>
>>> before I roll-out my own solution, I thought I should ask:
>>>
>>> Are you aware of a Sinatra-like web-framework for Pharo?
>>>
>>> http://www.sinatrarb.com/
>>>
>>> Or can Zinc-HTTP do that more or less out-of-the-box?
>>
>> What are your primary expectations? Simplicity, REST, flexibility, for
>> what kind of web apps?
>>
>> Best regards
>> Janko


--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si

Reply | Threaded
Open this post in threaded view
|

Re: Sinatra-like framework?

senTalker
Just briefly looking at the documentation. Looks good, will try it out, thanks!

2012/12/4 Janko Mivšek <[hidden email]>:

> Dne 04. 12. 2012 16:24, piše Sebastian Nozzi:
> Look at Aida tutorial to see if it suits your needs:
>
>         http://www.aidaweb.si/tutorial
>
> For blog there is a Scribo CMS addon with (a bit outdated) blog
> included. Wiki and website functionality is up to date.
>
> Best regards
> Janko

Reply | Threaded
Open this post in threaded view
|

Re: Sinatra-like framework?

Janko Mivšek
In reply to this post by senTalker
Dne 04. 12. 2012 16:31, piše Sebastian Nozzi:
> With "URL mapping" I mean to variables/parameters, like:
>
> /blog/post/{id}/{slur}
>
> respondWithPost: id slur: slur
> ^ 'html for post'
>
> Since I see you are involved with Aida... can Aida do something like
> that? I am not much familiar with it...

Aida has a pluggable router so you can plug your own routing scheme
besides default ones. I'd implement your example in something like these
steps:

1. create a standalone App class, say MyBlogApp, as a subclass of
   WebApplication
2. register it in a router:

   AIDASite default router
      addRoutePattern: '/blog/post/*'
      handler: MyBlogApp new

3. create #resouceFor: method in MyBlogApp to return itself
4. continue writing the standard Aida way by implementing #viewMain etc.
5. extracting {id} and {slur} part by accessing the url of the last request:

        self session lastRequest urlString

... and so on.

To ease all of this we can add an additional routing functionality to
Aida to be available by default, after collecting some experience, how
is the best way to do this. If you are interested to help ... :)

Best regards
Janko



>
> Best regards,
> Sebastian
>
>
> 2012/12/4 Sebastian Nozzi <[hidden email]>:
>> Hi Janko,
>>
>> well, what I am looking for is:
>>
>> * "nice" URLs (without Seaside-like session/callback query-parameters)
>> * simple URL mapping
>> * helping functionality (for dealing with query-params, cookies,
>> setting/getting HTTP headers, etc.)
>>
>> Let's say for implementing a blog, or a simple web-page with basic
>> nagivation. Don't think I need more at the moment.
>>
>> Best regards,
>> Sebastian
>>
>> 2012/12/4 Janko Mivšek <[hidden email]>:
>>> Hi Sebastian,
>>>
>>> Dne 02. 12. 2012 23:50, piše Sebastian Nozzi:
>>>> Hello,
>>>>
>>>> before I roll-out my own solution, I thought I should ask:
>>>>
>>>> Are you aware of a Sinatra-like web-framework for Pharo?
>>>>
>>>> http://www.sinatrarb.com/
>>>>
>>>> Or can Zinc-HTTP do that more or less out-of-the-box?
>>>
>>> What are your primary expectations? Simplicity, REST, flexibility, for
>>> what kind of web apps?
>>>
>>> Best regards
>>> Janko
--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si