Tom,
thanks!!
I agree with you in terms of app-driven browser compatibility.
Then, It would be nice it you could declare compatible or non
compatible browsers in your build file and provide an url to redirect
to. It would be app-driven and reusable at the same time.
At the end of the day, shouldn't all SC applications check their
compatibility at boot time?
I will experiment with the boostraping as suggested.
Rafael.
> If you'd like to do custombrowsersniffing, you can insert JavaScript into your index.html file using the :bootstrap_inline directive in your Buildfile. For example, let's say you had some custom JavaScript in myproject/frameworks/bootstrap/bootstrap.js. You could add a line like this to your Buildfile:
>
> :bootstrap_inline => ['sproutcore/bootstrap:javascript', 'bootstrap:bootstrap']
>
> (Note that we've included the original SproutCore bootstrap file in this configuration so that the SproutCore framework continues to initialize properly.)
>
> Of course, there are many approaches to determiningbrowsercompatibility, from doing it at runtime using JavaScript to sniffing the user agent server-side. I agree that we probably need better messaging in the event an unsupportedbrowseris detected, but so farbrowsersupport seems to be app-driven rather than framework-driven. In other words, for the large-scale applications I'm familiar with, compatibility is restricted by the custom views and logic of the application rather than the framework primitives, so I'm not sure if a "one size fits all" solution makes sense at present.
>
> Best,
> Tom
>
> On Jan 25, 2011, at 1:28 AM, Rafael del Valle wrote:
>
>
>
> > After asking the question on #sproutcore I have been asked to open the
> > debate here:
>
> > What is the best way to deal with unsupported browsers?
>
> > We should consider several "levels" of incompatibility:
>
> > -Browsers incapable of starting up sproutcore (say, IE5, IE6)
> > -Browsers that will start Sprouctore but the application will not
> > provide an adequate user experience (in our particular case IE7).
> > -Browsers that will fully run Sproutcore but the application has not
> > been designed for thatbrowseror form factor (say, an Iphone trying
> > to run an SC desktop only application).
>
> > I think it is very important that users get a clean message of what is
> > going on.
>
> > While the 2 latest points can be handled with SC.browserand a bit of