diff options
Diffstat (limited to 'content/posts/2021-12-30-wap-mobile-web-before-the-web.md')
| -rw-r--r-- | content/posts/2021-12-30-wap-mobile-web-before-the-web.md | 87 |
1 files changed, 44 insertions, 43 deletions
diff --git a/content/posts/2021-12-30-wap-mobile-web-before-the-web.md b/content/posts/2021-12-30-wap-mobile-web-before-the-web.md index 1ee82b5..6c598fe 100644 --- a/content/posts/2021-12-30-wap-mobile-web-before-the-web.md +++ b/content/posts/2021-12-30-wap-mobile-web-before-the-web.md | |||
| @@ -7,14 +7,15 @@ draft: false | |||
| 7 | 7 | ||
| 8 | ## A little stroll down the history lane | 8 | ## A little stroll down the history lane |
| 9 | 9 | ||
| 10 | About two weeks ago, I watched this outstanding documentary on YouTube | 10 | About two weeks ago, I watched this outstanding documentary on YouTube |
| 11 | [Springboard: the secret history of the first real smartphone](https://www.youtube.com/watch?v=b9_Vh9h3Ohw) | 11 | [Springboard: the secret history of the first real |
| 12 | about the history of smartphones and phones in general. It brought back so many | 12 | smartphone](https://www.youtube.com/watch?v=b9_Vh9h3Ohw) about the history of |
| 13 | memories. I never had an actual smartphone before the Android. The closest to | 13 | smartphones and phones in general. It brought back so many memories. I never had |
| 14 | smartphone was [Sony Ericsson P1](https://www.gsmarena.com/sony_ericsson_p1-1982.php). | 14 | an actual smartphone before the Android. The closest to smartphone was [Sony |
| 15 | A fantastic phone and I broke it in Prague after a party and that was one of | 15 | Ericsson P1](https://www.gsmarena.com/sony_ericsson_p1-1982.php). A fantastic |
| 16 | those rare occasions where I was actually mad at myself. But nevertheless, | 16 | phone and I broke it in Prague after a party and that was one of those rare |
| 17 | after that phone, the next one was an Android one. | 17 | occasions where I was actually mad at myself. But nevertheless, after that |
| 18 | phone, the next one was an Android one. | ||
| 18 | 19 | ||
| 19 | Before that, I only owned normal phones from Nokia and Siemens etc. Nothing | 20 | Before that, I only owned normal phones from Nokia and Siemens etc. Nothing |
| 20 | special, actually. These are the phones we are talking about. Before 2007. | 21 | special, actually. These are the phones we are talking about. Before 2007. |
| @@ -34,42 +35,42 @@ Let's take a look at these beauties. | |||
| 34 | 35 | ||
| 35 | ## WAP - Wireless Application Protocol | 36 | ## WAP - Wireless Application Protocol |
| 36 | 37 | ||
| 37 | Not that one! We are talking about Wireless Application Protocol and not | 38 | Not that one! We are talking about Wireless Application Protocol and not Cardi |
| 38 | Cardi B's song 😃 | 39 | B's song 😃 |
| 39 | 40 | ||
| 40 | WAP stands for Wireless Application Protocol. It is a protocol designed for | 41 | WAP stands for Wireless Application Protocol. It is a protocol designed for |
| 41 | micro-browsers, and it enables the access of internet in the mobile devices. | 42 | micro-browsers, and it enables the access of internet in the mobile devices. It |
| 42 | It uses the mark-up language WML (Wireless Markup Language and not HTML), WML | 43 | uses the mark-up language WML (Wireless Markup Language and not HTML), WML is |
| 43 | is defined as XML 1.0 application. Furthermore, it enables creating web | 44 | defined as XML 1.0 application. Furthermore, it enables creating web |
| 44 | applications for mobile devices. In 1998, WAP Forum was founded by Ericson, | 45 | applications for mobile devices. In 1998, WAP Forum was founded by Ericson, |
| 45 | Motorola, Nokia and Unwired Planet whose aim was to standardize the various | 46 | Motorola, Nokia and Unwired Planet whose aim was to standardize the various |
| 46 | wireless technologies via protocols. | 47 | wireless technologies via protocols. |
| 47 | [(source)](https://www.geeksforgeeks.org/wireless-application-protocol/) | 48 | [(source)](https://www.geeksforgeeks.org/wireless-application-protocol/) |
| 48 | 49 | ||
| 49 | WAP protocol was resulted by the joint efforts of the various members of WAP | 50 | WAP protocol was resulted by the joint efforts of the various members of WAP |
| 50 | Forum. In 2002, WAP forum was merged with various other forums of the industry, | 51 | Forum. In 2002, WAP forum was merged with various other forums of the industry, |
| 51 | resulting in the formation of Open Mobile Alliance (OMA). | 52 | resulting in the formation of Open Mobile Alliance (OMA). |
| 52 | [(source)](https://www.geeksforgeeks.org/wireless-application-protocol/) | 53 | [(source)](https://www.geeksforgeeks.org/wireless-application-protocol/) |
| 53 | 54 | ||
| 54 | These were some wild times. Devices had tiny screens and data transmission rates | 55 | These were some wild times. Devices had tiny screens and data transmission rates |
| 55 | were abominable. But they were capable of rendering WML (Wireless Markup | 56 | were abominable. But they were capable of rendering WML (Wireless Markup |
| 56 | Language). This was very similar to HTML, actually. It is a markup language, | 57 | Language). This was very similar to HTML, actually. It is a markup language, |
| 57 | after all. | 58 | after all. |
| 58 | 59 | ||
| 59 | These pages could be served by [Apache](https://apache.org/) and could be | 60 | These pages could be served by [Apache](https://apache.org/) and could be |
| 60 | generated by CGI scripts on the backend. The only difference was the limited | 61 | generated by CGI scripts on the backend. The only difference was the limited |
| 61 | markup language. | 62 | markup language. |
| 62 | 63 | ||
| 63 | ## WML - Wireless Markup Language | 64 | ## WML - Wireless Markup Language |
| 64 | 65 | ||
| 65 | Just like web browsers use HTML for content structure, older mobile device | 66 | Just like web browsers use HTML for content structure, older mobile device |
| 66 | browsers use WML - if you need to support really old mobile phones using WML | 67 | browsers use WML - if you need to support really old mobile phones using WML |
| 67 | browsers, you will need to know about it. WML is XML-based (an XML vocabulary | 68 | browsers, you will need to know about it. WML is XML-based (an XML vocabulary |
| 68 | just like XHTML and MathML, but not HTML) and does not use the same metaphor | 69 | just like XHTML and MathML, but not HTML) and does not use the same metaphor as |
| 69 | as HTML. HTML is a single document with some metadata packed away in the head, | 70 | HTML. HTML is a single document with some metadata packed away in the head, and |
| 70 | and a body encapsulating the visible page. With WML, the metaphor does not | 71 | a body encapsulating the visible page. With WML, the metaphor does not envisage |
| 71 | envisage a page, but rather a deck of cards. A WML file might have several | 72 | a page, but rather a deck of cards. A WML file might have several pages or cards |
| 72 | pages or cards contained within it. | 73 | contained within it. |
| 73 | [(source)](https://www.w3.org/wiki/Introduction_to_mobile_web) | 74 | [(source)](https://www.w3.org/wiki/Introduction_to_mobile_web) |
| 74 | 75 | ||
| 75 | ```html | 76 | ```html |
| @@ -82,7 +83,8 @@ pages or cards contained within it. | |||
| 82 | </wml> | 83 | </wml> |
| 83 | ``` | 84 | ``` |
| 84 | 85 | ||
| 85 | There is an amazing tutorial on [Tutorialpoint about WML](https://www.tutorialspoint.com/wml/index.htm). | 86 | There is an amazing tutorial on [Tutorialpoint about |
| 87 | WML](https://www.tutorialspoint.com/wml/index.htm). | ||
| 86 | 88 | ||
| 87 | ## Converting Digg to WML | 89 | ## Converting Digg to WML |
| 88 | 90 | ||
| @@ -166,24 +168,24 @@ with open('www/index.wml', 'w+') as fp: | |||
| 166 | fp.write(html) | 168 | fp.write(html) |
| 167 | ``` | 169 | ``` |
| 168 | 170 | ||
| 169 | This script will create a folder `www` and in the folder `www/images` for | 171 | This script will create a folder `www` and in the folder `www/images` for |
| 170 | storing resized images. | 172 | storing resized images. |
| 171 | 173 | ||
| 172 | > Be sure you don't use SSL and use just normal HTTP for serving the content. | 174 | > Be sure you don't use SSL and use just normal HTTP for serving the content. |
| 173 | > These old phones will have problems with TLS 1.3 etc. | 175 | > These old phones will have problems with TLS 1.3 etc. |
| 174 | 176 | ||
| 175 | If you look at the python file, I convert all the images into tiny B&W images. | 177 | If you look at the python file, I convert all the images into tiny B&W images. |
| 176 | They should be WBMP (Wireless BitMaP) but I choose JPEGs for this, and it | 178 | They should be WBMP (Wireless BitMaP) but I choose JPEGs for this, and it seems |
| 177 | seems to work properly. | 179 | to work properly. |
| 178 | 180 | ||
| 179 | Because I currently don't have a phone old enough to test it on, I used an | 181 | Because I currently don't have a phone old enough to test it on, I used an |
| 180 | emulator. And it was really hard to find one. I found [WAP Proof](http://wap-proof.sharewarejunction.com/) | 182 | emulator. And it was really hard to find one. I found [WAP |
| 181 | on shareware junction, and it did the job well enough. I will try to find and | 183 | Proof](http://wap-proof.sharewarejunction.com/) on shareware junction, and it |
| 182 | actual device to test it on. | 184 | did the job well enough. I will try to find and actual device to test it on. |
| 183 | 185 | ||
| 184 | <video src="/assets/wap/emulator.mp4" controls></video> | 186 | <video src="/assets/wap/emulator.mp4" controls></video> |
| 185 | 187 | ||
| 186 | If you are using Nginx to serve the contents, add a directive to the hosts file | 188 | If you are using Nginx to serve the contents, add a directive to the hosts file |
| 187 | that will automatically server `index.wml` file. | 189 | that will automatically server `index.wml` file. |
| 188 | 190 | ||
| 189 | ```nginx | 191 | ```nginx |
| @@ -195,6 +197,5 @@ server { | |||
| 195 | ## Conclusion | 197 | ## Conclusion |
| 196 | 198 | ||
| 197 | Well, this was pointless, but very fun! I hope you enjoyed it as much as I did. | 199 | Well, this was pointless, but very fun! I hope you enjoyed it as much as I did. |
| 198 | I will try to find an old phone to test it on. If you have any questions, | 200 | I will try to find an old phone to test it on. If you have any questions, feel |
| 199 | feel free to ask in the comments. | 201 | free to ask in the comments. |
| 200 | |||
