Alpha Video Training
Results 1 to 9 of 9

Thread: Mobile App + Desktop App in same workspace!!!

  1. #1
    Member
    Real Name
    Cornelius Laubscher
    Join Date
    Dec 2014
    Posts
    66

    Default Mobile App + Desktop App in same workspace!!!

    I have desktop app running very well, however, I have developed a mobile app FOR the same desktop app. My problem is the login. They both use the same sql db. I don't want to maintain multiple security and workspaces for the same functions.

    Can I or rather how do I host both apps in the same workspace with each having its own logon screens but using the same security framework?

    ANY assistance will be appreciated.

    Regards

  2. #2
    Volunteer Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,841

    Default Re: Mobile App + Desktop App in same workspace!!!

    By Desktop do you mean Windows GUI using Alpha's Desktop development or do you mean a "desktop browser-based" application. If the later, they both use security framework so I don't see why there would be a problem, it would be the same in both cases. If you mean a traditional Windows Desktop app, the security systems are different and you should post a similar question on the Desktop forum like "how do I expose the Desktop security tables" or similar. I never understood where those users lived in a Desktop app.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  3. #3
    Member
    Real Name
    Cornelius Laubscher
    Join Date
    Dec 2014
    Posts
    66

    Default Re: Mobile App + Desktop App in same workspace!!!

    Quote Originally Posted by Steve Wood View Post
    By Desktop do you mean Windows GUI using Alpha's Desktop development or do you mean a "desktop browser-based" application. If the later, they both use security framework so I don't see why there would be a problem, it would be the same in both cases. If you mean a traditional Windows Desktop app, the security systems are different and you should post a similar question on the Desktop forum like "how do I expose the Desktop security tables" or similar. I never understood where those users lived in a Desktop app.
    Steve,
    It's the windows browser based system.
    My issue is that when I open the mobile login screen, I get forwarded back to the browser login screen. When I log into the browser screen I get to the normal grid which is correct. I have a separate "mobile" menu system in the same workspace and the mobile login should take me there. I also want to use the same userid for the login, but separate login screens. One for mobile and one for browser

  4. #4
    Member brad.lindsay69@gmail.com's Avatar
    Real Name
    Brad Lindsay
    Join Date
    Jul 2011
    Location
    Auckland, NZ
    Posts
    73

    Default Re: Mobile App + Desktop App in same workspace!!!

    ...I have what you need working but I used to have this issue a lot...I have a couple of apps each with a different log in component for a mobile and a desktop web browser - they work fine now.... I recall using the mobile (phone) log-in used to sometimes re-direct to the desktop web browser view (on my phone) drove me nuts...I cant recall exactly what I did to fix it...as an aside I also now know when I create a new ux login for a smart phone it is best to use a working example, when I build new ones I sometimes get a random result like the login page does not size correctly, I cant figure out why or how to force it to size correctly (other then tilting the phone or hitting the back button on my S5)...

    In my working example I have a lot of code now as I save and recall cookies for remember me functions and I have pattern swipe login options (the standard username and password is impractical in my book) , again I cant recall exactly how I fixed the issue but here are some pieces of my code in the mobile ux where I don't have the issue, try these, they may help...

    1) afterLogin - client side event handler , there is a javascript statement {dialog.object}.panelSetActive('PANEL_APPLICATION'); I thought this would manage the transition of the page but I had the same issue you did, looking at my code just now I see I created a new statement for this event handler {dialog.object}.runAction('InsertUXintoPanel');. The action InsertUXintoPanel is built in the UX dialog properties (Javascript actions) and the action opens a ux component and herfe I choose the app I want to re-direct to (my main mobile app) after logging in. The target is a panel and the panel is PANEL_APPLICATION (for me, a5 default off the template UX) . I'm pretty new to the run object method of the dialog but I'm finding it very useful in other parts of my app, if you need some more info or pics when I get some time I'll help as much as I can.

    The other issue I found is I could log in (from the mob login to the mob app) but then when I logged out meaning to go back to the mobile log-in I would get directed to the web browser log-in grrr, try the following
    2) Javascript onClick event of logout button I use this code... location.href = 'logout.a5w'; ...I don't use the standard dialog.logout() statement.
    2a) then in the a5w logout page I made I have this code

    <%a5

    a5ws_logoutuser(session, request, response)
    SESSION.ABANDON()

    dim vDevice as C = Request.UserAgent
    if containsi(vDevice,"ipad") then
    response.redirect("TabbedUI_MainMobile.a5w")
    else if containsi(vDevice,"android")then

    response.redirect("mobile_login.a5w")' this is where I needed to end back, this hosts my mobile login ux component
    else
    response.redirect("TabbedUI_Main.a5w")
    end if

    %>

    I'm very much a part time developer but I think these code snippets fixed my issues, if they dont let me know and I'll have a closer look to see if there was some other methods I knew...good luck. Also be interested to know what the A5 gurus think...probably a much simply way...

    Brad

  5. #5
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,119

    Default Re: Mobile App + Desktop App in same workspace!!!

    I handled this completely different having the same needs. I created (sometimes duplicate) componants with different usergroups. For example, I made a button linking to a grid for field reports, a company owner and secretary would want access so they see this "button" in the tabbedui because of their respective usergroup. A technician, who would usually be out in the field on a mobile device would see the same thing except this time the database information is presented in a UX so when he logs into the tabbedui he only sees the components (buttons) that are running UX's
    Since the company owner and secretary usergroups are looking at a grid (which in this case is read only) if they want to modify, or create a new field report I created a button to open the UX in a window, that way the width settings of 100% don't look retarded since I set the width of the window at that time.

    I know this doesn't really answer your question but it is a different approach that can handle your basic needs, hope this helps.
    To me this is a better approach than trying to get the screen size and presenting all of the various aspects of my application, first it's easier.
    Trying to figure out all of the space requirements per grid/UX would be a living hell, secondly - I personally do not like websites that limit my content based on what my screen size is and many times I request the desktop site on my phones browser because even googles "mobile friendly" versions of their content annoy me. Try accessing 3-4 different gmail accounts' contacts...hand me a desktop PC please!

    Anyway, again I hope this helps. With some creativity you can present a decent user experience for both in the same tabbedui.

    You could create, permissions groups that only present mobile friendly UX's and let the user decide when they login if they want a desktop or a mobile device experience...

    oh the many ways to design.

  6. #6
    Member
    Real Name
    Cornelius Laubscher
    Join Date
    Dec 2014
    Posts
    66

    Default Re: Mobile App + Desktop App in same workspace!!!

    Hi Brad,

    Thanks for the very useful information. I did exactly what you said, however, it still seems to revert back to the normal desktop [browser] login and does NOT forward me to the UX in question. Please see if you can find something else you might have done to sort this.

    I also have the issue of [if isolating the mobile system to its own workspace where the login etc works fine] that I get a blank panel after login. Only when I actually refresh the browser does it load my "Menu UX]. Nowhere can I find a place to force a refresh after login

  7. #7
    Member brad.lindsay69@gmail.com's Avatar
    Real Name
    Brad Lindsay
    Join Date
    Jul 2011
    Location
    Auckland, NZ
    Posts
    73

    Default Re: Mobile App + Desktop App in same workspace!!!

    Hi Cornelius...ok I'll have another look later today...re your second issue, I had the same problem, what I discovered after banging my head against a brick wall for a few hours is that it is not a blank screen but the top left hand corner of the log-in screen and the log-in screen is now very large. If you pinch zoom or change the orientation of your phone (or in my case with the Samsung 5 I push the back button) it will also fix the issue (same effect as a refresh) I also looked for ages to find a method to force a refresh but could not find one. Eventually I rebuilt the component and restarted the WAS so many times I eventually got a component that worked, I can't tell you what it is with the component I have that now works other than it does and when I need a new one I simply copy this, if I build a new one from scratch I seem to keep get the same issues.

    So my suggestion is...plan A is rebuild it (...just thinking, did you use the second piece of code in the logout btn as above) from scratch and see if that works, Plan B I'll figure out how to upload a copy my working version and perhaps you can modify that for your needs and that will work?

    I've got to go to work but I'll have a sqiz at the code later today and see if I can see what else I ended up doing to help with the original issue (I'm sure what I am doing is the long way be great if an A5 guru had the quick answer and would share it)

    Cheers
    Brad

  8. #8
    Member
    Real Name
    Cornelius Laubscher
    Join Date
    Dec 2014
    Posts
    66

    Default Re: Mobile App + Desktop App in same workspace!!!

    ha Ha Brad. Thanks for the help. I bet you become a guru if you spend lots and lots of hours on A5 as well as know what you're talking about. In my case I could spend the next few years and still be a greenhorn!!!

    The blank screen actually appears AFTER a successful login. The issue with the small login screen I sorted [as you did]. Its the transition between login and my panel application/menu that don't seem to complete at all. When I refresh the browser it actually loads my login and immediately transitions to my menu system and loads the correct panel.

  9. #9
    Member brad.lindsay69@gmail.com's Avatar
    Real Name
    Brad Lindsay
    Join Date
    Jul 2011
    Location
    Auckland, NZ
    Posts
    73

    Default Re: Mobile App + Desktop App in same workspace!!!

    LOL. I am firmly somewhere between beginner and intermediate, the more I look at this I doubt I'll ever get beyond intermediate but its turned into a hobby and I am starting to monetise it which is great. I havn't had the issue of the blank screen after login. If you're using the template UX with mobile security I would have through that would work...if you haven't tried it, try the method I expained in my first post where you create an action to open the UX (actual app) in the target panel...happy to walk you through that if you need a hand.

    Re the original issue, I went through my code again and found another piece that may help...instead of the logout code I suggested above (sorry I have a few versions), put the following in your event handler for the logout button.

    {dialog.object}.logout();
    {dialog.object}.destroyChildComponent('PAT_MOB_APP_CHILD');

    In this example my app is called Pat_mob_app. I haven't had a chance to review but looking at this I am guessing you need to put the name of your app in uppercase and append with _CHILD (and wrap in single quotes). Hope that helps?
    Cheers
    Brad

Similar Threads

  1. Replies: 2
    Last Post: 05-08-2014, 07:04 PM
  2. demo of app created in 10-12 hours for mobile & desktop web - created in v12 beta
    By Richard Rabins in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 04-17-2013, 02:46 PM
  3. Can an A5 desktop app integrate with the A5 web app server?
    By Synlap in forum Application Server Version 10 - Web/Browser Applications
    Replies: 9
    Last Post: 09-02-2010, 11:07 PM
  4. Can you integrate a desktop app with the web app?
    By TerriH in forum Application Server Version 10 - Web/Browser Applications
    Replies: 13
    Last Post: 08-02-2010, 08:48 PM
  5. Convert Desktop App to Web App
    By gbaxgter in forum Archived Wishlist
    Replies: 2
    Last Post: 10-26-2009, 05:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •