Re: Mobile strategy

2011-03-18 Thread railsnerd
Some Content Delivery Networks offer device detection and ESI based on
this.

This is the ideal solution, but too far outside of the Heroku sandbox
- maybe?

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Mobile strategy

2011-03-18 Thread Hemal Kuntawala
Indeed. I'm not totally convinced by client-side device detection from a
responsiblity perspective. I think maintaining a server-side distinction,
personally preferably via a subdomain, ticks most boxes given caching
efforts. Interested in more views though..

On 18 March 2011 22:41, railsnerd  wrote:

> Yes, I was about to say all these techniques (other than the css
> media queries) require a hit to the backend.
>
> Ideally there would be detection on the edge/cloud, so varnish cache
> can kick in where possible without hitting a rails stack or sinatra.
>
> Still, good ideas in this thread.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Heroku" group.
> To post to this group, send email to heroku@googlegroups.com.
> To unsubscribe from this group, send email to
> heroku+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/heroku?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Mobile strategy

2011-03-18 Thread railsnerd
Yes, I was about to say all these techniques (other than the css
media queries) require a hit to the backend.

Ideally there would be detection on the edge/cloud, so varnish cache
can kick in where possible without hitting a rails stack or sinatra.

Still, good ideas in this thread.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Mobile strategy

2011-03-18 Thread Hemal Kuntawala
Not good if you're caching then?

On 18 March 2011 12:16, Dan Croak  wrote:

> I'm using mobile-fu on a few Rails apps on Heroku:
>
> https://github.com/brendanlim/mobile-fu
>
> It does device detection by checking the user agent against a giant regex.
>
> It also provides a mobile mime type so you can put your mobile-specific
> views in their own foo.mobile.erb views if you want.
>
> On Mar 18, 2011, at 6:01 AM, railsnerd  wrote:
>
> > Hi there
> >
> > Is anyone using Heroku to serve a mobile and desktop version of their
> > site?
> >
> > How to handle device detection?  Particularly when using the some URLs
> > to deliver different markup/content to the two different platforms.
> >
> > Any ideas of a device detection strategy?  Even if it was just
> > "mobile" or "desktop" (as opposed to detecting specific handsets).
> >
> > cheers
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Heroku" group.
> > To post to this group, send email to heroku@googlegroups.com.
> > To unsubscribe from this group, send email to
> heroku+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> http://groups.google.com/group/heroku?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Heroku" group.
> To post to this group, send email to heroku@googlegroups.com.
> To unsubscribe from this group, send email to
> heroku+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/heroku?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Mobile strategy

2011-03-18 Thread Pedro Del Gallego
I am using two different strategies for this scenarios. Take a look at
this screencast [1] and to the Responsive Design article at A List
Apart.

The first one is strategy is to serve different pages to the user. In
this case I do it in the backend checking the user agent and render
two different views. This work great when the pages are not very
similar. The con here is the it require more work and maintenance.

The second scenario is when you just want to serve a slightly
different page that contains the same , In that case I use a css3
media queries to tell the browser to render the page in a different
way. Take a look to my portfolio [3], it use this technique. if you
make the window very narrow it will adapt it self to a "mobile" view.
It is still in a work in progress state but still you can see what I
mean.


[1] : http://railscasts.com/episodes/199-mobile-devices
[2] : http://www.alistapart.com/articles/responsive-web-design/
[3] : http://pdelgallego.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Mobile strategy

2011-03-18 Thread Dan Croak
I'm using mobile-fu on a few Rails apps on Heroku:

https://github.com/brendanlim/mobile-fu

It does device detection by checking the user agent against a giant regex.

It also provides a mobile mime type so you can put your mobile-specific views 
in their own foo.mobile.erb views if you want.

On Mar 18, 2011, at 6:01 AM, railsnerd  wrote:

> Hi there
> 
> Is anyone using Heroku to serve a mobile and desktop version of their
> site?
> 
> How to handle device detection?  Particularly when using the some URLs
> to deliver different markup/content to the two different platforms.
> 
> Any ideas of a device detection strategy?  Even if it was just
> "mobile" or "desktop" (as opposed to detecting specific handsets).
> 
> cheers
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Heroku" group.
> To post to this group, send email to heroku@googlegroups.com.
> To unsubscribe from this group, send email to 
> heroku+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/heroku?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Mobile strategy

2011-03-18 Thread Hemal Kuntawala
I serve different content for a mobile user as the purpose for visiting from
a mobile device is generally different - yup, served up from m.xyz.com. I
check the user agent in a before hook (this is in Sinatra) and redirect if
it's mobile.

On 18 March 2011 10:36, railsnerd  wrote:

> You are doing this in the backend?  Some people are checking the user
> agent in the front end... but that seems too late (if u can help it)
>
> What are your differences in what is delivered?
>
> Do you have different markup and content for mobile?  If so I guess
> caching your URIs might be difficult if each URI needs to have
> different versions for mobile and desktop. unless you could
> somehow map or redirect to m.xxx.com and treat it entirely separately.
>
> thanks for any tips
>
> --
> You received this message because you are subscribed to the Google Groups
> "Heroku" group.
> To post to this group, send email to heroku@googlegroups.com.
> To unsubscribe from this group, send email to
> heroku+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/heroku?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Mobile strategy

2011-03-18 Thread railsnerd
You are doing this in the backend?  Some people are checking the user
agent in the front end... but that seems too late (if u can help it)

What are your differences in what is delivered?

Do you have different markup and content for mobile?  If so I guess
caching your URIs might be difficult if each URI needs to have
different versions for mobile and desktop. unless you could
somehow map or redirect to m.xxx.com and treat it entirely separately.

thanks for any tips

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Mobile strategy

2011-03-18 Thread Hemal Kuntawala
I am just by checking the useragent in the request.

On 18 March 2011 10:01, railsnerd  wrote:

> Hi there
>
> Is anyone using Heroku to serve a mobile and desktop version of their
> site?
>
> How to handle device detection?  Particularly when using the some URLs
> to deliver different markup/content to the two different platforms.
>
> Any ideas of a device detection strategy?  Even if it was just
> "mobile" or "desktop" (as opposed to detecting specific handsets).
>
> cheers
>
> --
> You received this message because you are subscribed to the Google Groups
> "Heroku" group.
> To post to this group, send email to heroku@googlegroups.com.
> To unsubscribe from this group, send email to
> heroku+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/heroku?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Mobile strategy

2011-03-18 Thread railsnerd
Hi there

Is anyone using Heroku to serve a mobile and desktop version of their
site?

How to handle device detection?  Particularly when using the some URLs
to deliver different markup/content to the two different platforms.

Any ideas of a device detection strategy?  Even if it was just
"mobile" or "desktop" (as opposed to detecting specific handsets).

cheers

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.