Tutorial: PureBasic and the OOP

Developed or developing a new product in PureBasic? Tell the world about it.
Dräc
Enthusiast
Enthusiast
Posts: 150
Joined: Sat Oct 09, 2004 12:10 am
Location: Toulouse (France)
Contact:

Post by Dräc »

The tutorial has just been updated.
This update impact the whole part called " Second implementation ".
It brings a more homogeneous implementation by distinguishing the initialization of the methods of that of the attributes.
So, the definition of the methods is completely contained by the class of the object, while the initialization of the attributes stays only at the constructor level of the object.
That ensues an inheritance realized in a more systematic way.

I also clarified the presence of the constrictor possible parameters.

Thank to Leo for his input on the subject.

Finally, the tutorial grows with an Appendix, grouping the different considerations revolving around the programming object-oriented implementation.
At present time, it can be found:
- The optimization the use of Get() and Set() methods (already present previously, but moved here),
- The use of linked lists in objet implementation.

Thus, do not hesitate to announce me your tips & tricks…

PS: I intend to give a chm’d version on the site from this new version
Hurga
Enthusiast
Enthusiast
Posts: 148
Joined: Thu Jul 17, 2003 2:53 pm
Contact:

Post by Hurga »

Is there a chance to get a zip-ed version of it? ONline reading is expensive for a modem -user like me
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Dräc wrote:PS: I intend to give a chm’d version on the site from this new version
Thank you!
@}--`--,-- A rose by any other name ..
techjunkie
Addict
Addict
Posts: 1126
Joined: Wed Oct 15, 2003 12:40 am
Location: Sweden
Contact:

Post by techjunkie »

Great! Really professional work!!

Ever consider to write a book? :wink: I'll buy it!!

(I've generated a PDF-file from the web pages, but need the author's "blessing" to go public with it I'll guess.)
Image
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
Dräc
Enthusiast
Enthusiast
Posts: 150
Joined: Sat Oct 09, 2004 12:10 am
Location: Toulouse (France)
Contact:

Post by Dräc »

Hi,

The chm file is available on the site for download.
Look for Image Image at the upper-right

@techjunkie: Thanks! No problem for a PDF file version of the web pages and its free diffusion if author references are mentioned.:D[/img]
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Heya Dräc,

Once again, thank you! This is a huge thing you have done and many of us will benefit from your work. Really appreciated.

:)
@}--`--,-- A rose by any other name ..
dell_jockey
Enthusiast
Enthusiast
Posts: 767
Joined: Sat Jan 24, 2004 6:56 pm

Post by dell_jockey »

blueznl wrote:i'm not a native english speaker so i tend to stumble over some of the phrasing... is it just me?
indeed, knowing a bit of French was helpful here and there...
cheers,
dell_jockey
________
http://blog.forex-trading-ideas.com
techjunkie
Addict
Addict
Posts: 1126
Joined: Wed Oct 15, 2003 12:40 am
Location: Sweden
Contact:

Post by techjunkie »

Dräc wrote:@techjunkie: Thanks! No problem for a PDF file version of the web pages and its free diffusion if author references are mentioned.:D[/img]
Ok! :)

Here is the link to the PDF-version,

http://www.techjunkie.org/purebasic/Pur ... amming.pdf
Image
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

@techjunkie

Pinched that too. Thanks! :)
@}--`--,-- A rose by any other name ..
techjunkie
Addict
Addict
Posts: 1126
Joined: Wed Oct 15, 2003 12:40 am
Location: Sweden
Contact:

Post by techjunkie »

techjunkie wrote:Here is the link to the PDF-version,
Hmmm... :oops: I forgot the "code links" - sorry! I'll add these tomorrow and post a new link...
Image
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
Dräc
Enthusiast
Enthusiast
Posts: 150
Joined: Sat Oct 09, 2004 12:10 am
Location: Toulouse (France)
Contact:

Post by Dräc »

Tutorial: PureBasic and the OOP

Hi folk!

A new page has just been added to the OOP tutorial.
It brings the wrap which missed for an easy handle in object creation.

This page presents the implementation of object concepts which I use at present with PureBasic (PureBasic Class).
After long moments of practice and tune, I think it is mature enough.

Although PureBasic remains a procedural language, this new stage supplies a real set of commands.

Good reading to the brave ;)
Last edited by Dräc on Thu Sep 27, 2007 11:13 pm, edited 2 times in total.
Dräc
Thalius
Enthusiast
Enthusiast
Posts: 711
Joined: Thu Jul 17, 2003 4:15 pm
Contact:

Post by Thalius »

EDIT: Working now =)

GREAT Work! :D

Thalius
Last edited by Thalius on Fri Sep 21, 2007 3:35 pm, edited 1 time in total.
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! ;)"
Mowen
User
User
Posts: 48
Joined: Tue Oct 07, 2003 1:04 pm
Location: Belgium

Post by Mowen »

Very usefull ! Et qui plus est en français :)

Merci !
PureBasic: one of the best programming tools ever ! PB is light, easy, crossplatform, powerfull, fast, extendable, enjoyable and... tasty ;-)
Dräc
Enthusiast
Enthusiast
Posts: 150
Joined: Sat Oct 09, 2004 12:10 am
Location: Toulouse (France)
Contact:

Post by Dräc »

Some few updates:
-English improvement in the whole tutorial (I have spend time but this work never end ;))
-the Linkedlist section in appendix was removed as there is no meaning since the last object implementation
-pdf/chm files removed as the tutorial was modified
Dräc
Dräc
Enthusiast
Enthusiast
Posts: 150
Joined: Sat Oct 09, 2004 12:10 am
Location: Toulouse (France)
Contact:

Post by Dräc »

As PureBasic IDE and JaPBe give the possibility of specifying keywords, I finally removed brackets associated to keywords EndInit_Mbers and EndFree.
Dräc
Post Reply