Results 1 to 2 of 2

Thread: Best practice for dynamically changing views in an app based on server-supplied data?

  1. #1
    Sencha Premium Member
    Join Date
    Jan 2014
    Vote Rating

    Default Best practice for dynamically changing views in an app based on server-supplied data?

    Hi all,

    I am about to write a ticketing application and want to use Sencha Touch for this.
    The general work flow of buying a ticket is always the same, but depending on the event / location, additional details might be required from the buyer. For example, one location could provide additional delivery options and thus the client needs to display additional input fields and transmit the data back to the ticketing server in the web.

    The information about what kind of additional information is required is stored on the server. This is necessary, because the information can change from one day to another.

    My question is whether the following concept makes sense within sencha and what kind of caveats there might be:

    I have a standard workflow for buying a ticket that is stored on the mobile application. After each step of the buying process I submit data to the server and sometimes request some data, e.g., available seats. The server will answer my query and also submit what kind of additional information he wants to have in the next step. This "workflow update" consists of a description of a view on some kind of abstraction level. Sencha Touch will then create a new view based on this workflow update and the buyer will enter the information as requested.

    Are there any best practices for creating this workflow update, or should I arrange it totally different?
    Thanks in advance for taking a look at this.

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    All you would need to do is check the response and if the server returned extra items then just add them items to the base items for the next view. Shouldn't be too complicated.

    Only caveat I see is if the mobile device looses connection like on a mobile network although it seems like your app will be transmitting data frequently so this is more of a larger issue of your app not this one technique.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:

Posting Permissions

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