[ANN] Teapot 0.8 micro web framework
Hello, I'd like to announce a new micro web framework called Teapot. It follows a similar philosophy than other lightweight frameworks like Sinatra/Bottle/Flask/Spark. Teapot is built on top of the Zn HTTP components, and less than 500 lines long. More info: http://smalltalkhub.com/#!/~zeroflag/Teapot Attila -- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Wow! I like it. And very well documented. I like many things about it. But why use uppercase selectors for HTTP methods? I can guess you want to "mimic" the HTTP messages, but it reads weird... Thank you! Esteban A. Maringolo 2014-08-24 15:48 GMT-03:00 Attila Magyar <m.magyar3@gmail.com>:
Hello,
I'd like to announce a new micro web framework called Teapot. It follows a similar philosophy than other lightweight frameworks like Sinatra/Bottle/Flask/Spark. Teapot is built on top of the Zn HTTP components, and less than 500 lines long.
More info:
http://smalltalkhub.com/#!/~zeroflag/Teapot
Attila
-- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Esteban A. Maringolo wrote
But why use uppercase selectors for HTTP methods?
I was struggling with the syntax for a while than I end up having this. I thought it can make easier to see where the route definitions start and end if there are many. And it looks like a HTTP method, as you said too. -- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449p4774454.h... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Hi Attila, This is great work and well documented too. Beautiful. This is an excellent layer on top of Zn. Are there any tests ? Examples ? How do you load your dependencies, like NeoJSON or STON ? If you need anything from Zn that is not yet provided, please ask. I would be happy to help. It is impressive that you did all this without any direct questions ! Cool name too ! Sven PS: Most people don't seem to know, but you can load a #stable version in one expression: Gofer it smalltalkhubUser: 'zeroflag' project: 'Teapot'; configuration; loadStable. It is just more elegant I think. There are some variants of this API as well, check the Gofer class. On 24 Aug 2014, at 20:48, Attila Magyar <m.magyar3@gmail.com> wrote:
Hello,
I'd like to announce a new micro web framework called Teapot. It follows a similar philosophy than other lightweight frameworks like Sinatra/Bottle/Flask/Spark. Teapot is built on top of the Zn HTTP components, and less than 500 lines long.
More info:
http://smalltalkhub.com/#!/~zeroflag/Teapot
Attila
-- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
-- Sven Van Caekenberghe Proudly supporting Pharo http://pharo.org http://association.pharo.org http://consortium.pharo.org
One word comes to mind to describe this piece of work: Elegant! Doru On Sun, Aug 24, 2014 at 10:23 PM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
Hi Attila,
This is great work and well documented too. Beautiful. This is an excellent layer on top of Zn.
Are there any tests ? Examples ?
How do you load your dependencies, like NeoJSON or STON ?
If you need anything from Zn that is not yet provided, please ask. I would be happy to help. It is impressive that you did all this without any direct questions !
Cool name too !
Sven
PS: Most people don't seem to know, but you can load a #stable version in one expression:
Gofer it smalltalkhubUser: 'zeroflag' project: 'Teapot'; configuration; loadStable.
It is just more elegant I think. There are some variants of this API as well, check the Gofer class.
On 24 Aug 2014, at 20:48, Attila Magyar <m.magyar3@gmail.com> wrote:
Hello,
I'd like to announce a new micro web framework called Teapot. It follows a similar philosophy than other lightweight frameworks like Sinatra/Bottle/Flask/Spark. Teapot is built on top of the Zn HTTP components, and less than 500 lines long.
More info:
http://smalltalkhub.com/#!/~zeroflag/Teapot
Attila
-- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
-- Sven Van Caekenberghe Proudly supporting Pharo http://pharo.org http://association.pharo.org http://consortium.pharo.org
-- www.tudorgirba.com "Every thing has its own flow"
Tudor Girba-2 wrote
One word comes to mind to describe this piece of work: Elegant!
Really great feedback - why not add a few of these quotes to the doc as a little marketing :) ----- Cheers, Sean -- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449p4774486.h... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Sven Van Caekenberghe-2 wrote
Are there any tests ? Examples ?
There is a test package, but it is not part of the metacello config. You can see it, if you add the repositiory and load the project from there. There are no large examples so far, only the REST like book app on the smalltalkhub wiki. Sven Van Caekenberghe-2 wrote
How do you load your dependencies, like NeoJSON or STON ?
I consider them as optional dependencies therefore they are not loaded. If someone wants to use them they will need to load them from the config browser. From the code I don't refer to them directly but with the "Smalltalk at: #NeoJSON" expression, so the projects loads and works without them, if they are not used. Probably I will add some metacello stuff later to make it easier to load them. Sven Van Caekenberghe-2 wrote
If you need anything from Zn that is not yet provided, please ask. I would be happy to help. It is impressive that you did all this without any direct questions !
Cool name too !
Sven
PS: Most people don't seem to know, but you can load a #stable version in one expression:
Gofer it smalltalkhubUser: 'zeroflag' project: 'Teapot'; configuration; loadStable.
It is just more elegant I think. There are some variants of this API as well, check the Gofer class.
Thanks, that's better. -- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449p4774467.h... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Great tool to have. Definitely easier than doing everything in Zn or Seaside REST for getting something done quick. For hackathons, this is quite useful for sure! We should have a lineup of tools like that that allow us to shine during such events in order to promote Pharo. http://checkthis.com/hackathonbxl is one I go to in october. The monitor on the right is mine during a previous hackathon and what is on it is... Pharo ! (The guy on the picture was my team mate. He is a Scala guy). What would you think makes sense in such a stack beyond Teapot? MongoTalk, ZnEasy, Roassal, Mapless, ... Phil On Sun, Aug 24, 2014 at 10:40 PM, Attila Magyar <m.magyar3@gmail.com> wrote:
Sven Van Caekenberghe-2 wrote
Are there any tests ? Examples ?
There is a test package, but it is not part of the metacello config. You can see it, if you add the repositiory and load the project from there. There are no large examples so far, only the REST like book app on the smalltalkhub wiki.
Sven Van Caekenberghe-2 wrote
How do you load your dependencies, like NeoJSON or STON ?
I consider them as optional dependencies therefore they are not loaded. If someone wants to use them they will need to load them from the config browser. From the code I don't refer to them directly but with the "Smalltalk at: #NeoJSON" expression, so the projects loads and works without them, if they are not used. Probably I will add some metacello stuff later to make it easier to load them.
Sven Van Caekenberghe-2 wrote
If you need anything from Zn that is not yet provided, please ask. I would be happy to help. It is impressive that you did all this without any direct questions !
Cool name too !
Sven
PS: Most people don't seem to know, but you can load a #stable version in one expression:
Gofer it smalltalkhubUser: 'zeroflag' project: 'Teapot'; configuration; loadStable.
It is just more elegant I think. There are some variants of this API as well, check the Gofer class.
Thanks, that's better.
-- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449p4774467.h... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Phil, I'm going there as well ;) The idea is to see what we can do with GTInspector / Roassal (and maybe https://github.com/fstephany/OSMMaps). Attila, I played a little bit with Teapot last week during ESUG and was wondering what is your flow when you are designing/experimenting an API with Teapot? Do you reset the instance everytime you modify/add a route? Thanks a lot for this, it feels like the right amount of abstraction between bare Zinc and fully loaded Seaside ! On Mon, Aug 25, 2014 at 12:06 AM, phil@highoctane.be <phil@highoctane.be> wrote:
Great tool to have.
Definitely easier than doing everything in Zn or Seaside REST for getting something done quick.
For hackathons, this is quite useful for sure!
We should have a lineup of tools like that that allow us to shine during such events in order to promote Pharo.
http://checkthis.com/hackathonbxl is one I go to in october.
The monitor on the right is mine during a previous hackathon and what is on it is... Pharo ! (The guy on the picture was my team mate. He is a Scala guy).
What would you think makes sense in such a stack beyond Teapot?
MongoTalk, ZnEasy, Roassal, Mapless, ...
Phil
On Sun, Aug 24, 2014 at 10:40 PM, Attila Magyar <m.magyar3@gmail.com> wrote:
Sven Van Caekenberghe-2 wrote
Are there any tests ? Examples ?
There is a test package, but it is not part of the metacello config. You can see it, if you add the repositiory and load the project from there. There are no large examples so far, only the REST like book app on the smalltalkhub wiki.
Sven Van Caekenberghe-2 wrote
How do you load your dependencies, like NeoJSON or STON ?
I consider them as optional dependencies therefore they are not loaded. If someone wants to use them they will need to load them from the config browser. From the code I don't refer to them directly but with the "Smalltalk at: #NeoJSON" expression, so the projects loads and works without them, if they are not used. Probably I will add some metacello stuff later to make it easier to load them.
Sven Van Caekenberghe-2 wrote
If you need anything from Zn that is not yet provided, please ask. I would be happy to help. It is impressive that you did all this without any direct questions !
Cool name too !
Sven
PS: Most people don't seem to know, but you can load a #stable version in one expression:
Gofer it smalltalkhubUser: 'zeroflag' project: 'Teapot'; configuration; loadStable.
It is just more elegant I think. There are some variants of this API as well, check the Gofer class.
Thanks, that's better.
-- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449p4774467.h... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
So beatiful. 2014-08-25 13:37 GMT+02:00 François Stephany <tulipe.moutarde@gmail.com>:
Phil, I'm going there as well ;) The idea is to see what we can do with GTInspector / Roassal (and maybe https://github.com/fstephany/OSMMaps).
Attila, I played a little bit with Teapot last week during ESUG and was wondering what is your flow when you are designing/experimenting an API with Teapot? Do you reset the instance everytime you modify/add a route?
Thanks a lot for this, it feels like the right amount of abstraction between bare Zinc and fully loaded Seaside !
On Mon, Aug 25, 2014 at 12:06 AM, phil@highoctane.be <phil@highoctane.be> wrote:
Great tool to have.
Definitely easier than doing everything in Zn or Seaside REST for getting something done quick.
For hackathons, this is quite useful for sure!
We should have a lineup of tools like that that allow us to shine during such events in order to promote Pharo.
http://checkthis.com/hackathonbxl is one I go to in october.
The monitor on the right is mine during a previous hackathon and what is on it is... Pharo ! (The guy on the picture was my team mate. He is a Scala guy).
What would you think makes sense in such a stack beyond Teapot?
MongoTalk, ZnEasy, Roassal, Mapless, ...
Phil
On Sun, Aug 24, 2014 at 10:40 PM, Attila Magyar <m.magyar3@gmail.com> wrote:
Sven Van Caekenberghe-2 wrote
Are there any tests ? Examples ?
There is a test package, but it is not part of the metacello config. You can see it, if you add the repositiory and load the project from there. There are no large examples so far, only the REST like book app on the smalltalkhub wiki.
Sven Van Caekenberghe-2 wrote
How do you load your dependencies, like NeoJSON or STON ?
I consider them as optional dependencies therefore they are not loaded. If someone wants to use them they will need to load them from the config browser. From the code I don't refer to them directly but with the "Smalltalk at: #NeoJSON" expression, so the projects loads and works without them, if they are not used. Probably I will add some metacello stuff later to make it easier to load them.
Sven Van Caekenberghe-2 wrote
If you need anything from Zn that is not yet provided, please ask. I would be happy to help. It is impressive that you did all this without any direct questions !
Cool name too !
Sven
PS: Most people don't seem to know, but you can load a #stable version in one expression:
Gofer it smalltalkhubUser: 'zeroflag' project: 'Teapot'; configuration; loadStable.
It is just more elegant I think. There are some variants of this API as well, check the Gofer class.
Thanks, that's better.
-- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449p4774467.h... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Santiago Bragagnolo wrote
I played a little bit with Teapot last week during ESUG and was wondering what is your flow when you are designing/experimenting an API with Teapot? Do you reset the instance everytime you modify/add a route?
I'm not sure i understand it correctly. The routes are stored in a router in an OrderedCollection. If you say teapot GET: '/foo/bar' -> someAction A new Route will be created with the given url pattern, action, http method and default response transformer. The first 3 things cannot be modifed later, but the response transformer can. So if you say: teapot GET: '/foo/bar' -> someAction; output: #ston Then the ston transformer will be added to the current route, after the route was added to the router. Teapot stores a reference to the current route to be able to do this. In the future there may be other messages (eg. filtering based on the content-type or other request properties). The reason for doing this is to avoid the combinatorial explosion of method numbers (there is no need to implement GET:output:, POST:output:, etc..). Is it an answer for your question or did you mean something else? -- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449p4774693.h... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
The framework is nice.. and addictive to play with as stated before, well documented, clean and easy.. ! Potentially a good tool to weave into any app. My quick play with the framework, surprised me with its productive usage.. so here it goes.. Teapot: Pharo web REST framework, it ainât micro <https://skrishnamachari.wordpress.com/2014/08/28/teapot-pharo-web-rest-frame...> On Mon, Aug 25, 2014 at 11:06 PM, Attila Magyar <m.magyar3@gmail.com> wrote:
Santiago Bragagnolo wrote
I played a little bit with Teapot last week during ESUG and was wondering what is your flow when you are designing/experimenting an API with Teapot? Do you reset the instance everytime you modify/add a route?
I'm not sure i understand it correctly. The routes are stored in a router in an OrderedCollection. If you say
teapot GET: '/foo/bar' -> someAction
A new Route will be created with the given url pattern, action, http method and default response transformer. The first 3 things cannot be modifed later, but the response transformer can. So if you say:
teapot GET: '/foo/bar' -> someAction; output: #ston
Then the ston transformer will be added to the current route, after the route was added to the router. Teapot stores a reference to the current route to be able to do this. In the future there may be other messages (eg. filtering based on the content-type or other request properties). The reason for doing this is to avoid the combinatorial explosion of method numbers (there is no need to implement GET:output:, POST:output:, etc..).
Is it an answer for your question or did you mean something else?
-- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449p4774693.h... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Thanks for the observation. In the age of text chats and SMS, not that I do either of them, we forget the art of writing well. On Thu, Aug 28, 2014 at 2:34 PM, Ben Coman <btc@openinworld.com> wrote:
I haven't the time play with it right now, but its a good read. Just some minor grammar feedback...
you are quicker off the block you are quickly off the block
This also provides a flexibility in scaling This also provides flexibility in scaling
cheers -ben
S Krish wrote:
The framework is nice.. and addictive to play with as stated before, well documented, clean and easy.. !
Potentially a good tool to weave into any app. My quick play with the framework, surprised me with its productive usage.. so here it goes.. Teapot: Pharo web REST framework, it ainât micro <https://skrishnamachari.wordpress.com/2014/08/28/teapot-pharo-web-rest-frame...>
On Mon, Aug 25, 2014 at 11:06 PM, Attila Magyar <m.magyar3@gmail.com> wrote:
Santiago Bragagnolo wrote
I played a little bit with Teapot last week during ESUG and was wondering what is your flow when you are designing/experimenting an API with Teapot? Do you reset the instance everytime you modify/add a route?
I'm not sure i understand it correctly. The routes are stored in a router in an OrderedCollection. If you say
teapot GET: '/foo/bar' -> someAction
A new Route will be created with the given url pattern, action, http method and default response transformer. The first 3 things cannot be modifed later, but the response transformer can. So if you say:
teapot GET: '/foo/bar' -> someAction; output: #ston
Then the ston transformer will be added to the current route, after the route was added to the router. Teapot stores a reference to the current route to be able to do this. In the future there may be other messages (eg. filtering based on the content-type or other request properties). The reason for doing this is to avoid the combinatorial explosion of method numbers (there is no need to implement GET:output:, POST:output:, etc..).
Is it an answer for your question or did you mean something else?
-- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449p4774693.h... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On Mon, Aug 25, 2014 at 1:37 PM, François Stephany < tulipe.moutarde@gmail.com> wrote:
Phil, I'm going there as well ;)
Hey, sweet!
The idea is to see what we can do with GTInspector / Roassal (and maybe https://github.com/fstephany/OSMMaps).
I am more on a webapp / Seaside kind of thing. But yeah, GTInspector/Playground are definitely nice to have. Need to learn on the Playground. Inspector is ok.
Attila, I played a little bit with Teapot last week during ESUG and was wondering what is your flow when you are designing/experimenting an API with Teapot? Do you reset the instance everytime you modify/add a route?
Thanks a lot for this, it feels like the right amount of abstraction between bare Zinc and fully loaded Seaside !
On Mon, Aug 25, 2014 at 12:06 AM, phil@highoctane.be <phil@highoctane.be> wrote:
Great tool to have.
Definitely easier than doing everything in Zn or Seaside REST for getting something done quick.
For hackathons, this is quite useful for sure!
We should have a lineup of tools like that that allow us to shine during such events in order to promote Pharo.
http://checkthis.com/hackathonbxl is one I go to in october.
The monitor on the right is mine during a previous hackathon and what is on it is... Pharo ! (The guy on the picture was my team mate. He is a Scala guy).
What would you think makes sense in such a stack beyond Teapot?
MongoTalk, ZnEasy, Roassal, Mapless, ...
Phil
On Sun, Aug 24, 2014 at 10:40 PM, Attila Magyar <m.magyar3@gmail.com> wrote:
Sven Van Caekenberghe-2 wrote
Are there any tests ? Examples ?
There is a test package, but it is not part of the metacello config. You can see it, if you add the repositiory and load the project from there. There are no large examples so far, only the REST like book app on the smalltalkhub wiki.
Sven Van Caekenberghe-2 wrote
How do you load your dependencies, like NeoJSON or STON ?
I consider them as optional dependencies therefore they are not loaded. If someone wants to use them they will need to load them from the config browser. From the code I don't refer to them directly but with the "Smalltalk at: #NeoJSON" expression, so the projects loads and works without them, if they are not used. Probably I will add some metacello stuff later to make it easier to load them.
Sven Van Caekenberghe-2 wrote
If you need anything from Zn that is not yet provided, please ask. I would be happy to help. It is impressive that you did all this without any direct questions !
Cool name too !
Sven
PS: Most people don't seem to know, but you can load a #stable version in one expression:
Gofer it smalltalkhubUser: 'zeroflag' project: 'Teapot'; configuration; loadStable.
It is just more elegant I think. There are some variants of this API as well, check the Gofer class.
Thanks, that's better.
-- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449p4774467.h... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Cool! Smalltalk web stack keeps getting better and better! Cheers, Javier On Sun, Aug 24, 2014 at 7:48 PM, Attila Magyar <m.magyar3@gmail.com> wrote:
Hello,
I'd like to announce a new micro web framework called Teapot. It follows a similar philosophy than other lightweight frameworks like Sinatra/Bottle/Flask/Spark. Teapot is built on top of the Zn HTTP components, and less than 500 lines long.
More info:
http://smalltalkhub.com/#!/~zeroflag/Teapot
Attila
-- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
-- Javier Pimás Ciudad de Buenos Aires
Great work!! Regards, Thushar On Mon, Aug 25, 2014 at 5:08 AM, Javier Pimás <elpochodelagente@gmail.com> wrote:
Cool! Smalltalk web stack keeps getting better and better!
Cheers, Javier
On Sun, Aug 24, 2014 at 7:48 PM, Attila Magyar <m.magyar3@gmail.com> wrote:
Hello,
I'd like to announce a new micro web framework called Teapot. It follows a similar philosophy than other lightweight frameworks like Sinatra/Bottle/Flask/Spark. Teapot is built on top of the Zn HTTP components, and less than 500 lines long.
More info:
http://smalltalkhub.com/#!/~zeroflag/Teapot
Attila
-- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
-- Javier Pimás Ciudad de Buenos Aires
Excellent! I saw that yesterday and it can be a great engine to teach how to build web server. I will look at it after October because this looks really cool. BTW why don't you call it with the name of a little tribe :) On 24/8/14 20:48, Attila Magyar wrote:
Hello,
I'd like to announce a new micro web framework called Teapot. It follows a similar philosophy than other lightweight frameworks like Sinatra/Bottle/Flask/Spark. Teapot is built on top of the Zn HTTP components, and less than 500 lines long.
More info:
http://smalltalkhub.com/#!/~zeroflag/Teapot
Attila
-- View this message in context: http://forum.world.st/ANN-Teapot-0-8-micro-web-framework-tp4774449.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (13)
-
Attila Magyar -
Ben Coman -
Esteban A. Maringolo -
François Stephany -
Javier Pimás -
phil@highoctane.be -
S Krish -
Santiago Bragagnolo -
Sean P. DeNigris -
stepharo -
Sven Van Caekenberghe -
Thushar G R -
Tudor Girba