Jump to content

PHP for Mobile Devices


grungefreak

Recommended Posts

Hi,

 

This may be a silly question and possibly the wrong place to post but here goes. I am interested in converting my website to be viewed and used on mobile devices e.g. mobile phones. I realise there are CSS and HTML issues here but I have some small scripts running in conjunction with a MySQL database. Would I need to make my scripts more efficient or are there any issues I should be aware of from a PHP point of view?

 

Any guidance would be much appreciated.

 

GF

Link to comment
Share on other sites

If you do it properly all you need is a stylesheet for mobile devices , that's the beauty of CSS. You can style your page to look optimal on a certain medium.

 

And yes what grungefreakMadTechie said, PHP got nothing to do with it only thing you have to worry about is clientside and that's html/css/javascript.

Don't convert half your site via javascript or walk trough huuuge arrays and things like that as a mobile device has far less RAM and a less powerful CPU, although I have to say what they are capable off keeps impressing me.

 

[edit](See the striketrough, name confusion)

Link to comment
Share on other sites

It maybe worth it but most moden phone have web browsers and don't use WAP anymore!

ok my old phone could use view WAP but i never did because it was c##p, its okay for things like weather reports and stock market stuff (i don't go their), but for view a general website, it was pointless now with blackberri and iPhones etc thats a "Web Browser" so its Safari or Firefox or IE

Link to comment
Share on other sites

Safari or Firefox or IE

Safari okay,

IE I just pretend it doesn't exist ( HORRIBLE ie6 based mess )

Think the other major player besides safari on the mobile market is opera mini ?

 

I agree with WAP not being worth it though, you have to

1) Learn it

2) Adapt your site to it

That's a lot of work, and like you said.. most phones nowadays have a decent browser and WAP isn't something you want to use for all your content. Just the short informational stuff.

Link to comment
Share on other sites

As has been pointed out PHP runs on the server, so the device does not normally matter - BUT !!! - There is one thing that YOU MUST BE CAREFUL OF when programming PHP for mobile devices and it is in the use of SESSION variables.

 

I have had issues with the use of session variables for mobile devices as the session on a mobile device sometimes "floats" so I make a point not to use them.  If I have any values to pass on from one page to another,  I generally use a form and "POST" the data along !

 

 

Link to comment
Share on other sites

Overall, well written HTML and CSS will be adequate for modern mobile browsing. If you use things like separation of concerns, progressive enhancement and unobtrusive Javascript you shouldn't get into any trouble. You should follow those principles either way.

Link to comment
Share on other sites

OK, well just to explain why I'm asking. I am doing my Thesis shortly and need a topic. I was going to do it on mobile learning and how it effects web developers but if it's only CSS and html, I'm not sure i'd have enough for my dissertation.

 

GF

Link to comment
Share on other sites

What are you studying and at what level? Just to get an idea of what could be potential interesting subjects.

 

Multimedia and Elearning at Masters level. So I am doing a mini-dissertation (10,000 words) with a practical application to support my assumptions e.g. producing elearning content for mobile devices can be challenging for web developers. I write about it and some learning theories etc..then I produce a prototype to test my assumptions.

 

I'm open to guidance on this one. I love web development using php and html, css and javascript so I feel this would interest me if I could get a good slant on it i.e. elearning using multimedia!

 

GF

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.