Mastering form extension is very important because when you are writing modern web services, almost always you will be using form extension to take input from users.  You will be using form extensions frequently for ever, so better master this first.

You can refer to full class documentation here.

The basic form is like this

which generate html code like below

We usually have two types of forms, one that link to the model and one that is not link to the model.

We will look more into how you can build model that work well with forms later.

Gurunavi Web Service

Gurunavi is one the largest and popular restaurant listing service in Japan. They provide great web service to let you search and list all restaurants in multiple languages.

The link is

You have to first register from this page, and get access ID.

Let’s say;
I want to be able to search restaurants in Japan by prefectures or metropolitan areas.  I will call API to get list of prefectures or areas, then be able to click them then show the list of restaurants in the specific prefectures or areas.

Create API URL below;

Then you ll get response like;

The list of area is probably not going to be updated for long, and up to little less than 50 prefectures, so instead of making call to Gurunavi server every time, I fetch the list and store them locally or just hard code them. But if you are to make call to API and build links from server side when the page is load. I ll make new model called gAreaMasterModels as a container for Area data Gurunavi passes like below;

Expected API response is like below;

and Model is below;

Then I create controllers, which load xml response from gurunavi and put them into variable g.



Services to check later.

This is list of great services that I want to review later.  I will check them, use them, and post more later individually.