FoxInCloud
Newbie questions from an oldie
Gravatar is a globally recognized avatar based on your email address. Newbie questions from an oldie
  Pengers
  All
  Dec 1, 2018 @ 12:55pm

Hi There,

I am starting a new project that will almost certainly require web access. FoxInCloud would seem the most likely solution.

I have been programming Fox since v2.6 was new so I was wondering if there were any advice anyone could give me on programming practices to smooth the transition to web based via FoxInCloud. i.e. A Do’s and Don’ts sort of thing?

I have other projects running which may also benefit from going in this direction, but I have never started an attempt at conversion.

regards, Alan

Gravatar is a globally recognized avatar based on your email address. re: Newbie questions from an oldie
  Gilles Lajot-Sarthou
  Pengers
  Dec 2, 2018 @ 12:40am

Hi Alan

Did you use vfp9 sp2 to make your applications ? FoxInCloud is only running under VFP9 Sp2..

If it's yes, you have to go step by step. The first is to make a very small project containing:

  • a VCX class library derived from the VFP native class library
  • an SCX form based on the form class of your VCX and containing some simple objects (TextBox, BTN, etc.)
  • a start-up PRG (ex: main.prg)
  • a prg of initialization of the VFP environment of your application (ex: init.prg)
  • a table containing some fields whose contents are to be displayed and modified from the form Once the project is completed and verified and its executable validated in its execution You have to download the assistant F.A.A .. The continuation after the realization of these two stages .. See you soon..

Regards Gilles from France

Gravatar is a globally recognized avatar based on your email address. re: Newbie questions from an oldie
  Pengers
  Gilles Lajot-Sarthou
  Dec 2, 2018 @ 11:16am

Hi Gilles,

Thank you for answering my post.

Yes to vfp9 Sp2. I will do as you suggest.

Does the init.prg contain the stuff that went into the config.fpw file?

My main.prg normally has a settings.prg that is called from there very early.

Alan (from England)

Gravatar is a globally recognized avatar based on your email address. re: Newbie questions from an oldie
  FoxInCloud Support - Thierry N.
  Pengers
  Dec 3, 2018 @ 01:35am

Hi Alan,

As FoxInCloud is able to adapt to almost any way of using VFP, there's no specific do and don'ts as you would expect.

However, based on users' experience, a FoxInCloud Web Application is easier to adapt, run and maintain using these design options:

  • forms with private datasession
  • variables: local rather than 'private', public all declared at program startup
  • if you use views and queries, strong focus on optimization
  • plain xBase VFP data access is just as fine (VFP tables on the Web server are perfectly safe)
  • event code executing in methods rather than in standalone procedure
  • make sure to understand and remember the start/stop events of forms and controls and their role (eg. LISA G)

In my opinion, the best way to get into the logic of a system is to read some code written for that system. I encourage you to install FoxInCloud Web Application Studio and study the 'FoxInCloud Live Tutorial' application.

Please make sure to raise here any question such as 'why do you do that such way', etc. That may help you and maybe many developers understand the principles behind FoxInCloud.

© 1996-2018