Re: [WebDNA] Was: wiki Now: Object-oriented programmng

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103974
interpreted = N
texte = Brian Fries wrote: > One can utilize object-oriented techniques while programming in any > language. This doesn't make the language itself object-oriented, but > that's ok. WebDNA does not need to be object-oriented, and in fact > dealing with the overhead of object-oriented interpretation would slow > down the execution of WebDNA code. Object-orientation benefits the > programer in that s/he inherits extensive capability with relatively > little coding, but it puts more load on the system interpreting the > code. For a compiled application, this is great, as the interpretation > only happens when the application is built. In a live-interpreted > language such as WebDNA, more work would need to be done by the WebDNA > engine every time a page is loaded, and that would slow down the > processing. > > I use object-oriented techniques in WebDNA frequently, through careful > implementation of function libraries. I have found that when done with > care, this can be very effective, but when I get sloppy the system bogs > down. I have spent a fair amount of time working through these issues in > order to optimize my code and find the best balance I can between ease > of development and web page performance. > > As an illustration, I have a series of very similar websites or sections > within a website. These all use the same core function library include > file. At the end of that function library, which is stored in a global > directory, it looks in the local directory of the page being loaded for > a local include file. If found, that include file is loaded, which may > replace or add to variables and functions defined in the master include > file. This provides the basic concept of "inheritance" that is core to > object-orientation. Essentially, each implementation of a module shares > a common class of properties (text variables) and methods (functions), > then redefines the pieces that make the instance of the module unique. > Changes to the parent class (the global include file) are automatically > inherited by the child classes (local module implementations), and > features of the parent class can be overridden by local implementations. > WebDNA makes this possible because when you define a function or a > variable, it replaces any previous definition using the same name. > > This is object-oriented programming using structured or procedural > tools. Since it is not managed or enforced by WebDNA, that does not make > WebDNA an object-oriented language, but that works for me because I have > the choice to use these techniques or not, as the development and > performance needs of a particular project dictate. > > Brian Fries > BrainScan Software Very well said Brian and of which, I think, reflects the accuracy of what my first live wiki version stated: http://en.wikipedia.org/w/index.php?title=WebDNA&oldid=323969695 This: "..and features of the parent class can be overridden by local implementations. WebDNA makes this possible because when you define a function or a variable, it replaces any previous definition using the same name." is of a particularly good point regarding OOP methods regarding WebDNA. Thanks for the thorough comments, as always! Donovan P.S., noting some of the commenters... I agree that OOP methodologies can easily fall into the "over kill" or "not needed" categories for WebDNA solutions. WebDNA is a rare breed and it "thinks different" from other languages. -- Donovan Brooke WebDNA Software Corporation http://www.webdna.us **[Square Bracket Utopia]** Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Was: wiki Now: Object-oriented programmng (Donovan Brooke 2009)
  2. Re: [WebDNA] Was: wiki Now: Object-oriented programmng (William DeVaul 2009)
  3. Re: [WebDNA] Was: wiki Now: Object-oriented programmng (Donovan Brooke 2009)
  4. Re: [WebDNA] Was: wiki Now: Object-oriented programmng (Brian Fries 2009)
  5. Re: [WebDNA] Was: wiki Now: Object-oriented programmng (Matthew Bohne 2009)
  6. [WebDNA] Was: wiki Now: Object-oriented programmng (Donovan Brooke 2009)
Brian Fries wrote: > One can utilize object-oriented techniques while programming in any > language. This doesn't make the language itself object-oriented, but > that's ok. WebDNA does not need to be object-oriented, and in fact > dealing with the overhead of object-oriented interpretation would slow > down the execution of WebDNA code. Object-orientation benefits the > programer in that s/he inherits extensive capability with relatively > little coding, but it puts more load on the system interpreting the > code. For a compiled application, this is great, as the interpretation > only happens when the application is built. In a live-interpreted > language such as WebDNA, more work would need to be done by the WebDNA > engine every time a page is loaded, and that would slow down the > processing. > > I use object-oriented techniques in WebDNA frequently, through careful > implementation of function libraries. I have found that when done with > care, this can be very effective, but when I get sloppy the system bogs > down. I have spent a fair amount of time working through these issues in > order to optimize my code and find the best balance I can between ease > of development and web page performance. > > As an illustration, I have a series of very similar websites or sections > within a website. These all use the same core function library include > file. At the end of that function library, which is stored in a global > directory, it looks in the local directory of the page being loaded for > a local include file. If found, that include file is loaded, which may > replace or add to variables and functions defined in the master include > file. This provides the basic concept of "inheritance" that is core to > object-orientation. Essentially, each implementation of a module shares > a common class of properties (text variables) and methods (functions), > then redefines the pieces that make the instance of the module unique. > Changes to the parent class (the global include file) are automatically > inherited by the child classes (local module implementations), and > features of the parent class can be overridden by local implementations. > WebDNA makes this possible because when you define a function or a > variable, it replaces any previous definition using the same name. > > This is object-oriented programming using structured or procedural > tools. Since it is not managed or enforced by WebDNA, that does not make > WebDNA an object-oriented language, but that works for me because I have > the choice to use these techniques or not, as the development and > performance needs of a particular project dictate. > > Brian Fries > BrainScan Software Very well said Brian and of which, I think, reflects the accuracy of what my first live wiki version stated: http://en.wikipedia.org/w/index.php?title=WebDNA&oldid=323969695 This: "..and features of the parent class can be overridden by local implementations. WebDNA makes this possible because when you define a function or a variable, it replaces any previous definition using the same name." is of a particularly good point regarding OOP methods regarding WebDNA. Thanks for the thorough comments, as always! Donovan P.S., noting some of the commenters... I agree that OOP methodologies can easily fall into the "over kill" or "not needed" categories for WebDNA solutions. WebDNA is a rare breed and it "thinks different" from other languages. -- Donovan Brooke WebDNA Software Corporation http://www.webdna.us **[Square Bracket Utopia]** Donovan Brooke

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

(1998) [WebDNA] ImageMagick code (2013) MS Commerce Comparison (long) (1998) Locking up with WebCatalog... (1997) Deleting duplicates from a db (2000) searching multiple databases in single search (1997) Searching multiple fields (1997) Error Log.db --however (1997) Math with Time (1997) can WC render sites out? (1997) Multiple prices (1997) WebDNA tags in WebMerchant email templates ... (1997) WC2.0 Memory Requirements (1997) signup bots (2006) Help with searching dates from mysql dump & searching (2006) Quit revisited (1997) Not really WebCat (1997) [ShowNext] (1997) Help needed! (1998) RE: Automatic Forwarding using WebCat (1997)