Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxWeb Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Divers
Thread ID:
00413129
Message ID:
00413494
Vues:
20
>>I'm trying to learn what I can about FoxWeb here and it seems to me that every time the user clicks the Submit button or whatever button it fires off a command back to the server which then runs a program on the back end.
>>
>>Every time a program is kicked off it (apparently) has to re-open any tables that are involved and re-set the environment. If, for instance, the user is performing some commands against a complicated view that takes 3 seconds to open he's going to have to wait a minimum of 3 seconds every time he clicks a Submit button before he gets his answer back.
>>
>>Is there a way around this? How can I keep any tables/views open between submissions from the user?
>>
>>TIA,
>
>I use FoxWeb here at crane all the time. The state-less problem that you are experiencing is one that exist for all web programming apps. There are ways you can get around it, but having a table open or a temp query available for a user to use may not be such a good idea. As you dont know if that user closed down the browser, is just sitting there thinking, or went to lunch. So when would the server release the table or the query. I would recommend the following:
>
>Ensure that your query is fully optimized. Add indexes if needed and ensure that you are querying them correctly.
>
>Once the user submits their query and you return something to them, you might want to send back hidden fields that contain the keys to the data they are looking at. Then if they resubmit from the page you sent, you read the hidden key values and do a query directly on the record without having to do another lengthy query.
>
>Try to avoid queries that return a massive amount of records. I limit all my queries here to showing only 10-20 records to the user at a time. If their query hits on 250 records I will show only the first 10-20 and then let them know that there were 250 total. In most cases they will improve their query to get a smaller subset.
>
>If you want to go over anything about FoxWeb or how I have used it here at Crane please feel free to email me and we can go off line on this issue.

Thanks for your reply, Bret. Your comment about returning 10-20 records at a time emphasizes the need to find ways to maintain the state of the last query (SELECT TOP n... SELECT NEXT n...). However, the decision here to use FoxWeb was a highly political one made by people who don't know what they're doing.

In the event that I can't get them to change their minds (I just started here last week, but I was hired as a FoxPro expert), I'll be in touch. Will you be in Miami?
-cjh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform