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 |
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 <[hidden email]>: > 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. > |
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. |
In reply to this post by Attila Magyar
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 <[hidden email]> 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 <[hidden email]> wrote: Hi Attila, "Every thing has its own flow"
|
In reply to this post by Sven Van Caekenberghe-2
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. 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. Thanks, that's better. |
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 <[hidden email]> wrote: Sven Van Caekenberghe-2 wrote |
In reply to this post by Attila Magyar
Cool! Smalltalk web stack keeps getting better and better! Cheers, Javier On Sun, Aug 24, 2014 at 7:48 PM, Attila Magyar <[hidden email]> wrote: Hello, Javier Pimás
Ciudad de Buenos Aires |
Great work!! Regards, Thushar On Mon, Aug 25, 2014 at 5:08 AM, Javier Pimás <[hidden email]> wrote:
|
Administrator
|
In reply to this post by Tudor Girba-2
Really great feedback - why not add a few of these quotes to the doc as a little marketing :)
Cheers,
Sean |
In reply to this post by Attila Magyar
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. > > |
In reply to this post by philippeback
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, [hidden email] <[hidden email]> wrote:
|
So beatiful. 2014-08-25 13:37 GMT+02:00 François Stephany <[hidden email]>:
|
In reply to this post by fstephany
On Mon, Aug 25, 2014 at 1:37 PM, François Stephany <[hidden email]> wrote:
Hey, sweet!
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.
|
In reply to this post by Santiago Bragagnolo
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? |
Teapot: Pharo web REST framework, it ain’t microOn Mon, Aug 25, 2014 at 11:06 PM, Attila Magyar <[hidden email]> wrote: Santiago Bragagnolo 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:
|
Thanks for the observation.
On Thu, Aug 28, 2014 at 2:34 PM, Ben Coman <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |