PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [WX19] OO Framework and documentation published
[WX19] OO Framework and documentation published
Débuté par Peter H., 17 oct. 2014 18:14 - 7 réponses
Posté le 17 octobre 2014 - 18:14
Hi all,

The WX OO framework that has been shown during webinar 129 on WXLive is now available for download at the PCSoft repository.
http://repository.windev.com/resource.awp…

Downloading this allows you to play around with it and reuse the base classes for your own purposes.

Please note that during the demonstration of this framework I have called for a number (max. 9) of WX-adepts to develop this framework into a real RAD solution for the three products. Some volunteers have already taken contact. If you feel you can add value to the community co-developing this, don't hesitate to contact me as I will be opening up this project to the co-developers via a central SCM.

As a visual says more than a thousand words you can review the framework showcase at <a class="ExternalLink" rel="nofollow" target="_blank" href="http://www.wxlive.us">http://www.wxlive.us</a>

Cheers all,

Peter H.
Posté le 20 octobre 2014 - 10:19
Hi all,

If any of the WX guru's over here want to join in the further development of the above mentioned (already fully functional) open source OO framework, don't hesitate to give a shout.

For now, I would like to limit the number of initial co-developers to 9 as this is a manageable number to get started and get things organized.
Currently there's still room for 5...

I'll be continuing configuring the SCM for this project this week after which the team collectively will be defining the evolution and priorities. Ideally I would like to use the standard project CC for that but have never used that so it requires some more research from my part...
E.g. on future evolution:
- Web service enabling db I/O layer
- Continued implementation for WM
- Other DB support
- ...

Send me an e-mail whenever interested: peter [.] holemans AT mcs2 [dot] eu .

Cheers,

Peter H.

PS: You can download V1 of the framework at:
<a class="ExternalLink" rel="nofollow" target="_blank" href="http://repository.windev.com/resource.awp?file_id=91;wxframework-open-source-oop-multiplateforme-framework-allows-rapid-development-wdwb-and-later">http://repository.windev.com/resource.awp&hellip;</a>
Posté le 20 octobre 2014 - 12:33
Peter,

I watched you presentation and it was very nice. I have been looking to your framework (the older document) in the past, but I had to little experience in WX and too little time to change it to my needs.

I will certainly follow the project and give any feedback.

Here are some remarks:

1) For the framework to be a success it must be usable without modifying the base framework classes. Additions or changes could best be done via inheritance or other options. PC soft did not implement the "partial" class idea from .NET yet. So maybe you can give us some tips on what would be the best we to enhance this framework, but still be compatible with the base classes.

2) Keeping remark 1 in our mind, the key definition should be more generic than the "int", it is now. People can of course change this, but then they have to change the base classes, making it more difficult to updated when a new version of the base classes are released. The key should work with int, string, GUID,.. maybe this must be a variant type that is converted in the low level classes to the type of the key itself ?

3) Because PC-Soft does not have a GUID type, I have constructed a CGUID class that has some functionality for this. Maybe you can implement in the support classes the GUID Type (If you need my class (very very basic implementation), just let me know).

4) Would it improve the usability of your classes when you use the technique Andy Stapleton used in his new version of the RecordClass by using the auto generated UML classes to keep the analysis and the classes in sync ? He uses structures to define the structure of the data for the class.

5) It would be great if the replication technology of Fabrice would also be included in this framework. This way we could work with these classes to setup en run a replication between the databases !

6) Have to look in detail in your classes to know if it includes conversion classes for certain types. When requesting datetime from MS SQL this always needs some conversions to put in into a datetime variable of the class, how does the framework handle these kind of conversions ?

I have downloaded the framework and will try it out !

Keep up the excellent work ! (Nog veel succes ermee !)
Danny
Posté le 20 octobre 2014 - 13:20
Hi Danny,

Thanks for the feedback...

Indeed I am looking to this kind of feedback to make the framework even more generic and robust for which I am also looking to open it up to a team of core developers to get the iteration and genericity development up to speed...

All of your remarks are very pertinent and excellent...

1) Indeed a lot of the documentation (development + usage) still need to be written

2) As stated in the demonstration on wxlive indeed only numeric unique keys are supported for now but it should be a minor change to make this generic and this is one of the first things that are on the modification list for the upcoming development iterations.

3) Thanks for offering anything that can help improving and thus adopting the framework by the community. Much appreciated!

