Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
14
Erster Beitrag:
vor 8 Jahren, 4 Monaten
Letzter Beitrag:
vor 8 Jahren, 4 Monaten
Beteiligte Autoren:
Ola, Jimbo, DarrenF, Jeff Graham, Piet van Zanten

WD14 RAD pattern/template questions

Startbeitrag von Ola am 20.07.2009 21:55

Hi all

I am trying to find the head and tail of WD14's template/pattern system.

1) WD doesn't let me specify a procedure name with parameters for a window template: the editor error complains that the models of windows have no prototype... So how do I pass parameters to a window generated from a template? With global variables? This would be a giant step backwards from WD11 RAD, although nothing new: already in the 80's in Clarion CPD the RAD-generated windows received their parameters as global variables; this just requires a few of lines extra code.

2) I don't feel comfortable with the idea of populating the file's items into a form template using a scrolling supercontrol like suggested in the help. I would rather like to populate the file items into a tab control in a more conventional way, like in WD11 RAD. I am thinking of deleting the supercontrols from the generated windows and copying the tabs populated in my WD11 version RAD-generated windows into WD14 generated RAD windows, but this really does not sound very RAD-like. Any hints in this respect?

3) Are there any rules on how the window templates should/must be named in the RAD pattern project?
I first named my templates W_RADFileX_TBL/_FRM/_REL and thought that this might be te reason for some problems I had. For my second template version and generation I renamed the patterns WIN_RADFileX_TBL/_FRM/_REL, but this did not have much effect on the problems.

4) I haven't found any editable samples of RAD patterns in WD14. Are there any?

Some of my experiences:

1) Key control names cannot be referred?
The key control name in the template code (like IDRADFileA) creates an error even though the referred control clearly exists in the forms's super control!?
- Got it! The name is not correct, if the control belongs to the super control. Cut and "special paste" it out of the super control area, or use the correct name including the name of the super control, like SC_FORM.IDRADfileA.

2) Intentional errors
My templates have errors. They are intentional. For instance references to global variables or procedures that do not exist in the pattern project, but do exist in, or will be added to the target project. Is this allowed?
I even have some references to some parameter type files that do not exist in the RAD pattern's analysis. Is this OK?

3) Generating the pattern:
The selection table "Elements that can be generated on their own" shows no templates at all! Consequently, if I want to generate a new window in the target project, neither the pattern nor its window templates are available. Perhaps this is a template naming issue?

4) Placing the pattern file
The help file tells to copy the pattern file to:
(WD14 directory)\Programs\Data\Patterns\RAD\WD\Patterns
...but perhaps this is wrong, as there is no such directory. The correct place to copy the pattern file would seem to be:
(WD14 directory)\Programs\Data\Models\RAD\WD\Patterns\
...because that's where the other patterns are.

5) Templates generate only templates
My first full RAD generation tests (when the templates were named W_RADFileX_TBL/_FRM/_REL) produced only window templates in the target project, no "production" windows at all: some of the generated templates were named like WINTPL_ + the original template window name in the RAD pattern project (like WINTPL_W_RADFILEB_FRM), and some with a real files name, like (WINTPL_W_CUSTOMER_FRM), but they were all templates, not useable windows.

My second attempt of full generation was done with the templates having names in this format: WIN_RADFileX_TBL/_FRM/_REL). Also this time no production windows were generated, but the generated templates in the target project were named like in the template project, with some having the name of a real file, some a template file:
WIN_APARAMI_TBL
WIN_CATEGORY_TBL
WIN_CONTROL_TBL
WIN_CUSTOMER_TBL
WIN_ORDERLINES_REL
WIN_ORDERS_TBL
WIN_PRODUCT_TBL
WIN_RADFileA_FRM
WIN_RADFileB_FRM
WIN_RADFileB_TBL
WIN_RADFileC_FRM
WIN_RADFileC_TBL
WIN_SUPPLIER_TBL
...No TPL was added to the names during the second generation!

6) Programming charter
Most variables in the generated templates were messed up with the "Programming Charter", which seems to be on by default, and cannot be turned off. See message chain titled "Programmin charter settings - 1000 times slower" for solution.

7) Double global procedures
The global procedures in the RAD pattern project will be copied to the target project in SET_Global_Procedure_of_(RAD pattern name), and these will create conflicts. I just deleted this extra set of procedures from the target project and that seemed to solve this problem.

Sofar, I haven't been able to generate a single working window with my own templates in the version 14 pattern RAD, full RAD generation. The generation process only warns, that there are errors in the code, but doesmnot show the errors and indicates no specific reason, why the generation does not work as expected.

I would like to hear any comments on these issues, or any instructions from anybody who have tested the full RAD with a full set of template patterns.

Is the full RAD possible with own templates, or am I charging against windmills?

regards
Ola Pedersen
http://www.pienoismalli.com

Antworten:

Hi,

I am lifting this, as I have expanded the text quite a lot. I would like to hear others' experiences, good or bad, with the full generation template pattern RAD.

Ola

von Ola - am 30.07.2009 17:31
Further testing the pattern RAD...

Tested WD14's full RAD with "Simple RAD" template set. Got working windows, but something is missing:

No templates were copied to the target project.

So where should I maintain the code generated from the pattern's templates? The editable original of the Simple RAD template project is not available. At least I have not found it anywhere.

Or am I understanding wrong the whole full RAD pattern concept wrong? Can full RAD windows be maintained from the templates at all, or is just a one-way "RAD" like the full RAD in WD11?

Ola

von Ola - am 30.07.2009 20:11
OK,

Somebody please correct me if I am wrong,
**************************************************
but the WD14 pattern full rad seems to be just a different version of WD11 full rad. The major difference is that in WD11 the code was written in model files (like in old Clarion), and in WD14 in template windows and controls. Both can be very difficult to get working. Documentation is far from good. I managed to make my own working models for WD11, but so far not for WD14, and it seems that it is not worth even trying. The WD14 "rad" actually seems to be worse than WD11 "rad": in 11 you can populate the file items automatically into a tab control (which feels very logical to me), but in 14 they are populated into a vertically scrolling supercontrol (which feels weird to me).

The great disadvantage in both of them is that they are one-shot only. You can rapidly generate the majority of an application, but that's it. Any development after the first generation must be made manually to each window.

That's no real RAD in my opinion. In a real RAD, after the first generation, you can continuously maintain the main logic of the windows (and even procedures) through models or templates, without destroying anything already generated, like Clarion has had it since mid/late 80's. In WD this is not yet possible.

I got a completetely false understanding of this new WD14 "rad" from the brochures and even from this forum. Perhaps the word "template" was the major misleader. In WD's full "rad" the templates are used only once, for the first shot only. After that you are on your own, maintaining all the windows manually.

I think that PC Soft is falsely advertizing WD as a "rapid application development" tool. It may be rapid for creating the app, but not for developing it in the long run.

Ola

von Ola - am 31.07.2009 12:54
Hi Ola,

Do ever get the feeling you're talking in an empty room? ;)

RAD seems to be something people keep very close to their chests - and I can't blame them. At the end of the day we are all in a commercial arena and why give away commercial "secrets" if it's involved a lot of effort to produce it.

WD is a RAD tool - if you have a good basic design and modelled it reasonably well, then (in my experience), you can produce good quality code/solutions very quickly indeed, but don't confuse PC Soft's version of RAD (Rapid Application Development) with something like Object Orientated programming/design where re-use is the order of the day. As I intimated in your other post about templates, I didn't have time to teach myself every nuance of the WD toolset so I could then apply that to producing the perfect RAD!

That said - I do feel that PCS could do a lot more to improve RAD as well - some documentation wouldn't go amiss - a programming reference manual, blag, blah! It's all been said before ;)

I can only wish you luck...



von DarrenF - am 31.07.2009 14:49
Hi Ola,

I have the impression that most programmers that have used Windev from the early days don't use RAD at all. If I speak for myself, I have not taken the time to take the plunge. In all the years I worked with Windev I have created a huge amount of windows that can be easily adapted to the use of a different datafile. In most cases I just have to change a single variable or a constant This takes me far less time then studying the RAD. So excuse me (us) if this subject raises hardly any response.

Regards,
Piet



von Piet van Zanten - am 31.07.2009 15:03
Hi,

Yes, you've hit the nail on the head - what's the age old addage - "time is money" ;)

Perhaps PCS should admit defeat with the full RAD and use the time saved to write some full reference documentation for the bits that actually work "out of the box" so to speak!? Controversial :eek:

von DarrenF - am 31.07.2009 15:21
Hi Ola,

1 - I started a project to generate a v14RAD pattern some months ago. I intended to simulate something like the old RAD11 pattern with the new v14RAD because I do use RAD11 extensively for most of my projects and don't want to break the appearance of those projects. However, the project is still unfinished because there are more pressing things to do. Whenever I find time, I'll do it and will discuss all upcoming problems with PCS Tech Support if there are any. I promised to publish the project and a full cook-book for WD users in order to make their own.

2 - Yes, I'm still using RAD11. I apply any necessary changes to the templates (code + form) in WinDev 11 and copy the resulting .MDL files to the appropriate directories in WD14. There is a cook-book (in German language) which describes the necessary changes / additions which have to be done to the freshly generated windows of verious types in order to get them seamlessly working within an MDI environment. I'm using WinDev with procdural code / H-commands and MDI only. RAD11 template code is (more or less easily) translateable using our project RADTranslate, which enables you to get RAD11 in your local language.

Kind regards,
Guenter

von Jimbo - am 31.07.2009 15:47
Hi RAD Fans,

I too have used RAD for selected functions. However, I would prefer to have a RAD that I could modify instead of generating with the WD 11 RAD and then modifying the windows.

Long ago I put in a suggestion that PC Soft provide the source for RAD such that we can modify it at our own risk and not have to start from scratch like you have, Ola.

Maybe we should all put in such suggestions again and again until PC Soft listens.

Cheers,
Jeff Graham

von Jeff Graham - am 31.07.2009 17:35
Quote
Jeff Graham
Hi RAD Fans,

I too have used RAD for selected functions. However, I would prefer to have a RAD that I could modify instead of generating with the WD 11 RAD and then modifying the windows.

Long ago I put in a suggestion that PC Soft provide the source for RAD such that we can modify it at our own risk and not have to start from scratch like you have, Ola.

Maybe we should all put in such suggestions again and again until PC Soft listens.

Cheers,
Jeff Graham


Hi Jeff,

the source for RAD11 is there and you can modify it! You just have to fire up WinDev 11 / US and you can modify the templates there.

Kind regards,
Guenter

von Jimbo - am 31.07.2009 18:16
You are right, WD has many features which help speed up the development. And it already has all the necessary features, spread out in different places, to compile a real RAD, but so far they have chosen not to do so. Instead they just brag that they have a RAD, which they don't.

regards
Ola

von Ola - am 02.08.2009 07:39
Piet,

I think your decision has been a good one, but I have a different starting point: I had already been totally "spoiled" by a super RAD in the DOS environment, so a Windows RAD naturally was the "killer" feature that sold WD to me. I was disappointed, but I gave it time studying it and waiting for it to grow up since version 5.5, but it still hasn't. It is not much better nor easier today than it was 10 years ago.

regards
Ola




von Ola - am 02.08.2009 07:50
Jeff,

Both the 11 and 14 rads are already very editable. I actually made in 11 rad a rather extensive bi-lingual model file system with practically all the features I had developed in my DOS rad in around 20 years(!), but decided not to utilize it in real production because it is one-shot only, not maintainable through the model files. Then I tried the same in a smaller scale with 14 rad (because I falsely thought that it would be a real RAD where a re-generation does not destroy the earlier generation), but with no results other than I realized that 14 rad is also a one-shooter and not worth wasting any more time.

regards
Ola



von Ola - am 02.08.2009 08:08
Hi Guenter,

The model files are in

(WD11 or 14 dir)\Programs\Data\Models\RAD\WD\

They are plain text files with .MDL extension. For modifications they should be copied to

(WD11 or14 dir)\Personal\Models\RAD\WD\

where WD reads them first.

I haven't checked where they are in WD14.

I have done all my WD11 rad code modifications directly to the model files (under the personal dir), not to the templates in the WD environment.

I checked the rad templates in the environment too, but noticed that they are not good for much, only the sizing of the window and controls and placing of the controls (is there more in them or are there some other templates which affect the rad model code?).

The model files do not comply with the KISS principle. They are very complicated because they try to cover many environments and programming techniques (lots of nested "IFfing"), so it is easy to mess them up: It is very important to maintain the correct figure and placing of the @ marks in them.

I think I'll now consider my time spent with the pitiful archebuse "rads" of both 11 and 14 as an investment in learning WD. I'll now concentrate on developing the separate windows templates in 14 (from the windows I have generated with my 11 rad), which in some respects are more limited than 11 rad and are much slower to use initially, but which in the long run allow the maintenance of the windows through the templates (and through analysis, too?).

regards
Ola

von Ola - am 02.08.2009 09:00
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.