4 Replies Latest reply: Sep 6, 2013 5:15 AM by TobiP RSS

    Opening App in own new Window - Opinions please

    TobiP

      Dear Community!

       

      I would like to invite you to share your opinions on this idea - foremost in terms of user experience, but also technical implementation:

       

      Like anybody I always have a number of browser-tabs open, but as an apex user (not developer) I probably have only one apex-app running. So my ideea was, to give the user a stronger experience of working with an Application rather than a website, and therefore open the app in a new window.

       

      Once in a new window all apex functionalities, navigation etc. work as usual. Only the user can concentrate more on the content and is not distracted by all the other browserstuff around. (After all it's not just "some web site"... ) Also he has full independent controll over the window.

       

      I have build this in a test scenario and invite you to try everything out.

       

      With a cookie-controlled checkbox the user can determine, wether he wants it in the first place or not. (Then once allow popups for this site.)

       

      Now it gets weird:

       

      I want deeplinking to be possible, so the functionality for the opening process in contained in the page template.

       

      Also I want, when the user accidentally or willingly returns to the initial browser, and the new window comes out of sight, there should be a button to bring that window back to the front.

      For that, javascript has to store the window object on the page, that opened the new one, so it should stay active. But since to user "doesn't want to use" that "old" window in the browser tab, I have created an overlay region, to cover that entire page up - on the condition, that a new window is beeing opened. Just be feeling this is probably a pretty weird solution, but its working so far (see example above).

       

      Javascript on every page::

       

      var newwindow;
      $(function(){
        // when app-page is opened the first time, open new window. after that P0OPEN will be empty:
        if ($v('P0OPEN') === 'Y') {
          var href = 'f?p=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.::::P0OPEN:',
              winw= window.innerWidth, winh = window.innerHeight;
          // cosmetics for positioning etc.
          var options = 'scrollbars=yes, width='+(winw*.8)+', height='+(winh*.8)+', top='+(winh*.1)+', left='+(winw*.1)
          newwindow = window.open(href, '_blank', options);
          // the button to bring the new window back to the front:
          $('#P0BTNFOCUSW').click(function(){
             if (newwindow && !newwindow.closed) {
                 setTimeout(function(){ newwindow.focus(); },100) ;
             } else {
                 // if window was closed, start new session:
                 window.redirect('&LOGOUT_URL.');
             }
          });
        }
      });
      
      
      

      Maybe its better to have an extra page just for that purpose, but how can I combine that with deeplinking AND the necessity to store the javascript-window-object?

       

      Another problem unsolved is, that when the user logs out in the new window, that should certailnly disapear. Also, in that case: the window open in the initial tab should change too, that is: redirect to the login screen.

       

      And probably there are a few more things to be considered...

       

      So I will be very glad to hear all your oppinions and suggestions of any kind.

       

      Thanks and greetings,

      Tobi

       

      (omg!! how can you get the formating for code??) (ok, thanks...)

        • 1. Re: Opening App in own new Window - Opinions please
          Tom Petrus

          This is just a modal window discussion or it comes down to it. What I don't get is how you say you want to give the user more power, yet you take it away. You open a new window but you block any interaction on the opener by putting an overlay on it. What have I gained? A new window? A modal window would have gotten me the same without the popupblocking.

          Why not create a portal application, with links to other applications. Put target="_blank" on the links and the apps will open in a tab or window, depending on the user's preference. Why can't I myself decide over what happens?

          It's about time people knew how to work with a browser anyway, so why not educate them a bit on their possibilities? Use CTRL+click to open a link in a tab/window! Or rightclick it! That is more power to the user, in my opinion: choice.

          So what if they open it in the same window? Maybe they don't want the extra clutter of an added window or tab. Maybe they only work in that one application.

          Used Chrome yet? The landing page has applinks for the different google apps (yes, google search is called an app there, just like gmail and drive) which behave like a standard web url. Why change how the web works?

          And Ppersonally I hate popup warnings. I sigh when I see one. I don't accept them. Why would I want to teach someone to work with the popupblocker? It shouldn't be necessary.

           

          And ps: you can get to the code highlighting by using the advanced editor, then select your text, then click on the double blue arrows and choose syntax highlighting.

          • 2. Re: Opening App in own new Window - Opinions please
            TobiP

            Hi TomPetrus,

             

            thanks for your open words!

             

            In many ways you definitely are right. However, from my experience, many endusers just don't know how to control a browser, that is in this case: how to open a tab in a separate window. That leat me to this idea.

             

            But the general problem of it probably is that I am trying to fake something. A desktop-app is a desktop-app, a browser-app another kind. Period, nothing more to it. But I was trying to fake a desktop-app. Actually I also had a bit of a fishy feeling, after I had programmed this . Thats why I also wanted to get some professional feedback here.

             

            So, maybe I altogether forget about it, but it was worth a try...

            • 3. Re: Opening App in own new Window - Opinions please
              Tom Petrus

              Well, nothing wrong with trying and experimenting of course! It'd be interesting to have things react a bit more as a desktop app, but there is not really enough power to do so and that is mostly because of security reasons. Just like the popupblocker. Personally I'd rather not have to tell anyone to fiddle with a (any!) popupblocker. I think you can have a good looking 'app' without it though, and design (or, UI) helps a lot in that regard. I don't mean to place Google on a pedestal here, but I like the simplicity of the browser splashscreen for example. "Here are your app links. Want to open one? Cool, right away!". Want multiple? No issue, hold ctrl and click away. That's just plain basic browser usage and it leaves me the option. They could've also placed the target=blank tag in their anchors, but they didn't. And that's fine.

              I wouldn't necessarily make it more complex than that though - like with auto-popup screens after a login, screening of a window from interaction, dealing with deeplinks.

              I've seen some nice "app"-approaches for apex. I think the coolest are where there is a master app, with icons which open up the other applications. The authentication cookie is shared, the authentication scheme is subscription based. You can deeplink apps but if you don't have a deeplink you go to the splashscreen.

              If you deeplinked then you meant to go there, and not first the splash which pops up something else. If you want to go there then there is a button in each app which will open up the splash app (and if you add target blank in there, in a new window).

              I'd say there is a lot of room for innovation, and anything web is possible. But be careful with those things like popupblockers

               

              And It's just one opinion of course. I'm sure there are wildly differing ones out there. (Who don't react) You could always try some more UX-UI oriented forums for some feedback in this regard!

              • 4. Re: Opening App in own new Window - Opinions please
                TobiP

                I had shown it to two collegues, and their reaction was similarly sceptical. What makes this aproach also a bit difficult is that, as you say, that splash screen remains (in the original browser...!), so that the app is actually spit up in two windows. Even thou the user woundln't realize it, it might feel awkward. Maybe I will still show this in another forum, let's see. Having just different tabs (for one window) on the other hand do make things much more tidy. And certainly as you say you really do have a lot of possibilities (UX/UI) inside one window...

                 

                But in order to NOT let it come to a modal window discussion, lets stop here...