From: Stephan R. <SR...@la...> - 2000-11-30 15:00:08
|
I agree perfectly with Abel, particulary concerning the commenting (this was the tenor of my postings some weeks ago). For the OO discussion: Objects should be a way to simplify book keeping and thus to enable more and more complex models, not a purpose by themselves. We should consider using an OO model if it's sure that this simplifies further evolution of the DynAPI. Taking into account the changes in the present implementation, may be its better to delay this until DynAPI version 3 or 4 and to concentrate to debug the present version ;-o. Also, I do not think that the widget discussion should get to much space. Widgets are "only" an application of the DynAPI and I read enough about problems with the API itself. Stephan > > I think we must stop thinking: "Add more and more to DynLayer", "Expand > DynLayer thru prototype property", etc, etc. As i can see, things > are going > far and the basis for all this effort must be clear, simple and almost > untouchable (im talking about the interfaces only, not the functionality). > > It is very important a release of DynAPI that includes numerous comments > explaining the way in which every core js works, this just to > facilitate the > learning process; and also its indispensable to make a more > extensive tutor > about creating widgets, including widgets based on other widgets, just to > clarify how things should work when more complex processes are needed. > > Im not having problems extending functionality of DynAPI bassing a widget > onto a more complex object than a DynLayer, it can also seams posible to > continue the inheritance mechanism provided by the current widget model > until the end of life. > > Why not to take Delphi Object Hierarchy (for instance) as a model for the > development of components? i was doing that when i was suddenly forced to > take over another project... > > Salutes! > > -----Original Message----- > From: dyn...@li... > [mailto:dyn...@li...]On Behalf Of Alexey > Medvedev > Sent: Miercoles, 29 de Noviembre de 2000 04:50 p.m. > To: dyn...@li... > Subject: Re: Re: [Dynapi-Dev] inheritance crusade / SuperClass stuff > > > On Wed, 29 Nov 2000, Barre Bizon wrote: > > > I thinks you have learned too much of OOP languages like > Java C++ etc. > JavaScript is not OOP - it is Object Language - not > just merely OO :) > > I would recomend to look deeper into JavaScript. > If i'm not mistaken - DunAPI never uses such thing as "with" > > Also ... If only Netscape4 would be standart.... and JavaScrip1.3 > with it: > ---------------------- > You can use call to chain constructors for an object, > similar to Java. In the following example, the constructor > for the product object is defined with two parameters, > name and value. Another object, prod_dept, initializes its > unique variable (dept) and calls the constructor for > product in its constructor to initialize the other variables. > > function product(name, value){ > this.name = name; > if(value > 1000) > this.value = 999; > else > this.value = value; > } > > function prod_dept(name, value, dept){ > this.dept = dept; > product.call(this, name, value); > } > > prod_dept.prototype = new product(); > > // since 5 is less than 100 value is set > cheese = new prod_dept("feta", 5, "food"); > > // since 5000 is above 1000, value will be 999 > car = new prod_dept("honda", 5000, "auto"); > > --------- from JS1.3 documentation. > > > Also I like "watch" method alot. but it is Netscape only :-/ > It allows you to get rid of methods.. > Just mylayer.x=12 would move the layer. > > > And... why you need to create object , based > on something but not to extend the one you have?! > > ps. In the past you have had ability to make errors... > Now ! with C++ - you could inherit them! :) > > Malx > > > Hmm.. but how about wanting widgets to fully extend > > Dynlayer.. i.e. supporting exactly the same initialization > > as Dynlayer has without writing the code over again. > > > > Do you not think that a construct() method would be a good > > idea? As per my previous posts... > > It wouldn't alter anything in essence.. nor complicate > > anything. Just how the Dynlayer is initialized, allowing > > widgets to (easily) do a general DynLayer initialization. > > Apart from widget specific initialization... > > > > / Bart > > > > > I absolutely agree. Things are already complicated > > enought and I don't want to add one single line of code > > there. > > > > > > > > > Dan Steinman wrote: > > > > > > > It is both mine and Pascal's opinion that no special > > inheritance system is needed for DynAPI. Just make careful > > attention, and structure using basic prototypes and you can > > do everything (except doing multiple inheritance). Don't > > overwrite variables, and you don't even necessarily need to > > overwrite methods, and everything works perfectly. The > > most simplistic solution is often the best, and I believe > > that is the case here. > > > > > > > > Dan > > > > > > > > > > _______________________________________________ > > > Dynapi-Dev mailing list > > > Dyn...@li... > > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > > > > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > > > > ^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^ > / Word is not a color, but a picture. \ > _ _ / To understand it you must draw it by yourself. ___ \ _ _ > \ ------- __ -- |^ ma...@ca... / > \ --- --- | http://cad.ntu-kpi.kiev.ua/~malvin/ > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |