Re: How To Help Clipper & Foxpro Users Catch Harbour-HMG ASAP!
Posted: Mon Nov 03, 2014 2:42 pm
Hi,
This is my approach in learning HMG way back in 2007:
1. I don't go into programming right away. I set aside time to first read HMG manual, how it is organize and how I would quickly cross reference the manual. My goal is to familiarize myself with the documentation so I know where to find them.
2. Then I check how Harbour (without HMG and no third party clipper library), can compile pure Clipper code. Then I wrote code to to test RDD (DBFCDX) from my old application, basically the routine that opened the tables, replaced field contents, seek, delete, array handling, numeric calculation, date calculations. All those are done without data entry screen (because that will be the GUI portion). So when I found out that Harbour can do all those, I am quite sure that I only needed to learn how to manage the GUI portion and learn the technique of interfacing HMG+Harbour. For Harbour reference I used Clipper reference books and the NGs and reading those CHANGELOG.TXT of Harbour, HMG and HMG Extended to at least piece together what's going on and to get an insight and somehow connect to the developers mind (those logs are their first hand account, just like a diary if you will).
3. To learn HMG I used <hmgInstallDir>\SAMPLES\Basics\MAIN_DEMO\DEMO.PRG. Of course if you are looking for something you've needed a demo that showcase everything (at least most of it if not all).
4. On the third week I have my old app reborn in HMG+Harbour, though its not fully bug free but I'd be able to smooth them out later on. The rest is history.
5. Since HMG is an open source and evolving, I/we should understand that there won't be a book like manual anytime soon. So you need to read the include files and the corresponding c and prg module of the library (which became my second HMG reference). You can do this to further enhance your knowledge.
6. Use modular programming as much as possible. Since Clipper days I wrote code in modular way (if possible) so when I moved to HMG I basically change the Text User Interface with GUI or forms. Now the @ SAY commands becomes LABEL and @ GET becomes TEXTBOX plus the COMBOBOX, RADIOGROUP, CHECKBOX, etc.
7. Coding in GUI means to forget about SAVESCREEN() and RESTSCREEN(). You need to have a new paradigm which is event driven. Restrict the user to a form by using modal or even then you can prevent it by attaching procedures to ON RELEASE and ON INTERACTIVECLOSE.
8. HMG Controls resembles VB but not exactly the same. So in essence the key in learning HMG is understanding controls and objects EVENTS and PROPERTIES which is contained in the manual. Those are the points to where you can interface your Clipper knowledge towards Harbour and HMG. Later on if you think that you have the feel of it, then exploit to your advantage.
This is my approach in learning HMG way back in 2007:
1. I don't go into programming right away. I set aside time to first read HMG manual, how it is organize and how I would quickly cross reference the manual. My goal is to familiarize myself with the documentation so I know where to find them.
2. Then I check how Harbour (without HMG and no third party clipper library), can compile pure Clipper code. Then I wrote code to to test RDD (DBFCDX) from my old application, basically the routine that opened the tables, replaced field contents, seek, delete, array handling, numeric calculation, date calculations. All those are done without data entry screen (because that will be the GUI portion). So when I found out that Harbour can do all those, I am quite sure that I only needed to learn how to manage the GUI portion and learn the technique of interfacing HMG+Harbour. For Harbour reference I used Clipper reference books and the NGs and reading those CHANGELOG.TXT of Harbour, HMG and HMG Extended to at least piece together what's going on and to get an insight and somehow connect to the developers mind (those logs are their first hand account, just like a diary if you will).
3. To learn HMG I used <hmgInstallDir>\SAMPLES\Basics\MAIN_DEMO\DEMO.PRG. Of course if you are looking for something you've needed a demo that showcase everything (at least most of it if not all).
4. On the third week I have my old app reborn in HMG+Harbour, though its not fully bug free but I'd be able to smooth them out later on. The rest is history.
5. Since HMG is an open source and evolving, I/we should understand that there won't be a book like manual anytime soon. So you need to read the include files and the corresponding c and prg module of the library (which became my second HMG reference). You can do this to further enhance your knowledge.
6. Use modular programming as much as possible. Since Clipper days I wrote code in modular way (if possible) so when I moved to HMG I basically change the Text User Interface with GUI or forms. Now the @ SAY commands becomes LABEL and @ GET becomes TEXTBOX plus the COMBOBOX, RADIOGROUP, CHECKBOX, etc.
7. Coding in GUI means to forget about SAVESCREEN() and RESTSCREEN(). You need to have a new paradigm which is event driven. Restrict the user to a form by using modal or even then you can prevent it by attaching procedures to ON RELEASE and ON INTERACTIVECLOSE.
8. HMG Controls resembles VB but not exactly the same. So in essence the key in learning HMG is understanding controls and objects EVENTS and PROPERTIES which is contained in the manual. Those are the points to where you can interface your Clipper knowledge towards Harbour and HMG. Later on if you think that you have the feel of it, then exploit to your advantage.