Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Routing / Back&Fwd Navigation overwriting in Alpha

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Routing / Back&Fwd Navigation overwriting in Alpha

    At work have a single-page web application developed using Alpha Anywhere and I have been tasked with figuring out how to overwrite the browsers native Back/Forward navigation functionality so that when users hit the back button, they go back to the previous page they were on within the app instead of back to the login screen. I'm still pretty new to using Alpha and to being a developer, so this is a problem I have no had to solve personally before, but I know it is a common issue due to all the single page web applications that exist today. I found the historyBack and historyForward methods in the Alpha documentation, so my thought was that perhaps if I figured out how to overwrite the native Back/Fwd browser functionality, I could use these methods in their place. Am I on the right track there? I know there are a lot of libraries for doing this sort of routing in React and other javascript frameworks, but I'm having trouble figuring out how to implement things like that, which have instructions that call for installing with NPM and then bundling in with WebPack, from within Alpha.

    I am certain that a person out there has tackled this problem before and implemented a solution within Alpha, and I was hoping that someone who had could guide me in the right direction. I don't necessarily even need to save the user's state in terms of what options they may have selected on a given page that changed the page dynamically. That would certainly be a nice touch, but all I'm being asked for right now is to make it so when the user clicks on Back or Forward in their browser or using their mouse that this behaves as they would expect on a normal, old school webpage and takes them back or forward within the app and not just back to the login screen.

    Any help on this issue that can be offered would be greatly appreciated. Thank you in advance.
    Last edited by stephenirving; 03-14-2019, 10:39 AM. Reason: typos

    #2
    Re: Routing / Back&Fwd Navigation overwriting in Alpha

    You might be able to cobble together a partial solution for this using plugins and hacks, but overall you're not really entitled to mess with browser functionality and you'll be thwarted by the browser. Even if you do manage some kind of solution for one browser, it probably won't work for another.

    The "old school" web pages you reference are multiple single web pages through which you can move. Your application may be a single-page application... but it wraps multiple PanelCards which have their own navigation. This is something you won't be able to break out of.

    Comment


      #3
      Re: Routing / Back&Fwd Navigation overwriting in Alpha

      Probably the best you can get out of an AA app is to warn the user they are about to leave. Make sure you turn on the "Prompt when navigate away from page":

      For tabbedUI: Go to properties page and checkmark it.

      If a UX or a5w page is your main page then you might have to put in a little javascript. Here's a stackoverflow article that mentions what the browser mfgs have (NOT) done for us application developers:

      https://stackoverflow.com/questions/...s-page-when-ch

      Looking at how Google Docs operates, you'll see as you go to different docs in your folder that you are getting a different URL. That is how Alpha would need to work its navigation to allow the browser back & fwd to work.
      Last edited by RichCPT; 03-15-2019, 01:03 AM.

      Comment


        #4
        Re: Routing / Back&Fwd Navigation overwriting in Alpha

        I understand from the message that you have a single-page web app plus an additional login page. An a5w page for each, right? If not, I would imagine that while in the SPA, the browser's back button would take the user back to whatever different website they were on before coming to your app.

        I am thinking that in addition to the 2 pages, the login page and the SPA, how about creating a 3rd a5w special routing page? After login, the user is routed to the routing page which then determines what content to present next to the user.

        Then, when the user hits the browser back button immediately after logging in; they go to the routing page. The routing page's first action is to determine if the user is still logged in and if so, redirects them back to where they were; that is, if the routing system's rules are configured that way for that situation.

        Or let's say the user hits the browser back button while on "page 10" of the SPA. Again depending on the rules, the routing system makes sure that they are still logged in, then either sends the user back to where they just were or triggers off a new pipeline of functions to go and/or do something different.

        Some basic information that the routing page might need in order to route the user correctly:
        - is the user still logged in?
        - what "page" are they are coming from and/or what is the source event or what control triggered the call to the routing page?
        - is there any variable that would help the system determine where the user should be routed to next?

        Anyway, I have a similar issue but for a PhoneGap app that has been getting very difficult to maintain/update.
        I've been thinking about implementing this sort of system but instead of a routing page I would have a routing function. Any time that the user would trigger an event that would take them somewhere else in the app, the very first call (well, maybe the 2nd after the "wait spinner") would be to the routing function.

        Comment


          #5
          Re: Routing / Back&Fwd Navigation overwriting in Alpha

          If you use Alphas built in security it will for sure kill your real SPA because Alphas main concept in security is redirecting. Same is in practice when using js routing.

          I have moved to security Apis. Most simple is Http Basic Authentication which I have found is perfect for one page applications. It is easy and simple and secure. Now some old school developers will raise hand for a foul but we have https now so today Basic Auth is again widely used and supported for example with Twitter. Of course there is still the cache clearing task but when using a business application it is always wise to log out when you are done to make sure that cache is cleared.

          Unfortunately Was does not support Basic Auth (as far as I know) so you need to use frontend reverse proxy that has web server support but that is recommend in any way with Was. Question of how Alpha IIS supports Basic Auth I leave for others.

          Ken

          Comment

          Working...
          X