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 SoftwareVery 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=323969695This:"..andfeatures of the parent class can be overridden by local implementations.WebDNA makes this possible because when you define a function or avariable, 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!DonovanP.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" fromother languages.-- Donovan BrookeWebDNA Software Corporationhttp://www.webdna.us**[Square Bracket Utopia]**
Associated Messages, from the most recent to the oldest:
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 SoftwareVery 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=323969695This:"..andfeatures of the parent class can be overridden by local implementations.WebDNA makes this possible because when you define a function or avariable, 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!DonovanP.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" fromother languages.-- Donovan BrookeWebDNA Software Corporationhttp://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:
Webcat version 4.x (2005)
WebDNA Parnter Edition 5.0 ? (2003)
WebCat2 several catalogs? (1997)
WebCatalog NT beta 18 problem (1997)
Date sorting (1997)
WebDNA 5.0 Questions (2003)
Redirect to anchor (2001)
[include ...] behavior (1997)
[SearchString] problem with [search] context (1997)
Can a database get stomped by simultaneous access? (1997)
Forum - Test Request (2005)
Mac Lockup Problems (1998)
shownext (1997)
Sku numbers (1997)
triggers.db (1999)
Eudora plug-in (1998)
NT b19 sends extra MIME headers (1997)
[WebDNA] total (2010)
useful guidelines =] vs !] (2007)
Modifying order output (1997)