CodeIgniter Forums
Wap site By CI - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Wap site By CI (/showthread.php?tid=7244)

Pages: 1 2


Wap site By CI - El Forum - 03-31-2008

[eluser]ranacse05[/eluser]
Hello Experts can i develop wap site by CodeIgniter ?


Wap site By CI - El Forum - 03-31-2008

[eluser]Developer13[/eluser]
I think this question is WAY too vague to be answered with any credibility or insight by anybody here.

Short answer: Yes.

Another short answer: *Any* type of site can be developed using CodeIgniter.

The question kind of doesn't make sense...


Wap site By CI - El Forum - 03-31-2008

[eluser]Tom Glover[/eluser]
CI out put HTML code into view files, so as long as you create your view file in the correct format for Wap it should be fine.

Please ask a more detailed question for a better answer.


Wap site By CI - El Forum - 03-31-2008

[eluser]esra[/eluser]
WAP supports HTML and XML, but WAP mobile devices use WML (Wireless Application Protocol) which is based on XML. To my knowledge, all of the mobile device operating systems support WAP and WML. WAP uses WMLscript which is similar to Javascript but with less CPU and memory overhead. You will most likely experience a performance hit if you attempt to use HTML and Javascript in your views even though mobile devices can process HTML code.

CI supports a user_agent library and a user_agent configuration file. Among other things, the HTTP header provided by the client device's browser includes user agent information about the platform, browser, and device. If the site is going to solely support WAP, CI should load whatever view files and embedded script files created for the application. You will probably want to detect if a mobile device is being used in order to restrict access to mobile devices and issue a warning message if a standard HTML browser is attempting to access the site. The user agent detection could be handled using a display_override hook.

If you want to support both HTML and WML from a single site, you need to detect the user agent and include conditional code in your controller to selectively use HTML or WML views based on the current user agent. So you will need to create two sets of views--one for HTML and one for WML. You will need to come up with a unique naming scheme for the views if both types are stored in the same directories or subdirectories or create separate device-dependent directories to store view files with the same naming scheme. The applicable view code would load either Javascript or WMLscript. In this case, you also should be able to handle the user agent detection using a display_override hook.

Spend some time reading about the User_agent library and hooks in the user guide. If you get stuck on the hook code, I may have something but need to test it first with a later version of CI.

Hidden away on the Microsoft MSDN site is Browser application for simulating WAP/WML for Windows CE and Windows Mobile 5/6 devices from a PC. I believe this is a custom version of IE designed to render the smaller screens. I'm not sure if there is something similar available for Linux/Unix so you probably need to research this on your own.


Wap site By CI - El Forum - 04-01-2008

[eluser]simonspoken[/eluser]
You could use the User_agent library, however I've found this is *very* unreliable. It thinks a Motorola V3 Razr is a computer, for example.

We have an in-house mobile device database API based on http://wurfl.sf.net, which we have written into Code Igniter. If there's enough demand, I could see about publicly releasing the API for everyone to use.


Wap site By CI - El Forum - 05-21-2008

[eluser]RaBu[/eluser]
[quote author="simonspoken" date="1207058409"]We have an in-house mobile device database API based on http://wurfl.sf.net, which we have written into Code Igniter. If there's enough demand, I could see about publicly releasing the API for everyone to use.[/quote]

Hi Simon,

I think that sounds interesting, if you have made a CI wurfl library - I would be really interested in checking it out, and possibly using it of course Smile

Respect,
- Ras


Wap site By CI - El Forum - 08-08-2008

[eluser]Unknown[/eluser]
[quote author="simonspoken" date="1207058409"]You could use the User_agent library, however I've found this is *very* unreliable. It thinks a Motorola V3 Razr is a computer, for example.

We have an in-house mobile device database API based on http://wurfl.sf.net, which we have written into Code Igniter. If there's enough demand, I could see about publicly releasing the API for everyone to use.[/quote]

Love to see this too. Very interesting.


Wap site By CI - El Forum - 08-11-2009

[eluser]searain[/eluser]
Any follow up on this?

Now, regarding the Esra's post talking about wml and wmlscript, still today's smart phone use and are limited to wml or wmlscript? I am checking that out WML and WMLscript right now but some people said that wml and wmlscript were out of date. Smart phones can use regular html and javascript. Some said, stay away from javascript at least for now, although iphone supports javascript pretty well.

Any new information about this?

Are there any libraries, plug ins etc. about CodeIgniter and WAP out there for us to use?

Any successful sites out there using codeigniter on wap?

Esra, simonspoken, and other experts, any sites, libraries, experience you can share with us?

Thanks!


Wap site By CI - El Forum - 08-11-2009

[eluser]-sek[/eluser]
My experience with the iphone (I have a used, unlocked one for development) is that Safari generally handles all modern websites. It can be slow and a few pages crash and cause a reboot, but for example, all the jQuery features on our site work fine in the iphone. The gestural navigation and zooming work very well for getting around a webpage, although it is a bit like holding your nose to a newspaper.

On the other hand, websites optimized for presentation on the iphone or other mobile devices, not WAP, but plain HTML made to fit the screen size and simplified to present information without a lot of clutter, are actually easier to browse than normal web pages. The iphone apps, such as the one for YouTube, are even simpler and easier to use than the optimized web pages and I much prefer accessing YT through the app than using Safari, since it is optimized to the handheld experience.

We are starting to realize the potential for mobile use on our site, which we planned form the beginning, so we are about to make the decision how to go about this. I would stay away from WAP. There are some who recommend not optimizing for mobile devices, because smartphone browsers are now capable of handling standard html and javascript. I disagree with this. A handheld device with a 3" touch screen is not a desktop and even with the assist the iphone gives, the browsing experience for YT is much better in an app optimized to the device. Scrolling around the screen of a regular website is a pain. I have to zoom in to read something, then zoom out, zoom in to click a tiny link, then zoom out to the page, zoom in to read, you get the picture. It does do fairly well reading column organized content. A double tap will bring the column to fill the width of the screen and then back to the page. I prefer to read the mobile version of Google news, which is optimized for iphone and other devices (as are some of the other big sites) over Safari. In fact, some of these sites, detect the mobile device and do not let you browse their regular site in Safari, even though it is fully capable of handling it.

If you are optimizing for iphone, you will want to read about how to fit the content to the viewport

http://developer.apple.com/iphone/library/documentation/AppleApplications/Reference/SafariWebContent/CreatingContentforSafarioniPhone/CreatingContentforSafarioniPhone.html

http://developer.apple.com/iphone/library/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html

I am toying with developing an iphone app, but may present some of our site information through a mobile optimized HTML version of our site.


Wap site By CI - El Forum - 08-11-2009

[eluser]-sek[/eluser]
BTW

I learn best by example, so I wanted to look at the source code for some of the m.* mobile sites like m.google.com that detect a mobile device. User Agent Switcher

https://addons.mozilla.org/en-US/firefox/addon/59

provides iphone spoofing.