Ok, from the range of answers I got back so far, all of which I appreciate greatly, it is clear that I need to clarify my project and goals just a bit in order to narrow the width of the discussion.
Here's the situation and the parameters:
1) I have a client that is still using a btrieve based dos system that I created 20+ years ago to keep up with the names, addresses and activities of in excess of 30k+ members. The system creates a lot of specialized reports for the client and they have been unwilling to move to anything else because of all the custom functionality built into the system. (In case you are wondering, they are running the system on virtualized XP Pro systems as the verision of btrieve they have dies on anything later.)
2) I want to upgrade them to a VFP9 + Windows user interface and application in order to get them off the virtual machines, to take advantage of a lot of the speed and features available in VFP9 and I could certainly completely re-write this system in VFP using native dbf table if I chose to do so. HOWEVER.
3) In the long term, I can see a future for this client where they have a web-based front-end for members of their group to login remotely via the web and maintain their demographic data themselves thereby de-centralizing a lot of the data entry process currently done by the home office.
4) Plus, I want the best of both worlds. I want the users in the central office to take advantage of all the functionality I can bring to them with VFP9 as a networked desktop application AND at some point I want to add a web-based front-end for remote users to update various data points.
The final requirement is not really a requirement but a desire on my part to learn how to best handle the data entry process and build the user interface functionality in VFP9 to create a desktop application using SQL as data storage. I am used to creating a form with a tabbed pageframe on it, creating a data grid on the first tab, adding some filter capabilities for searches and then putting all the fields on the second or third or fourth or however many detail tabs I need to conveniently display the data I want the user to edit, add, delete or save through a sub-classed button bar that I drop on the form and connect to the table in question. My sub-classed tools use CURSORGETPROP to detect any changes and prompt the user to save the buffered changes if necessary.
I have come to the understanding from all I've read that this method of providing grid based data entry screens for users (while perfectly workable in my data interface projects) will not be as efficient when it comes to using SQL instead of native DBFs. I have also read lots of different opinions on how best to let the user search for the specific record they want to use and I have tried to review as many programs as I can to get some sense of the generally accepted method that makes the most sense for a best practices user interface but no joy so far. Once a user finds the record in question, I need to figure out what code snippets I need to build to detect changes and push the updates back to the SQL database and all the other stuff that goes along with that.
My hope was that someone could point me toward some good VFP examples or articles specific to VFP that outlines the best practices that seemed to work best. I am not interested in moving to a development tool other than VFP9, because my personal goal in doing the project is to give me a way to learn to program the best user interface I can with VFP as the front-end and SQL as the backend.
Hopefully that clarifies my original question just a bit.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Paul,
WRT to searching records and ergonomics, here is a sample VFP application that works on either the LAN or the Web with a similar user interface:
http://foxincloud.com/ip/ (test database, you can go ahead modifying anything you want)
Login SG Pass SG
Some data entry are made directly in the grid, some on sub-forms
Works with VFP data for now, ready for a migration to SQL server using Cursor Adapters.
Thierry Nivelet FoxInCloud Give your VFP app a second life in the cloud http://foxincloud.com/
Le 03/02/2017 à 17:50, Paul H. Tarver a écrit :
Ok, from the range of answers I got back so far, all of which I appreciate greatly, it is clear that I need to clarify my project and goals just a bit in order to narrow the width of the discussion.
Here's the situation and the parameters:
I have a client that is still using a btrieve based dos system thatI created 20+ years ago to keep up with the names, addresses and activities of in excess of 30k+ members. The system creates a lot of specialized reports for the client and they have been unwilling to move to anything else because of all the custom functionality built into the system. (In case you are wondering, they are running the system on virtualized XP Pro systems as the verision of btrieve they have dies on anything later.)
I want to upgrade them to a VFP9 + Windows user interface andapplication in order to get them off the virtual machines, to take advantage of a lot of the speed and features available in VFP9 and I could certainly completely re-write this system in VFP using native dbf table if I chose to do so. HOWEVER.
In the long term, I can see a future for this client where they havea web-based front-end for members of their group to login remotely via the web and maintain their demographic data themselves thereby de-centralizing a lot of the data entry process currently done by the home office.
Plus, I want the best of both worlds. I want the users in thecentral office to take advantage of all the functionality I can bring to them with VFP9 as a networked desktop application AND at some point I want to add a web-based front-end for remote users to update various data points.
The final requirement is not really a requirement but a desire on my part to learn how to best handle the data entry process and build the user interface functionality in VFP9 to create a desktop application using SQL as data storage. I am used to creating a form with a tabbed pageframe on it, creating a data grid on the first tab, adding some filter capabilities for searches and then putting all the fields on the second or third or fourth or however many detail tabs I need to conveniently display the data I want the user to edit, add, delete or save through a sub-classed button bar that I drop on the form and connect to the table in question. My sub-classed tools use CURSORGETPROP to detect any changes and prompt the user to save the buffered changes if necessary.
I have come to the understanding from all I've read that this method of providing grid based data entry screens for users (while perfectly workable in my data interface projects) will not be as efficient when it comes to using SQL instead of native DBFs. I have also read lots of different opinions on how best to let the user search for the specific record they want to use and I have tried to review as many programs as I can to get some sense of the generally accepted method that makes the most sense for a best practices user interface but no joy so far. Once a user finds the record in question, I need to figure out what code snippets I need to build to detect changes and push the updates back to the SQL database and all the other stuff that goes along with that.
My hope was that someone could point me toward some good VFP examples or articles specific to VFP that outlines the best practices that seemed to work best. I am not interested in moving to a development tool other than VFP9, because my personal goal in doing the project is to give me a way to learn to program the best user interface I can with VFP as the front-end and SQL as the backend.
Hopefully that clarifies my original question just a bit.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Hi Paul,
now it's much clear what you want. At first seemed to me like you wanted to change technology.
Ok, so these are just some points about general good practices applied on VFP and used in practice in my experience:
- Forget grids, or at least forget showing ALL the data to the user. This do not work with C/S system, because do not scale. You will need predefined filters on the search screens, so the user can change them, but never take out all of them, so the query to the server brings a limited scope of records. You can bring records in chunks if you need to show something with "more records" or "next page" or similar, but never bring all the data. That's fundamental.
- You can cache part of the data for those tables that are hevily used if needed, maybe a view that updates from time to time based on a datetime timestamp for synchronizing
- All logic that you can put on the database, is reusable by other fronts. In some cases some processes are faster on the database
- Forget about locking records. There are no such thing on C/S systems (well, technically you can, but it's really a bad idea)
- If going to web in some point, then Thierry's FoxInCloud could be a good idea
- For local editing of data you can use a loca cursor if you want, so you can use the same data modification detection techniques you already know (getNextModified(), etc) but at the end the data must go to the server, so no need to have a real table in local. Another approach is using an object whose properties are bound to the ControlSources (we use this approach in one of our apps), but in this case all the change-detection is by code
- This seems a big project, so Source Control is very important. You have many options here, I suggest using a DVCS (Distributed Version Control System)
If using git, then you have these projects available:
Lutz Scheffler's "Bin 2 Text extension" at VFPx: http://vfpx.codeplex.com/wikipage?title=Bin%202%20Text%20Extension
Mike Potjer's "Git Utils" at github: https://github.com/mikepotjer/vfp-git-utils
If using Plastc, then you can use the "Plastic tools for Visual FoxPro 9": https://github.com/fdbozzo/plasticscm-tools-for-visual-foxpro-9
If using another SCM/DVCS like SourceSafe, Mercurial or similar, then you can use FoxBin2Prg because of the two-way conversion between binaries and text: http://vfpx.codeplex.com/wikipage?title=FoxBin2Prg
On the server side, you mentioned SQLServer. I suppose your client have a license, but if not, there is no need to buy one, you can use any DB, like PostgreSQL, MariaDB, etc, for free.
Finally, if you want to test your code (more good practices:) in an automated or semi-automated way, then you can use the excellent Eric Selje's FoxUnit: http://vfpx.codeplex.com/wikipage?title=FoxUnit&referringTitle=Home
May be others can add more on the SQL topic, articles or more resources.
Fernando D. Bozzo
2017-02-03 17:50 GMT+01:00 Paul H. Tarver paul@tpcqpc.com:
Ok, from the range of answers I got back so far, all of which I appreciate greatly, it is clear that I need to clarify my project and goals just a bit in order to narrow the width of the discussion.
Here's the situation and the parameters:
I have a client that is still using a btrieve based dos system thatI created 20+ years ago to keep up with the names, addresses and activities of in excess of 30k+ members. The system creates a lot of specialized reports for the client and they have been unwilling to move to anything else because of all the custom functionality built into the system. (In case you are wondering, they are running the system on virtualized XP Pro systems as the verision of btrieve they have dies on anything later.)
I want to upgrade them to a VFP9 + Windows user interface andapplication in order to get them off the virtual machines, to take advantage of a lot of the speed and features available in VFP9 and I could certainly completely re-write this system in VFP using native dbf table if I chose to do so. HOWEVER.
In the long term, I can see a future for this client where theyhave a web-based front-end for members of their group to login remotely via the web and maintain their demographic data themselves thereby de-centralizing a lot of the data entry process currently done by the home office.
Plus, I want the best of both worlds. I want the users in thecentral office to take advantage of all the functionality I can bring to them with VFP9 as a networked desktop application AND at some point I want to add a web-based front-end for remote users to update various data points.
The final requirement is not really a requirement but a desire on my part to learn how to best handle the data entry process and build the user interface functionality in VFP9 to create a desktop application using SQL as data storage. I am used to creating a form with a tabbed pageframe on it, creating a data grid on the first tab, adding some filter capabilities for searches and then putting all the fields on the second or third or fourth or however many detail tabs I need to conveniently display the data I want the user to edit, add, delete or save through a sub-classed button bar that I drop on the form and connect to the table in question. My sub-classed tools use CURSORGETPROP to detect any changes and prompt the user to save the buffered changes if necessary.
I have come to the understanding from all I've read that this method of providing grid based data entry screens for users (while perfectly workable in my data interface projects) will not be as efficient when it comes to using SQL instead of native DBFs. I have also read lots of different opinions on how best to let the user search for the specific record they want to use and I have tried to review as many programs as I can to get some sense of the generally accepted method that makes the most sense for a best practices user interface but no joy so far. Once a user finds the record in question, I need to figure out what code snippets I need to build to detect changes and push the updates back to the SQL database and all the other stuff that goes along with that.
My hope was that someone could point me toward some good VFP examples or articles specific to VFP that outlines the best practices that seemed to work best. I am not interested in moving to a development tool other than VFP9, because my personal goal in doing the project is to give me a way to learn to program the best user interface I can with VFP as the front-end and SQL as the backend.
Hopefully that clarifies my original question just a bit.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
forget grids showing ALL the data to the user
FWIW, FoxInCloud comes with a paged grid with sorting & filtering capability: just drop an existing grid at design time into the container class supplied by FoxInCloud and it'll get paged in Web mode. User can set the number of items per page and it'll persist across sessions.
Thierry's FoxInCloud could be a good idea
could also be a real opportunity; doesn't the video I recently posted showing a responsive Web App from a 'regular' VFP app look terrific? ;)
Thierry Nivelet FoxInCloud Give your VFP app a second life in the cloud http://foxincloud.com/
Le 03/02/2017 à 20:11, Fernando D. Bozzo a écrit :
Hi Paul,
now it's much clear what you want. At first seemed to me like you wanted to change technology.
Ok, so these are just some points about general good practices applied on VFP and used in practice in my experience:
- Forget grids, or at least forget showing ALL the data to the user. This
do not work with C/S system, because do not scale. You will need predefined filters on the search screens, so the user can change them, but never take out all of them, so the query to the server brings a limited scope of records. You can bring records in chunks if you need to show something with "more records" or "next page" or similar, but never bring all the data. That's fundamental.
- You can cache part of the data for those tables that are hevily used if
needed, maybe a view that updates from time to time based on a datetime timestamp for synchronizing
- All logic that you can put on the database, is reusable by other fronts.
In some cases some processes are faster on the database
- Forget about locking records. There are no such thing on C/S systems
(well, technically you can, but it's really a bad idea)
- If going to web in some point, then Thierry's FoxInCloud could be a good
idea
- For local editing of data you can use a loca cursor if you want, so you
can use the same data modification detection techniques you already know (getNextModified(), etc) but at the end the data must go to the server, so no need to have a real table in local. Another approach is using an object whose properties are bound to the ControlSources (we use this approach in one of our apps), but in this case all the change-detection is by code
- This seems a big project, so Source Control is very important. You have
many options here, I suggest using a DVCS (Distributed Version Control System)
If using git, then you have these projects available:
Lutz Scheffler's "Bin 2 Text extension" at VFPx: http://vfpx.codeplex.com/wikipage?title=Bin%202%20Text%20Extension
Mike Potjer's "Git Utils" at github: https://github.com/mikepotjer/vfp-git-utils
If using Plastc, then you can use the "Plastic tools for Visual FoxPro 9": https://github.com/fdbozzo/plasticscm-tools-for-visual-foxpro-9
If using another SCM/DVCS like SourceSafe, Mercurial or similar, then you can use FoxBin2Prg because of the two-way conversion between binaries and text: http://vfpx.codeplex.com/wikipage?title=FoxBin2Prg
On the server side, you mentioned SQLServer. I suppose your client have a license, but if not, there is no need to buy one, you can use any DB, like PostgreSQL, MariaDB, etc, for free.
Finally, if you want to test your code (more good practices:) in an automated or semi-automated way, then you can use the excellent Eric Selje's FoxUnit: http://vfpx.codeplex.com/wikipage?title=FoxUnit&referringTitle=Home
May be others can add more on the SQL topic, articles or more resources.
Fernando D. Bozzo
2017-02-03 17:50 GMT+01:00 Paul H. Tarver paul@tpcqpc.com:
Ok, from the range of answers I got back so far, all of which I appreciate greatly, it is clear that I need to clarify my project and goals just a bit in order to narrow the width of the discussion.
Here's the situation and the parameters:
I have a client that is still using a btrieve based dos system thatI created 20+ years ago to keep up with the names, addresses and activities of in excess of 30k+ members. The system creates a lot of specialized reports for the client and they have been unwilling to move to anything else because of all the custom functionality built into the system. (In case you are wondering, they are running the system on virtualized XP Pro systems as the verision of btrieve they have dies on anything later.)
I want to upgrade them to a VFP9 + Windows user interface andapplication in order to get them off the virtual machines, to take advantage of a lot of the speed and features available in VFP9 and I could certainly completely re-write this system in VFP using native dbf table if I chose to do so. HOWEVER.
In the long term, I can see a future for this client where theyhave a web-based front-end for members of their group to login remotely via the web and maintain their demographic data themselves thereby de-centralizing a lot of the data entry process currently done by the home office.
Plus, I want the best of both worlds. I want the users in thecentral office to take advantage of all the functionality I can bring to them with VFP9 as a networked desktop application AND at some point I want to add a web-based front-end for remote users to update various data points.
The final requirement is not really a requirement but a desire on my part to learn how to best handle the data entry process and build the user interface functionality in VFP9 to create a desktop application using SQL as data storage. I am used to creating a form with a tabbed pageframe on it, creating a data grid on the first tab, adding some filter capabilities for searches and then putting all the fields on the second or third or fourth or however many detail tabs I need to conveniently display the data I want the user to edit, add, delete or save through a sub-classed button bar that I drop on the form and connect to the table in question. My sub-classed tools use CURSORGETPROP to detect any changes and prompt the user to save the buffered changes if necessary.
I have come to the understanding from all I've read that this method of providing grid based data entry screens for users (while perfectly workable in my data interface projects) will not be as efficient when it comes to using SQL instead of native DBFs. I have also read lots of different opinions on how best to let the user search for the specific record they want to use and I have tried to review as many programs as I can to get some sense of the generally accepted method that makes the most sense for a best practices user interface but no joy so far. Once a user finds the record in question, I need to figure out what code snippets I need to build to detect changes and push the updates back to the SQL database and all the other stuff that goes along with that.
My hope was that someone could point me toward some good VFP examples or articles specific to VFP that outlines the best practices that seemed to work best. I am not interested in moving to a development tool other than VFP9, because my personal goal in doing the project is to give me a way to learn to program the best user interface I can with VFP as the front-end and SQL as the backend.
Hopefully that clarifies my original question just a bit.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
I just got back from my summer holidays (it is summer now in the southern hemisphere) and after a few hours of reading emails accumulated during my absence, I stumbled upon the below reply by Thierry.
Years ago I wrote an article on the UniversalThread dealing with the issue of bringing a set of records from a remote source which could be of help.
https://www.universalthread.com/ShowHeaderArticleOneItem.aspx?ID=39291
Regards
Rafael Copquin
On 03/02/2017 17:12, Thierry Nivelet wrote:
forget grids showing ALL the data to the user
FWIW, FoxInCloud comes with a paged grid with sorting & filtering capability: just drop an existing grid at design time into the container class supplied by FoxInCloud and it'll get paged in Web mode. User can set the number of items per page and it'll persist across sessions.
Thierry's FoxInCloud could be a good idea
could also be a real opportunity; doesn't the video I recently posted showing a responsive Web App from a 'regular' VFP app look terrific? ;)
Thierry Nivelet FoxInCloud Give your VFP app a second life in the cloud http://foxincloud.com/
Le 8 févr. 2017 à 14:48, rafael copquin rafael.copquin@gmail.com a écrit :
I stumbled upon the below reply by Thierry.
Hi Rafael,
Just curious, what do you mean by ’stumbled'? surprised? shocked? Thks
Thierry Nivelet
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Hi Thierry
You know English is a second language to me. Perhaps I should have said "I came across" or "just read this". Having just returned from holidays I may have made a mistake in the way I expressed myself. Maybe careless in the way I wrote it.
I was not at all surprised or shocked. Just used the wrong expression.
Sorry
Rafael
On 08/02/2017 14:38, Thierry Nivelet wrote:
Le 8 févr. 2017 à 14:48, rafael copquin rafael.copquin@gmail.com a écrit :
I stumbled upon the below reply by Thierry.
Hi Rafael,
Just curious, what do you mean by ’stumbled'? surprised? shocked? Thks
Thierry Nivelet
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Just wanted to let you know that you used "stumbled" correctly, Rafael. (It's the meaning behind the web site StumbleUpon.com.) In addition, your English is better that of most writers who are native to the language, so no need to apologize.
Mike
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of rafael copquin Sent: Wednesday, February 08, 2017 3:40 PM To: profoxtech@leafe.com Subject: Re: SQL Backend Question - Part Deux
Hi Thierry
You know English is a second language to me. Perhaps I should have said "I came across" or "just read this". Having just returned from holidays I may have made a mistake in the way I expressed myself. Maybe careless in the way I wrote it.
I was not at all surprised or shocked. Just used the wrong expression.
Sorry
Rafael
On 08/02/2017 14:38, Thierry Nivelet wrote:
Le 8 févr. 2017 à 14:48, rafael copquin rafael.copquin@gmail.com a écrit :
I stumbled upon the below reply by Thierry.
Hi Rafael,
Just curious, what do you mean by ’stumbled'? surprised? shocked? Thks
Thierry Nivelet
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Mike
... better that ... ??? Surely that should be ... better _than_ that ...
Paul
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Michael Glassman Sent: 08 February 2017 23:00 To: profoxtech@leafe.com Subject: RE: SQL Backend Question - Part Deux
Just wanted to let you know that you used "stumbled" correctly, Rafael. (It's the meaning behind the web site StumbleUpon.com.) In addition, your English is better that of most writers who are native to the language, so no need to apologize.
Mike
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of rafael copquin Sent: Wednesday, February 08, 2017 3:40 PM To: profoxtech@leafe.com Subject: Re: SQL Backend Question - Part Deux
Hi Thierry
You know English is a second language to me. Perhaps I should have said "I came across" or "just read this". Having just returned from holidays I may have made a mistake in the way I expressed myself. Maybe careless in the way I wrote it.
I was not at all surprised or shocked. Just used the wrong expression.
Sorry
Rafael
On 08/02/2017 14:38, Thierry Nivelet wrote:
Le 8 févr. 2017 à 14:48, rafael copquin rafael.copquin@gmail.com a écrit :
I stumbled upon the below reply by Thierry.
Hi Rafael,
Just curious, what do you mean by ’stumbled'? surprised? shocked? Thks
Thierry Nivelet
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
_______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/006601d2825f$089fa570$19def050$@Pione... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. Report [OT] Abuse: http://leafe.com/reportAbuse/006601d2825f$089fa570$19def050$@PioneerDrama.co...
Now we are getting to hear to the heart of what I'm looking for, specifically your first point, Fernado: Changing my VFP grid mentality into something that is scalable for a client server approach for the data storage. Fundamentally, the questions I have are: What does the best practices user interface for updating data look like in a client/server environment vs native VFP desktop, and what are the general things required to make that work. In my standard environment it works like this:
1) open a table in buffered mode 2) let the user browse that data 3) user choices record to edit 4) user edits field and when field loses focus, we check to see if there were any changes. 5) If changes detected, we enable a "save" button and if the user tries to exit the screen without clicking "save" we prompt them to save or discard. 6) If 'save' option made by clicking button or confirming save query, then new data is written to table.
I am aware that this outline of procedure would necessarily be different in the client/server configuration and that is exactly what I'm trying to determine and what are the best ways to implement that client/server approach.
Your information was very helpful and answered a couple of questions for me already.
Do you know of any applications out there that are written in VFP with a client/server backend that might have a demo that I can review or try in order to get some ideas?
Thanks again!
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: Fernando D. Bozzo [mailto:fdbozzo@gmail.com] Sent: Friday, February 03, 2017 1:11 PM To: profoxtech@leafe.com Subject: Re: SQL Backend Question - Part Deux
Hi Paul,
now it's much clear what you want. At first seemed to me like you wanted to change technology.
Ok, so these are just some points about general good practices applied on VFP and used in practice in my experience:
- Forget grids, or at least forget showing ALL the data to the user. This do not work with C/S system, because do not scale. You will need predefined filters on the search screens, so the user can change them, but never take out all of them, so the query to the server brings a limited scope of records. You can bring records in chunks if you need to show something with "more records" or "next page" or similar, but never bring all the data. That's fundamental.
- You can cache part of the data for those tables that are hevily used if needed, maybe a view that updates from time to time based on a datetime timestamp for synchronizing
- All logic that you can put on the database, is reusable by other fronts. In some cases some processes are faster on the database
- Forget about locking records. There are no such thing on C/S systems (well, technically you can, but it's really a bad idea)
- If going to web in some point, then Thierry's FoxInCloud could be a good idea
- For local editing of data you can use a loca cursor if you want, so you can use the same data modification detection techniques you already know (getNextModified(), etc) but at the end the data must go to the server, so no need to have a real table in local. Another approach is using an object whose properties are bound to the ControlSources (we use this approach in one of our apps), but in this case all the change-detection is by code
- This seems a big project, so Source Control is very important. You have many options here, I suggest using a DVCS (Distributed Version Control System)
If using git, then you have these projects available:
Lutz Scheffler's "Bin 2 Text extension" at VFPx: http://vfpx.codeplex.com/wikipage?title=Bin%202%20Text%20Extension
Mike Potjer's "Git Utils" at github: https://github.com/mikepotjer/vfp-git-utils
If using Plastc, then you can use the "Plastic tools for Visual FoxPro 9": https://github.com/fdbozzo/plasticscm-tools-for-visual-foxpro-9
If using another SCM/DVCS like SourceSafe, Mercurial or similar, then you can use FoxBin2Prg because of the two-way conversion between binaries and text: http://vfpx.codeplex.com/wikipage?title=FoxBin2Prg
On the server side, you mentioned SQLServer. I suppose your client have a license, but if not, there is no need to buy one, you can use any DB, like PostgreSQL, MariaDB, etc, for free.
Finally, if you want to test your code (more good practices:) in an automated or semi-automated way, then you can use the excellent Eric Selje's FoxUnit: http://vfpx.codeplex.com/wikipage?title=FoxUnit&referringTitle=Home
May be others can add more on the SQL topic, articles or more resources.
Fernando D. Bozzo
2017-02-03 17:50 GMT+01:00 Paul H. Tarver paul@tpcqpc.com:
Ok, from the range of answers I got back so far, all of which I appreciate greatly, it is clear that I need to clarify my project and goals just a bit in order to narrow the width of the discussion.
Here's the situation and the parameters:
I have a client that is still using a btrieve based dos system
that
I created 20+ years ago to keep up with the names, addresses and activities of in excess of 30k+ members. The system creates a lot of specialized reports for the client and they have been unwilling to move to anything else because of all the custom functionality built into the system. (In case you are wondering, they are running the system on virtualized XP Pro systems as the verision of btrieve they have dies on anything later.)
I want to upgrade them to a VFP9 + Windows user interface andapplication in order to get them off the virtual machines, to take advantage of a lot of the speed and features available in VFP9 and I could certainly completely re-write this system in VFP using native dbf table if I chose to do so. HOWEVER.
In the long term, I can see a future for this client where theyhave a web-based front-end for members of their group to login remotely via the web and maintain their demographic data themselves thereby de-centralizing a lot of the data entry process currently done by the home office.
Plus, I want the best of both worlds. I want the users in thecentral office to take advantage of all the functionality I can bring to them with VFP9 as a networked desktop application AND at some point I want to add a web-based front-end for remote users to update various data points.
The final requirement is not really a requirement but a desire on my part to learn how to best handle the data entry process and build the user interface functionality in VFP9 to create a desktop application using SQL as data storage. I am used to creating a form with a tabbed pageframe on it, creating a data grid on the first tab, adding some filter capabilities for searches and then putting all the fields on the second or third or fourth or however many detail tabs I need to conveniently display the data I want the user to edit, add, delete or save through a sub-classed button bar that I drop on the form and connect to the table in question. My sub-classed tools use CURSORGETPROP to detect any changes and prompt the user to save the buffered changes if necessary.
I have come to the understanding from all I've read that this method of providing grid based data entry screens for users (while perfectly workable in my data interface projects) will not be as efficient when it comes to using SQL instead of native DBFs. I have also read lots of different opinions on how best to let the user search for the specific record they want to use and I have tried to review as many programs as I can to get some sense of the generally accepted method that makes the most sense for a best practices user interface but no joy so far. Once a user finds the record in question, I need to figure out what code snippets I need to build to detect changes and push the updates back to the SQL database and all the other stuff that goes along with that.
My hope was that someone could point me toward some good VFP examples or articles specific to VFP that outlines the best practices that seemed to work best. I am not interested in moving to a development tool other than VFP9, because my personal goal in doing the project is to give me a way to learn to program the best user interface I can with VFP as the front-end and SQL as the backend.
Hopefully that clarifies my original question just a bit.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
You can just use a parameterized remote view or cursor adapter : procedure form.load() use removeView nodata procedure form.Init() viewParm = someValue requery(remoteView) FOR EACH loCntl IN this.Controls FOXOBJECT BindEvent(m.loCntl, 'LostFocus', m.this.cmdCancel, 'Refresh’) BindEvent(m.loCntl, 'LostFocus', m.this.cmdSave, 'Refresh') BindEvent(m.loCntl, 'LostFocus', m.thisForm.cmdOK, 'Refresh') ENDFOR
procedure cmdCancel.Refresh this.Enabled = thisForm.lCustomerModified()
procedure lCustomerModified * Has customer been modified? LOCAL lnRecno, llResult
lnRecno = Recno('v_customer') && Buffering 5 GO TOP IN v_customer llResult = GetNextModified(0, 'v_customer', .T.) > 0 IF m.lnRecno < 0 OR Between(m.lnRecno, 1, Reccount('v_customer')) GO m.lnRecno IN v_customer ENDIF
RETURN m.llResult
Thierry Nivelet FoxInCloud Give your VFP app a second life in the cloud http://foxincloud.com/ http://foxincloud.com/ Le 03/02/2017 à 22:19, Paul H. Tarver a écrit :
Now we are getting to hear to the heart of what I'm looking for, specifically your first point, Fernado: Changing my VFP grid mentality into something that is scalable for a client server approach for the data storage. Fundamentally, the questions I have are: What does the best practices user interface for updating data look like in a client/server environment vs native VFP desktop, and what are the general things required to make that work. In my standard environment it works like this:
- open a table in buffered mode
- let the user browse that data
- user choices record to edit
- user edits field and when field loses focus, we check to see if there
were any changes. 5) If changes detected, we enable a "save" button and if the user tries to exit the screen without clicking "save" we prompt them to save or discard. 6) If 'save' option made by clicking button or confirming save query, then new data is written to table.
I am aware that this outline of procedure would necessarily be different in the client/server configuration and that is exactly what I'm trying to determine and what are the best ways to implement that client/server approach.
Your information was very helpful and answered a couple of questions for me already.
Do you know of any applications out there that are written in VFP with a client/server backend that might have a demo that I can review or try in order to get some ideas?
Thanks again!
Paul H. Tarver Tarver Program Consultants, Inc.
-----Original Message----- From: Fernando D. Bozzo [mailto:fdbozzo@gmail.com mailto:fdbozzo@gmail.com] Sent: Friday, February 03, 2017 1:11 PM To: profoxtech@leafe.com mailto:profoxtech@leafe.com Subject: Re: SQL Backend Question - Part Deux
Hi Paul,
now it's much clear what you want. At first seemed to me like you wanted to change technology.
Ok, so these are just some points about general good practices applied on VFP and used in practice in my experience:
- Forget grids, or at least forget showing ALL the data to the user. This do
not work with C/S system, because do not scale. You will need predefined filters on the search screens, so the user can change them, but never take out all of them, so the query to the server brings a limited scope of records. You can bring records in chunks if you need to show something with "more records" or "next page" or similar, but never bring all the data. That's fundamental.
- You can cache part of the data for those tables that are hevily used if
needed, maybe a view that updates from time to time based on a datetime timestamp for synchronizing
- All logic that you can put on the database, is reusable by other fronts.
In some cases some processes are faster on the database
- Forget about locking records. There are no such thing on C/S systems
(well, technically you can, but it's really a bad idea)
- If going to web in some point, then Thierry's FoxInCloud could be a good
idea
- For local editing of data you can use a loca cursor if you want, so you
can use the same data modification detection techniques you already know (getNextModified(), etc) but at the end the data must go to the server, so no need to have a real table in local. Another approach is using an object whose properties are bound to the ControlSources (we use this approach in one of our apps), but in this case all the change-detection is by code
- This seems a big project, so Source Control is very important. You have
many options here, I suggest using a DVCS (Distributed Version Control System)
If using git, then you have these projects available:
Lutz Scheffler's "Bin 2 Text extension" at VFPx: http://vfpx.codeplex.com/wikipage?title=Bin%202%20Text%20Extension http://vfpx.codeplex.com/wikipage?title=Bin%202%20Text%20Extension
Mike Potjer's "Git Utils" at github: https://github.com/mikepotjer/vfp-git-utils https://github.com/mikepotjer/vfp-git-utils
If using Plastc, then you can use the "Plastic tools for Visual FoxPro 9": https://github.com/fdbozzo/plasticscm-tools-for-visual-foxpro-9 https://github.com/fdbozzo/plasticscm-tools-for-visual-foxpro-9
If using another SCM/DVCS like SourceSafe, Mercurial or similar, then you can use FoxBin2Prg because of the two-way conversion between binaries and text: http://vfpx.codeplex.com/wikipage?title=FoxBin2Prg http://vfpx.codeplex.com/wikipage?title=FoxBin2Prg
On the server side, you mentioned SQLServer. I suppose your client have a license, but if not, there is no need to buy one, you can use any DB, like PostgreSQL, MariaDB, etc, for free.
Finally, if you want to test your code (more good practices:) in an automated or semi-automated way, then you can use the excellent Eric Selje's FoxUnit: http://vfpx.codeplex.com/wikipage?title=FoxUnit&referringTitle=Home http://vfpx.codeplex.com/wikipage?title=FoxUnit&referringTitle=Home
May be others can add more on the SQL topic, articles or more resources.
Fernando D. Bozzo
2017-02-03 17:50 GMT+01:00 Paul H. Tarver paul@tpcqpc.com mailto:paul@tpcqpc.com:
Ok, from the range of answers I got back so far, all of which I appreciate greatly, it is clear that I need to clarify my project and goals just a bit in order to narrow the width of the discussion.
Here's the situation and the parameters:
I have a client that is still using a btrieve based dos systemthat
I created 20+ years ago to keep up with the names, addresses and activities of in excess of 30k+ members. The system creates a lot of specialized reports for the client and they have been unwilling to move to anything else because of all the custom functionality built into the system. (In case you are wondering, they are running the system on virtualized XP Pro systems as the verision of btrieve they have dies on anything later.)
I want to upgrade them to a VFP9 + Windows user interface andapplication in order to get them off the virtual machines, to take advantage of a lot of the speed and features available in VFP9 and I could certainly completely re-write this system in VFP using native dbf table if I chose to do so. HOWEVER.
In the long term, I can see a future for this client where theyhave a web-based front-end for members of their group to login remotely via the web and maintain their demographic data themselves thereby de-centralizing a lot of the data entry process currently done by the home office.
Plus, I want the best of both worlds. I want the users in thecentral office to take advantage of all the functionality I can bring to them with VFP9 as a networked desktop application AND at some point I want to add a web-based front-end for remote users to update various data points.
The final requirement is not really a requirement but a desire on my part to learn how to best handle the data entry process and build the user interface functionality in VFP9 to create a desktop application using SQL as data storage. I am used to creating a form with a tabbed pageframe on it, creating a data grid on the first tab, adding some filter capabilities for searches and then putting all the fields on the second or third or fourth or however many detail tabs I need to conveniently display the data I want the user to edit, add, delete or save through a sub-classed button bar that I drop on the form and connect to the table in question. My sub-classed tools use CURSORGETPROP to detect any changes and prompt the user to save the buffered changes if necessary.
I have come to the understanding from all I've read that this method of providing grid based data entry screens for users (while perfectly workable in my data interface projects) will not be as efficient when it comes to using SQL instead of native DBFs. I have also read lots of different opinions on how best to let the user search for the specific record they want to use and I have tried to review as many programs as I can to get some sense of the generally accepted method that makes the most sense for a best practices user interface but no joy so far. Once a user finds the record in question, I need to figure out what code snippets I need to build to detect changes and push the updates back to the SQL database and all the other stuff that goes along with that.
My hope was that someone could point me toward some good VFP examples or articles specific to VFP that outlines the best practices that seemed to work best. I am not interested in moving to a development tool other than VFP9, because my personal goal in doing the project is to give me a way to learn to program the best user interface I can with VFP as the front-end and SQL as the backend.
Hopefully that clarifies my original question just a bit.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
I read that you are doing a 100% rewrite and none of it is in fox-anything?
That new system will also have a data and a lot of reports.
In the future you want to go and redo it again for the web, but not now.
Looks like twice the work in reality unless you process most of the data on the backend and just about every request gives you a dataset back, updates and edits don't return a lot of data yeah I know.
Here at work the word twice would get the project killed. Do it once for now and the future.
You may not know anything about programming UI for the web and that is why you'll do it first and then maybe come back. How long do you think it will take just to port it into Fox? 3 months or 6?
On Fri, Feb 3, 2017 at 10:50 AM, Paul H. Tarver paul@tpcqpc.com wrote:
Ok, from the range of answers I got back so far, all of which I appreciate greatly, it is clear that I need to clarify my project and goals just a bit in order to narrow the width of the discussion.
Here's the situation and the parameters:
I have a client that is still using a btrieve based dos system thatI created 20+ years ago to keep up with the names, addresses and activities of in excess of 30k+ members. The system creates a lot of specialized reports for the client and they have been unwilling to move to anything else because of all the custom functionality built into the system. (In case you are wondering, they are running the system on virtualized XP Pro systems as the verision of btrieve they have dies on anything later.)
I want to upgrade them to a VFP9 + Windows user interface andapplication in order to get them off the virtual machines, to take advantage of a lot of the speed and features available in VFP9 and I could certainly completely re-write this system in VFP using native dbf table if I chose to do so. HOWEVER.
In the long term, I can see a future for this client where theyhave a web-based front-end for members of their group to login remotely via the web and maintain their demographic data themselves thereby de-centralizing a lot of the data entry process currently done by the home office.
Plus, I want the best of both worlds. I want the users in thecentral office to take advantage of all the functionality I can bring to them with VFP9 as a networked desktop application AND at some point I want to add a web-based front-end for remote users to update various data points.
The final requirement is not really a requirement but a desire on my part to learn how to best handle the data entry process and build the user interface functionality in VFP9 to create a desktop application using SQL as data storage. I am used to creating a form with a tabbed pageframe on it, creating a data grid on the first tab, adding some filter capabilities for searches and then putting all the fields on the second or third or fourth or however many detail tabs I need to conveniently display the data I want the user to edit, add, delete or save through a sub-classed button bar that I drop on the form and connect to the table in question. My sub-classed tools use CURSORGETPROP to detect any changes and prompt the user to save the buffered changes if necessary.
I have come to the understanding from all I've read that this method of providing grid based data entry screens for users (while perfectly workable in my data interface projects) will not be as efficient when it comes to using SQL instead of native DBFs. I have also read lots of different opinions on how best to let the user search for the specific record they want to use and I have tried to review as many programs as I can to get some sense of the generally accepted method that makes the most sense for a best practices user interface but no joy so far. Once a user finds the record in question, I need to figure out what code snippets I need to build to detect changes and push the updates back to the SQL database and all the other stuff that goes along with that.
My hope was that someone could point me toward some good VFP examples or articles specific to VFP that outlines the best practices that seemed to work best. I am not interested in moving to a development tool other than VFP9, because my personal goal in doing the project is to give me a way to learn to program the best user interface I can with VFP as the front-end and SQL as the backend.
Hopefully that clarifies my original question just a bit.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
redo it again for the web
Sounds old school! FoxInCloud can save you that pain… ;)
Thierry Nivelet FoxInCloud Give your VFP app a second life in the cloud http://foxincloud.com/
Le 03/02/2017 à 20:22, Stephen Russell a écrit :
I read that you are doing a 100% rewrite and none of it is in fox-anything?
That new system will also have a data and a lot of reports.
In the future you want to go and redo it again for the web, but not now.
Looks like twice the work in reality unless you process most of the data on the backend and just about every request gives you a dataset back, updates and edits don't return a lot of data yeah I know.
Here at work the word twice would get the project killed. Do it once for now and the future.
You may not know anything about programming UI for the web and that is why you'll do it first and then maybe come back. How long do you think it will take just to port it into Fox? 3 months or 6?
On Fri, Feb 3, 2017 at 10:50 AM, Paul H. Tarver paul@tpcqpc.com wrote:
Ok, from the range of answers I got back so far, all of which I appreciate greatly, it is clear that I need to clarify my project and goals just a bit in order to narrow the width of the discussion.
Here's the situation and the parameters:
I have a client that is still using a btrieve based dos system thatI created 20+ years ago to keep up with the names, addresses and activities of in excess of 30k+ members. The system creates a lot of specialized reports for the client and they have been unwilling to move to anything else because of all the custom functionality built into the system. (In case you are wondering, they are running the system on virtualized XP Pro systems as the verision of btrieve they have dies on anything later.)
I want to upgrade them to a VFP9 + Windows user interface andapplication in order to get them off the virtual machines, to take advantage of a lot of the speed and features available in VFP9 and I could certainly completely re-write this system in VFP using native dbf table if I chose to do so. HOWEVER.
In the long term, I can see a future for this client where theyhave a web-based front-end for members of their group to login remotely via the web and maintain their demographic data themselves thereby de-centralizing a lot of the data entry process currently done by the home office.
Plus, I want the best of both worlds. I want the users in thecentral office to take advantage of all the functionality I can bring to them with VFP9 as a networked desktop application AND at some point I want to add a web-based front-end for remote users to update various data points.
The final requirement is not really a requirement but a desire on my part to learn how to best handle the data entry process and build the user interface functionality in VFP9 to create a desktop application using SQL as data storage. I am used to creating a form with a tabbed pageframe on it, creating a data grid on the first tab, adding some filter capabilities for searches and then putting all the fields on the second or third or fourth or however many detail tabs I need to conveniently display the data I want the user to edit, add, delete or save through a sub-classed button bar that I drop on the form and connect to the table in question. My sub-classed tools use CURSORGETPROP to detect any changes and prompt the user to save the buffered changes if necessary.
I have come to the understanding from all I've read that this method of providing grid based data entry screens for users (while perfectly workable in my data interface projects) will not be as efficient when it comes to using SQL instead of native DBFs. I have also read lots of different opinions on how best to let the user search for the specific record they want to use and I have tried to review as many programs as I can to get some sense of the generally accepted method that makes the most sense for a best practices user interface but no joy so far. Once a user finds the record in question, I need to figure out what code snippets I need to build to detect changes and push the updates back to the SQL database and all the other stuff that goes along with that.
My hope was that someone could point me toward some good VFP examples or articles specific to VFP that outlines the best practices that seemed to work best. I am not interested in moving to a development tool other than VFP9, because my personal goal in doing the project is to give me a way to learn to program the best user interface I can with VFP as the front-end and SQL as the backend.
Hopefully that clarifies my original question just a bit.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Stephen,
You mis-understood my plan. The plan is for the networked desktop VFP application to remain in place indefinitely. The web portion, if it ever comes into being would be written in something other than VFP but would access the same SQL database used by the VFP.
VFP Desktop Backend <-----> {SQL, MySQL, Firebird, Postgres,etc} <------> Web Application Frontend
I've already build a similar setup building on a VFP backend desktop application with native DBF files that synchronizes with a FirebirdSQL database which is used by a web front running on a Java server. There are two problems with that configuration: 1) even though we are close to real-time updates, we still aren't really real-time because a synch process must be run to refresh the data on both sides (not a bad or long process but definitely not real-time), and 2) it was built several years ago in Java and I won't repeat that process. Most likely in the future I will use a much friendlier development tool to build the front-end.
I have even considered using MySQL as the database so I could potentially use Wordpress as the frontend platform, let Wordpress handle the login security, and write a plugin to give the user access to their data after they login. Just a thought.
Hope this helps!
Paul H. Tarver Tarver Program Consultants, Inc. Tel: 601-483-4404 Email: paul@tpcqpc.com
-----Original Message----- From: Stephen Russell [mailto:srussell705@gmail.com] Sent: Friday, February 03, 2017 1:22 PM To: profoxtech@leafe.com Subject: Re: SQL Backend Question - Part Deux
I read that you are doing a 100% rewrite and none of it is in fox-anything?
That new system will also have a data and a lot of reports.
In the future you want to go and redo it again for the web, but not now.
Looks like twice the work in reality unless you process most of the data on the backend and just about every request gives you a dataset back, updates and edits don't return a lot of data yeah I know.
Here at work the word twice would get the project killed. Do it once for now and the future.
You may not know anything about programming UI for the web and that is why you'll do it first and then maybe come back. How long do you think it will take just to port it into Fox? 3 months or 6?
On Fri, Feb 3, 2017 at 10:50 AM, Paul H. Tarver paul@tpcqpc.com wrote:
Ok, from the range of answers I got back so far, all of which I appreciate greatly, it is clear that I need to clarify my project and goals just a bit in order to narrow the width of the discussion.
Here's the situation and the parameters:
I have a client that is still using a btrieve based dos system
that
I created 20+ years ago to keep up with the names, addresses and activities of in excess of 30k+ members. The system creates a lot of specialized reports for the client and they have been unwilling to move to anything else because of all the custom functionality built into the system. (In case you are wondering, they are running the system on virtualized XP Pro systems as the verision of btrieve they have dies on anything later.)
I want to upgrade them to a VFP9 + Windows user interface andapplication in order to get them off the virtual machines, to take advantage of a lot of the speed and features available in VFP9 and I could certainly completely re-write this system in VFP using native dbf table if I chose to do so. HOWEVER.
In the long term, I can see a future for this client where theyhave a web-based front-end for members of their group to login remotely via the web and maintain their demographic data themselves thereby de-centralizing a lot of the data entry process currently done by the home office.
Plus, I want the best of both worlds. I want the users in thecentral office to take advantage of all the functionality I can bring to them with VFP9 as a networked desktop application AND at some point I want to add a web-based front-end for remote users to update various data points.
The final requirement is not really a requirement but a desire on my part to learn how to best handle the data entry process and build the user interface functionality in VFP9 to create a desktop application using SQL as data storage. I am used to creating a form with a tabbed pageframe on it, creating a data grid on the first tab, adding some filter capabilities for searches and then putting all the fields on the second or third or fourth or however many detail tabs I need to conveniently display the data I want the user to edit, add, delete or save through a sub-classed button bar that I drop on the form and connect to the table in question. My sub-classed tools use CURSORGETPROP to detect any changes and prompt the user to save the buffered changes if necessary.
I have come to the understanding from all I've read that this method of providing grid based data entry screens for users (while perfectly workable in my data interface projects) will not be as efficient when it comes to using SQL instead of native DBFs. I have also read lots of different opinions on how best to let the user search for the specific record they want to use and I have tried to review as many programs as I can to get some sense of the generally accepted method that makes the most sense for a best practices user interface but no joy so far. Once a user finds the record in question, I need to figure out what code snippets I need to build to detect changes and push the updates back to the SQL database and all the other stuff that goes along with that.
My hope was that someone could point me toward some good VFP examples or articles specific to VFP that outlines the best practices that seemed to work best. I am not interested in moving to a development tool other than VFP9, because my personal goal in doing the project is to give me a way to learn to program the best user interface I can with VFP as the front-end and SQL as the backend.
Hopefully that clarifies my original question just a bit.
Paul H. Tarver Tarver Program Consultants, Inc.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
According to Wikipedia the latest offering from Btrieve is backwards compatible and runs on Win10 https://en.wikipedia.org/wiki/Btrieve#Pervasive_PSQL_v9
This is true, but the application was developed in MagicPC and my version of that product only works with Btrieve v5 and will not work correctly with later versions. We are able to function by using WinXP in a virtual machine and quite frankly if that quits working, I can make it run in a DOS Virtual machine if necessary.
Thanks!
Paul H. Tarver Tarver Program Consultants, Inc. Tel: 601-483-4404 Email: paul@tpcqpc.com
-----Original Message----- From: AndyHC [mailto:andy@hawthorncottage.com] Sent: Sunday, February 05, 2017 5:02 AM To: profoxtech@leafe.com Subject: Re: SQL Backend Question - Part Deux
According to Wikipedia the latest offering from Btrieve is backwards compatible and runs on Win10 https://en.wikipedia.org/wiki/Btrieve#Pervasive_PSQL_v9
[excessive quoting removed by server]
Paul:
The issue with moving from a VFP record-centric view of data to a cursor-centric view as is used in most client-server software is that there are a LOT of gotchas with getting VFP to work that way, and a lot of design decisions you need to make: do you use cursoradaptors, remote views, SQL Passthrough? All three are valid and work, but each has different limitations and issues you need to look out for. Do you use local cursors tied to the remote data? Or do you build your own data objects? Will you be switching backends, say from SQL Express to MariaDB? Then you need to think about a Data Manager and some translations. Do you buffer the local cursors? Do you buffer the remote data? How to you handle rollbacks? What's your strategy on data conflicts: last save wins, rollback and force a retry, or give the user edit controls of then-now-edited data?
From experience, you can spend several years working through all of
these questions, and building a robust underpinning to your application logic, and then find you need to alter your strategies as you see how your software is being used.
Or, you can build your application using a framework someone else has already built. They have an opinion about which tools, commands and strategies to use, and you can build your app on top of their framework as you learn the details of how it works and perhaps why the decision decisions were made. You can ship an app in weeks or months vs. years and continue to enhance it rather than reinventing the wheel. Back in the day (oh, boy, here goes the geezer tales), I installed Visual Maxframe, read the documentation, and shipped the initial app in two weeks.
I have worked with most of the major frameworks: Mere Mortals, Visual MaxFrame, Codebook, West-Wiind, Visual Extend. Sadly, I haven't worked with FoxExpress, which I also hear great things about and whose authors I count as friends. IME, any framework will get you up and running much faster than building it yourself.
If you want to look at real code that people use in real production environments and have tested in real-life conditions, then check out the commercial frameworks. (I haven't shopped in a decade, so perhaps others can say which are still being maintained)
There are also free ones. I know Codebook is available on this very forum (https://leafe.com/dls/cb) and there may be others available.
On Mon, Feb 6, 2017 at 3:14 PM, Paul H. Tarver paul@tpcqpc.com wrote:
This is true, but the application was developed in MagicPC and my version of that product only works with Btrieve v5 and will not work correctly with later versions. We are able to function by using WinXP in a virtual machine and quite frankly if that quits working, I can make it run in a DOS Virtual machine if necessary.
Thanks!
Paul H. Tarver Tarver Program Consultants, Inc. Tel: 601-483-4404 Email: paul@tpcqpc.com
-----Original Message----- From: AndyHC [mailto:andy@hawthorncottage.com] Sent: Sunday, February 05, 2017 5:02 AM To: profoxtech@leafe.com Subject: Re: SQL Backend Question - Part Deux
According to Wikipedia the latest offering from Btrieve is backwards compatible and runs on Win10 https://en.wikipedia.org/wiki/Btrieve#Pervasive_PSQL_v9
[excessive quoting removed by server]
Ted:
It's a pleasure to have you join in on this conversation as your name is one that I have always associated with quality information when it comes to VFP. As a matter of fact, in the course of opening this line of discussion here on ProFoxTech, I did some digging and I found that at some point I purchased a book entitled 'MySQL Client-Server Applications with Visual FoxPro" written by Whil Hentzen and edited by some guy named Ted Roche! :)
Since I started this thread, I've read about 12 of the 22 Chapters and I'm learning some of the answers to some of the questions I have and the examples are giving me some idea of how to proceed.
Based on my reading so far, I'm of an opinion that the fastest way to get this project off the ground (which I've already begun) short of using a framework is to use a combination of SQL Pass-Through and Remote views. My idea would work something like this:
1) User gets a search screen to find the member they want to edit (this is very similar to the current dos experience) 2) Search screen uses SQL Pass-through to query back-end and return results of query to grid for user selection 3) User double clicks on member and opens an edit screen that uses a Remote View to handle SQL Update for a single record. (Same screen could be used to add new user) 4) User closing edit screen triggers confirmation to save or discard changes.
In my case, I feel that most of the data entry required will work perfectly fine using this methodology and will not incur additional keystrokes for the user. All the custom reports will be created using SQL Pass-Through.
My next area of interest is whether I can create the Remote Views programmatically because I'm currently using DSN-Less connection strings to connect and query the database and I would prefer not to have to create a DSN just for the remote views.
Any thoughts about this plan of action?
Thanks!
Paul H. Tarver Tarver Program Consultants, Inc. Tel: 601-483-4404 Email: paul@tpcqpc.com
-----Original Message----- From: Ted Roche [mailto:tedroche@gmail.com] Sent: Monday, February 06, 2017 2:48 PM To: profoxtech@leafe.com Subject: Re: SQL Backend Question - Part Deux
Paul:
The issue with moving from a VFP record-centric view of data to a cursor-centric view as is used in most client-server software is that there are a LOT of gotchas with getting VFP to work that way, and a lot of design decisions you need to make: do you use cursoradaptors, remote views, SQL Passthrough? All three are valid and work, but each has different limitations and issues you need to look out for. Do you use local cursors tied to the remote data? Or do you build your own data objects? Will you be switching backends, say from SQL Express to MariaDB? Then you need to think about a Data Manager and some translations. Do you buffer the local cursors? Do you buffer the remote data? How to you handle rollbacks? What's your strategy on data conflicts: last save wins, rollback and force a retry, or give the user edit controls of then-now-edited data?
From experience, you can spend several years working through all of
these questions, and building a robust underpinning to your application logic, and then find you need to alter your strategies as you see how your software is being used.
Or, you can build your application using a framework someone else has already built. They have an opinion about which tools, commands and strategies to use, and you can build your app on top of their framework as you learn the details of how it works and perhaps why the decision decisions were made. You can ship an app in weeks or months vs. years and continue to enhance it rather than reinventing the wheel. Back in the day (oh, boy, here goes the geezer tales), I installed Visual Maxframe, read the documentation, and shipped the initial app in two weeks.
I have worked with most of the major frameworks: Mere Mortals, Visual MaxFrame, Codebook, West-Wiind, Visual Extend. Sadly, I haven't worked with FoxExpress, which I also hear great things about and whose authors I count as friends. IME, any framework will get you up and running much faster than building it yourself.
If you want to look at real code that people use in real production environments and have tested in real-life conditions, then check out the commercial frameworks. (I haven't shopped in a decade, so perhaps others can say which are still being maintained)
There are also free ones. I know Codebook is available on this very forum (https://leafe.com/dls/cb) and there may be others available.
On Mon, Feb 6, 2017 at 3:14 PM, Paul H. Tarver paul@tpcqpc.com wrote:
This is true, but the application was developed in MagicPC and my version of that product only works with Btrieve v5 and will not work correctly with later versions. We are able to function by using WinXP in a virtual machine and quite frankly if that quits working, I can make it run in a DOS Virtual machine if necessary.
Thanks!
Paul H. Tarver Tarver Program Consultants, Inc. Tel: 601-483-4404 Email: paul@tpcqpc.com
-----Original Message----- From: AndyHC [mailto:andy@hawthorncottage.com] Sent: Sunday, February 05, 2017 5:02 AM To: profoxtech@leafe.com Subject: Re: SQL Backend Question - Part Deux
According to Wikipedia the latest offering from Btrieve is backwards compatible and runs on Win10 https://en.wikipedia.org/wiki/Btrieve#Pervasive_PSQL_v9
[excessive quoting removed by server]
Paul, I tried using remote views some time ago but found them restrictive in that they are held in the database container and sometimes require unrestricted exclusive access to maintain them which isn't always available. This was partially solved by assigning a private dbc database container for every user in their own personal folder so it is open exclusively all the time and so can be manipulated, compressed or modified at will.
However, with the advent of cursor adapters I have found them much more versatile and easier to control, especially if you pre define them and add them into a VCX. Setting up a class of CA's isn't difficult but it is not obvious, especially when it comes to assigning the table database container and connection string which may or may not be modified at runtime.
Dave
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Paul H. Tarver Sent: 07 February 2017 22:13 To: 'Ted Roche' tedroche@gmail.com; profoxtech@leafe.com Subject: RE: SQL Backend Question - Part Deux
Ted:
It's a pleasure to have you join in on this conversation as your name is one that I have always associated with quality information when it comes to VFP. As a matter of fact, in the course of opening this line of discussion here on ProFoxTech, I did some digging and I found that at some point I purchased a book entitled 'MySQL Client-Server Applications with Visual FoxPro" written by Whil Hentzen and edited by some guy named Ted Roche! :)
Since I started this thread, I've read about 12 of the 22 Chapters and I'm learning some of the answers to some of the questions I have and the examples are giving me some idea of how to proceed.
Based on my reading so far, I'm of an opinion that the fastest way to get this project off the ground (which I've already begun) short of using a framework is to use a combination of SQL Pass-Through and Remote views. My idea would work something like this:
1) User gets a search screen to find the member they want to edit (this is very similar to the current dos experience) 2) Search screen uses SQL Pass-through to query back-end and return results of query to grid for user selection 3) User double clicks on member and opens an edit screen that uses a Remote View to handle SQL Update for a single record. (Same screen could be used to add new user) 4) User closing edit screen triggers confirmation to save or discard changes.
In my case, I feel that most of the data entry required will work perfectly fine using this methodology and will not incur additional keystrokes for the user. All the custom reports will be created using SQL Pass-Through.
My next area of interest is whether I can create the Remote Views programmatically because I'm currently using DSN-Less connection strings to connect and query the database and I would prefer not to have to create a DSN just for the remote views.
Any thoughts about this plan of action?
Thanks!
Paul H. Tarver Tarver Program Consultants, Inc. Tel: 601-483-4404 Email: paul@tpcqpc.com
-----Original Message----- From: Ted Roche [mailto:tedroche@gmail.com] Sent: Monday, February 06, 2017 2:48 PM To: profoxtech@leafe.com Subject: Re: SQL Backend Question - Part Deux
Paul:
The issue with moving from a VFP record-centric view of data to a cursor-centric view as is used in most client-server software is that there are a LOT of gotchas with getting VFP to work that way, and a lot of design decisions you need to make: do you use cursoradaptors, remote views, SQL Passthrough? All three are valid and work, but each has different limitations and issues you need to look out for. Do you use local cursors tied to the remote data? Or do you build your own data objects? Will you be switching backends, say from SQL Express to MariaDB? Then you need to think about a Data Manager and some translations. Do you buffer the local cursors? Do you buffer the remote data? How to you handle rollbacks? What's your strategy on data conflicts: last save wins, rollback and force a retry, or give the user edit controls of then-now-edited data?
From experience, you can spend several years working through all of
these questions, and building a robust underpinning to your application logic, and then find you need to alter your strategies as you see how your software is being used.
Or, you can build your application using a framework someone else has already built. They have an opinion about which tools, commands and strategies to use, and you can build your app on top of their framework as you learn the details of how it works and perhaps why the decision decisions were made. You can ship an app in weeks or months vs. years and continue to enhance it rather than reinventing the wheel. Back in the day (oh, boy, here goes the geezer tales), I installed Visual Maxframe, read the documentation, and shipped the initial app in two weeks.
I have worked with most of the major frameworks: Mere Mortals, Visual MaxFrame, Codebook, West-Wiind, Visual Extend. Sadly, I haven't worked with FoxExpress, which I also hear great things about and whose authors I count as friends. IME, any framework will get you up and running much faster than building it yourself.
If you want to look at real code that people use in real production environments and have tested in real-life conditions, then check out the commercial frameworks. (I haven't shopped in a decade, so perhaps others can say which are still being maintained)
There are also free ones. I know Codebook is available on this very forum (https://leafe.com/dls/cb) and there may be others available.
On Mon, Feb 6, 2017 at 3:14 PM, Paul H. Tarver paul@tpcqpc.com wrote:
This is true, but the application was developed in MagicPC and my version of that product only works with Btrieve v5 and will not work correctly with later versions. We are able to function by using WinXP in a virtual machine and quite frankly if that quits working, I can make it run in a DOS Virtual machine if necessary.
Thanks!
Paul H. Tarver Tarver Program Consultants, Inc. Tel: 601-483-4404 Email: paul@tpcqpc.com
-----Original Message----- From: AndyHC [mailto:andy@hawthorncottage.com] Sent: Sunday, February 05, 2017 5:02 AM To: profoxtech@leafe.com Subject: Re: SQL Backend Question - Part Deux
According to Wikipedia the latest offering from Btrieve is backwards compatible and runs on Win10 https://en.wikipedia.org/wiki/Btrieve#Pervasive_PSQL_v9
[excessive quoting removed by server]