Go Back   CodingForums.com > :: Client side development > General web building > Building for mobile devices

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-20-2012, 04:06 PM   PM User | #1
Rcoleman25
New Coder

 
Join Date: Jun 2012
Posts: 20
Thanks: 9
Thanked 0 Times in 0 Posts
Rcoleman25 is an unknown quantity at this point
Create a mobile app or website?

Hey,

I am creating a website which uses a database for posting, search, etc. and have thought about creating an app for it. Now I'm realizing instead of creating a full blown app I can just create a scaled down mobile version of my website. Would that be a better/cheaper option than app creation?

Also, I need to be able to track the location for some of my customers, can that be done over the website when they login from their phones or do I need an app for that?

Thanks
Rcoleman25 is offline   Reply With Quote
Old 09-20-2012, 08:22 PM   PM User | #2
Sammy12
Registered User

 
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
Sammy12 is on a distinguished road
Quote:
Originally Posted by Rcoleman25 View Post
Now I'm realizing instead of creating a full blown app I can just create a scaled down mobile version of my website. Would that be a better/cheaper option than app creation?
Yes, with regards to basic functionality, it is a substitute. It's also known as a mobile-version (similar to Facebook, Twitter, etc). You have to remember to target various screen sizes though.

-320 x 480 of course, iPhone, iPad, Android, etc. You would need to target these with @media queries:

Code:
@media screen and (min-width: 321px) and (max-width: 480px) {

}
... you need more
Quote:
Originally Posted by Rcoleman25 View Post
Also, I need to be able to track the location for some of my customers, can that be done over the website when they login from their phones
No, I don't believe you can. You cannot access a user's location unless there was a security warning. I don't think older phones support geolocation, I remember it was in modernizr. In Safari, you get a security pop up when a website is trying to access your location.

From the geolocation link:

Quote:
On desktop computers, the W3C Geolocation API works in Firefox since version 3.5, Google Chrome, Opera 10.6, Internet Explorer 9.0, and Safari 5.
On mobile devices, it works on Android (firmware 2.0 +), iOS, Windows Phone and Maemo.
Browser Support Chart: http://caniuse.com/geolocation (take a look at the mobile support)

Last edited by Sammy12; 09-20-2012 at 08:37 PM..
Sammy12 is offline   Reply With Quote
Users who have thanked Sammy12 for this post:
Rcoleman25 (09-24-2012)
Old 09-21-2012, 08:25 PM   PM User | #3
Rcoleman25
New Coder

 
Join Date: Jun 2012
Posts: 20
Thanks: 9
Thanked 0 Times in 0 Posts
Rcoleman25 is an unknown quantity at this point
Quote:
Originally Posted by Sammy12 View Post
Yes, with regards to basic functionality, it is a substitute. It's also known as a mobile-version (similar to Facebook, Twitter, etc). You have to remember to target various screen sizes though.

-320 x 480 of course, iPhone, iPad, Android, etc. You would need to target these with @media queries:

Code:
@media screen and (min-width: 321px) and (max-width: 480px) {

}
... you need more


No, I don't believe you can. You cannot access a user's location unless there was a security warning. I don't think older phones support geolocation, I remember it was in modernizr. In Safari, you get a security pop up when a website is trying to access your location.

From the geolocation link:



Browser Support Chart: http://caniuse.com/geolocation (take a look at the mobile support)
Thanks for the quick reply... so I could essentially have a mobile site and then build an app SIMILAR to the mobile site with a geolocation feature... not all of my customers for the business will need the geolocation.
Rcoleman25 is offline   Reply With Quote
Old 09-23-2012, 03:48 AM   PM User | #4
grimesd
New to the CF scene

 
Join Date: Sep 2012
Location: NY
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
grimesd is an unknown quantity at this point
Hey, if you decide you want to do a mobile version of your site, you have two options. One is media queries, which is easier but adds more code to your css files. The second is create a "mobile version" of your site as Sammy12 mentioned.

Example of #1.
Code:
@media screen and (max-width:480) {
      // Styling goes here
}
Example of #2.
Instead of yoursite.com
It could be mobile.yoursite.com.

The latter is a definitely a more intensive variation to a mobile site because it involves a completely overhauled version of your website on a sub domain. Usually mobile versions are better for enterprise business (Google, yahoo). For a personal website, I'd suggest using media queries.

It's a must simpler(easier) approach than subdomain mobile version.
grimesd is offline   Reply With Quote
Users who have thanked grimesd for this post:
Rcoleman25 (09-24-2012)
Old 09-24-2012, 05:33 PM   PM User | #5
Rcoleman25
New Coder

 
Join Date: Jun 2012
Posts: 20
Thanks: 9
Thanked 0 Times in 0 Posts
Rcoleman25 is an unknown quantity at this point
Quote:
Originally Posted by grimesd View Post
Hey, if you decide you want to do a mobile version of your site, you have two options. One is media queries, which is easier but adds more code to your css files. The second is create a "mobile version" of your site as Sammy12 mentioned.

