Jason's Google Code-in Blog

GCI Organization: FOSSASIA

REST API with Teapot

smalltalk

Today, my task was to write a REST API in Pharo using the Teapot framework. Teapot is a packaged designed to make making REST APIs with Pharo A LOT easier than writing a REST API from scratch in Zinc. For example, to output Hello World when a user navigates to /hello, this is all the code that is needed: Teapot on GET: '/welcome' -> 'Hello World!'; start. I wrote a package named UserAPI on SmallTalkHub that relies on the ContactManager package here to retrieve a list of users and display it as JSON in the browser after a user navigates to /users.

24 Jan 2016 #smalltalk #pharo #teapot #squeak #rest #api #zinc

Creating a Web App with Zinc

smalltalk

Working with Zinc on Pharo Smalltalk to create a small web application was extremely different than creating a Web App with PHP, NodeJS, or even Python. Zinc is a framework in smalltalk that deals with the HTTP networking protocol using the reference platform of Pharo. I have followed this tutorial to develop a web app which allows the user to change the picture. I have to say that the process was a lot more complicated than I thought.

21 Jan 2016 #pharo #smalltalk #zinc #webserver