4) I like the idea from Andy to use structures matching the record instead of individual members may be a great idea. I just need to test how this works on databinding. If there is no issue this is likely to be even a preferred solution and will lead to updating the concept in that way.

5) Anything that can help the community is more than welcome. Of course it is up to the liberty of each individual to determine if and how he or she can provide generic solutions that may serve many by hooking it up into the framework. I see my base work that I am sharing just as a starting point. It are simply some best practices and techniques gained over the years, that I am trying to consolidate into a reusable framework that allows one to get up to speed in no time for any WX project.

6) Currently only HF and HFCS are built-in but you'll notice that it is foreseen to cover any (except for ODBC) other access (native, oledb).

Thanks again for the excellent feedback!

Cheers,

Peter H.
Posté le 20 octobre 2014 - 16:51
Peter,

No problem !

One thing I used in a DB sync program between Navision and a MS SQL database was the new record type.

<a class="ExternalLink" rel="nofollow" target="_blank" href="http://doc.pcsoft.fr/en-US/?1000020962&name=TYPE_Record">http://doc.pcsoft.fr/en-US/?1000020962&name=TYPE_Record</a>

This made my program a bit more dynamic because I did not have to specify a type at runtime, just the name of the file. The members are all looked up at runtime so I could speak generaly over Datarecord.NameOfField = yyyy, where NameOfField is known at runtime when the Daterecord is dynamically hooked to the correct file.

Maybe you are using this record type, or else it could come in handy ?

I don't know if you can use this record as a substitute to the structure holding the DB fields, or in your case the class fields of the DB. By creating 1 class variable of the this record type with a dynamic file linked to it at runtime.

MyFields is record = {DestFile,indFile}

where DestFile is a string containing the name of the file.

The record structure should be dynamic as the analysis is changing ?

Maybe something usefull ? :confused:

Have a nice day
Danny
Posté le 20 octobre 2014 - 19:00
Hi Danny,

Thanks again for the excellent heads-up...

I researched the Record variable stuff but unfortunately it is not implemented for all platforms by PCSoft.
As the idea is to have the framework run in all environments (WD+WB+WM) the record variable type is of no use to the framework.
The goal is to be able to use the same business layer if you have a multi-platform application (which really is the future). That requires to be able to use the same (or targeted) code for all three products and most common platforms (win32, win64, native webdev, iOS and Android for now).

The same goes for e.g. functions with multiple prototypes: not supported for Android (damn this is really a bummer).
And there are really many more like that (e.g. in the dbgxxx functions). The first time I tried to create a Windows Phone version of the framework the IDE turned almost completely red on non supported functions.

Anyhow, thanks again for your feedback!

I'll keep you posted on our porgress.

Cheers,

Peter H.
Posté le 20 octobre 2014 - 21:04
Hi Peter, Danny,

Well you guys are waaayy in over my head but I just wanted to thank you Peter for all the trouble you took on you to publish and present a truly object oriented framework.

Thanks Danny for your helpful thoughts - it is soo instructive to my old and fading brain just to read your (and others) exchanges.

If you need a dumb ass plain vanilla developer for some peripheral task (being it helping to write some doc or testing out a given part of the framework or what have you got - I am standing by (I am fully aware, that there are brighter and better brains than me, but here goes anyway).

So, thank you for sharing all of this - it will certainly help with my development work (POS app for Swiss businesses).
Posté le 27 octobre 2014 - 18:18
Quote
Peter H.

Hi all,



The WX OO framework that has been shown during webinar 129 on WXLive is now available for download at the PCSoft repository.

An update of the framework has been uploaded at <a class="ExternalLink" rel="nofollow" target="_blank" href="http://depot.pcsoft.fr/resource.awp?file_id=91;wxframework-open-source-oop-multiplatform-framework-allows-rapid-development-wdwb-and-later">http://depot.pcsoft.fr/resource.awp&hellip;</a>.

As-of now:
- String or numeric primary unique keys are supported as well aside of the automaitc identifier primary unique key field type
- The copy functionality has been implemented in the browse model window to show how to use this

Still open:
- The next big effort is continue on providing a sample WebDev implementation model of the framework (as well for AWP as for classic mode).

Also, if anybody still wants to jump on the project (via a central SCM and CC) to make this a global solution for the community, don't hesitate to send an e-mail to peter [dot} holemans (A.T) mcs2 {dot] eu .

Cheers,

Peter H.