Example of #1.
Code:
@media screen and (max-width:480) {
      // Styling goes here
}
Example of #2.
Instead of yoursite.com
It could be mobile.yoursite.com.

The latter is a definitely a more intensive variation to a mobile site because it involves a completely overhauled version of your website on a sub domain. Usually mobile versions are better for enterprise business (Google, yahoo). For a personal website, I'd suggest using media queries.

It's a must simpler(easier) approach than subdomain mobile version.

Thanks,

But this is a business website... which is launching in one month. So I could put code in my CSS style sheet for a mobile version and then create a geolocation mobile app? I would like to have one of those auto detect scripts which introduces a scaled-down version of my website when customers log in from their mobile phones.
Rcoleman25 is offline   Reply With Quote
Old 09-24-2012, 05:42 PM   PM User | #6
Sammy12
Registered User

 
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
Sammy12 is on a distinguished road
Somehow your post on 9-21 never showed up for me.

Quote:
Originally Posted by Rcoleman25 View Post
so I could essentially have a mobile site and then build an app SIMILAR to the mobile site with a geolocation feature...
Yes, the code below targets a specific screen size and you would insert CSS targeting phones. You shouldn't have to change everything, just widths and heights. The color scheme and everything else stays the same, unless you want to create a completely different design for a mobile device (in which using a subdomain like mobile.website.com would be preferable).

Code:
@media screen and (min-width: 321px) and (max-width: 480px) {

}
Quote:
Originally Posted by Rcoleman25 View Post
I would like to have one of those auto detect scripts which introduces a scaled-down version of my website when customers log in from their mobile phones.
@media queries are auto-detection scripts. They are for CSS only for mobile sites.

Last edited by Sammy12; 09-24-2012 at 05:46 PM..
Sammy12 is offline   Reply With Quote
Old 09-25-2012, 05:18 PM   PM User | #7
grimesd
New to the CF scene

 
Join Date: Sep 2012
Location: NY
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
grimesd is an unknown quantity at this point
CSS media queries are awesome, but as you stated if you want to use geolocation and such, you should really look into modernizer js library which can help you detect what browsers actually support it. Using modernizer you can use geolocation for compatible phones/browsers and then use a fallback for uncompatible browsers, (Older browsers like IE < 8) and older phones.

Make sure though that you code in a way that if the user cant use geoloation, they can still view the content in another means. You said that your website starts in a month. Unless your VERY familiar with geolocation and combining it with an API like bing maps or google, I suggest doing media queries for elements that don't rely on scripting (Such as geooation, web storage/localstorage, and etc..) until you fully test it on your localhost web server on your computer to get all the kinks out and to make sure you fully test for all browsers and phones.

Thats just my opinion though, but remember, older phones and browsers still surf the web. I suggest media queries for now if your just going to make it phone compitable from your whole site. If you plan later on to make an actual mobile version of your site like using redirects to have mobile phones to directed to a subdomain like mobile.yoursite.com, then I would look into geolocation and localstorage. Unless your site already has it incorporated into it, I wouldnt add it. Again, unless you make a fully mobile-only version of your site.

Hope this helps!!
grimesd is offline   Reply With Quote
Old 12-12-2012, 10:11 PM   PM User | #8
StevenHu
Regular Coder

 
Join Date: Jun 2011
Location: CA
Posts: 105
Thanks: 0
Thanked 10 Times in 10 Posts
StevenHu is an unknown quantity at this point
Quote:
Originally Posted by Rcoleman25 View Post
Hey,

I am creating a website which uses a database for posting, search, etc. and have thought about creating an app for it. Now I'm realizing instead of creating a full blown app I can just create a scaled down mobile version of my website. Would that be a better/cheaper option than app creation?

Also, I need to be able to track the location for some of my customers, can that be done over the website when they login from their phones or do I need an app for that?

Thanks
First point: Instead of choosing either/or regarding website and app, you can go the route of responsive web design. Google it and you'll see it's all about designing a site for multiple screen sizes rather than locking into a set width.

Second point: I don't think web has that capability yet. The equipment needed will have to be external to the site and plugged in, or you'll have to get the user to select something online personally. Of course, plenty of smartphones have this capability built in; designing such a thing will take an experienced developer.
__________________
Steve Husting
http://iphonedevlog.wordpress.com
StevenHu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:44 PM.


Advertisement
Log in to turn off these ads.