Page 2 of 2

Re: What function of OOP pb can't create ??

Posted: Thu Dec 03, 2015 6:49 pm
by HanPBF
Hello heartbone,

You use method like programming when You iterate over the controls in a form and want to style them in one way.

For each control, You can style it procedural or You can call a style method which then calls styleBox, styleButton, styleTextbox, etc.

But, of course, You don't need to do it this way...

At the end, if You use the native PB gadget styling procedures, You are faster because You are dealing directly with the native elements.
But one thousand elements with a select-case of 50 entries/gadget types or a delegating map for the specific maybe canvasgadget control -> fast enough with PB...

I would use an appropriate architecture not first regarding speed; later optimization can be done...

Btw.: I am talking about applications with forms and database access; special speedy calculations -> procedures/assembler!


Ten years ago I read first the wording "spaghetti code of object orientation"...
for example AOP (aspect orientation) is a mean to break out of the OOP-cage.

Maybe thinking and planning before programming is the right way?
(No, this was for no one in the PB forum!)

Re: What function of OOP pb can't create ??

Posted: Thu Dec 03, 2015 7:23 pm
by Kwai chang caine
Thanks HanPBF for all your explanations 8)
Have fun programming!
Yes..OOP or Procedural the main is the pleasure :wink:
Have a very good night

Re: What function of OOP pb can't create ??

Posted: Fri Dec 04, 2015 11:37 pm
by mk-soft
I only understood OOP when I tried to access with PureBasic to DCOM objects ...
PB is oriented procedure, but you can also object-oriented programming if necessary

I like that. :wink:

Re: What function of OOP pb can't create ??

Posted: Sun Dec 06, 2015 6:39 pm
by Kwai chang caine
In fact it's far to be necessary, because i don't like it
But like since several years i read one time it's possible, one time never it's possible, i want to know what is really possible, for understand
PB it's nice like it is, but it's cool to know what it can do :wink: