1.5 billion mobile handsets sold in 2011, nearly one third are smartphones. Nokia is still top dog for handsets, but Samsung and Apple sold more smartphones.
Submitted by SneakyWho_am_i (not verified) on 16 January, 2009 - 01:04.
Prashant, the answer to your question is "Whichever you're most proficient in". The languages may not be equal but their capabilities are very similar. As code in each of those three languages remains completely hidden from the user agent (meaning it remains on the server and is inaccessible to the client), any mobile page you create in one will be reproducible using the others.
The speed difference between each of them is negligible, too. Theoretically you could write a hypertext preprocessor entirely in assembler or C, compile it as an extension to a webserver and run it. It would produce your web pages blisteringly fast - and yet people don't do this, no, they use languages like Ruby and Python instead. Yes, they use interpreted and runtime-compiled languages instead of compiled ones.
My point in speed? The execution speed of the language should not be a consideration. If it was, websites would be compiled as webserver extensions. The bigger cost in speed is not from the language itself but from idiot programmers (like me) who simply write stupid code. A good script in a slow language will be faster than a bad program in a fast language.
The best way to avoid writing inefficient and dangerous code is not to optimize constantly (as this makes it unmaintainable and impossible to debug, eventually reversing the positive effect) - it's to write your code in a language in which you are proficient, and to use a highly reflective development model.
Your target audience (mobile devices) can absolutely not affect your choice of server-side programming language.
HOWEVER; your choice of markup, style and client-side scripting languages is critical. These will slow down the experience and even completely break it for users. I don't know much about this but I recommend:
- XHTML with content-type negotiation
- CSS 2.1
- Unobtrusive javascript, and only if you REALLY NEED it
- Jpg for photos
- gif for animation
- png if you need true colour plus transparency (unlikely)
AVOID:
- client-side Java
- flash (or use unobtrusive flash)
- most javascript effects
- obrusive SVG (even if the device can render it correctly, many mobile providers repurpose pages. This breaks a lot of content, especially XML such as SVG)
- heavy (filesize) content
- big (screen dimensions) content
- pixel sizing, fixed widths (try resizing your desktop browser if you must use one)
- testing in internet explorer, especially if using content negotiation
- animation of any kind. many devices can handle it now but even on my nice symbian handset there is a constant shortage of RAM. all animations are good for is annoying people, eating RAM, and eating CPU time - IF they even display correctly.
- fixed positioning. Just trust me on this one.
DO:
- validate your stuff after EVERY changeset
- use SCM such as subversion (even if you use someone else's CMS)
- use an existing CMS if it suits
- download the noscript, web developer toolbar, and firebug extensions for firefox as they will help majorly for testing and debugging
- look out for a gateway or repurposing service which is designed to "process the full web fr mobile use" as the reduced pages it serves you will be a key tool for guessing at how pages might be displayed in unknown mobile browsers and on unknown providers. I used to use one on my desktop computer.
REMEMBER:
- Do pages have to look the same in every browser? NO!
Prashant, the answer to your question is "Whichever you're most proficient in". The languages may not be equal but their capabilities are very similar. As code in each of those three languages remains completely hidden from the user agent (meaning it remains on the server and is inaccessible to the client), any mobile page you create in one will be reproducible using the others.
The speed difference between each of them is negligible, too. Theoretically you could write a hypertext preprocessor entirely in assembler or C, compile it as an extension to a webserver and run it. It would produce your web pages blisteringly fast - and yet people don't do this, no, they use languages like Ruby and Python instead. Yes, they use interpreted and runtime-compiled languages instead of compiled ones.
My point in speed? The execution speed of the language should not be a consideration. If it was, websites would be compiled as webserver extensions. The bigger cost in speed is not from the language itself but from idiot programmers (like me) who simply write stupid code. A good script in a slow language will be faster than a bad program in a fast language.
The best way to avoid writing inefficient and dangerous code is not to optimize constantly (as this makes it unmaintainable and impossible to debug, eventually reversing the positive effect) - it's to write your code in a language in which you are proficient, and to use a highly reflective development model.
Your target audience (mobile devices) can absolutely not affect your choice of server-side programming language.
HOWEVER; your choice of markup, style and client-side scripting languages is critical. These will slow down the experience and even completely break it for users. I don't know much about this but I recommend:
- XHTML with content-type negotiation
- CSS 2.1
- Unobtrusive javascript, and only if you REALLY NEED it
- Jpg for photos
- gif for animation
- png if you need true colour plus transparency (unlikely)
AVOID:
- client-side Java
- flash (or use unobtrusive flash)
- most javascript effects
- obrusive SVG (even if the device can render it correctly, many mobile providers repurpose pages. This breaks a lot of content, especially XML such as SVG)
- heavy (filesize) content
- big (screen dimensions) content
- pixel sizing, fixed widths (try resizing your desktop browser if you must use one)
- testing in internet explorer, especially if using content negotiation
- animation of any kind. many devices can handle it now but even on my nice symbian handset there is a constant shortage of RAM. all animations are good for is annoying people, eating RAM, and eating CPU time - IF they even display correctly.
- fixed positioning. Just trust me on this one.
DO:
- validate your stuff after EVERY changeset
- use SCM such as subversion (even if you use someone else's CMS)
- use an existing CMS if it suits
- download the noscript, web developer toolbar, and firebug extensions for firefox as they will help majorly for testing and debugging
- look out for a gateway or repurposing service which is designed to "process the full web fr mobile use" as the reduced pages it serves you will be a key tool for guessing at how pages might be displayed in unknown mobile browsers and on unknown providers. I used to use one on my desktop computer.
REMEMBER:
- Do pages have to look the same in every browser? NO!