Re: Databinding - nicht wirklich, oder?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hallo Paul,

Wieso stört dich die Reflection? IMHO kommt es doch darauf an, dass das Konzept in der Praxis funktioniert. Wir müssen also auf die Vorgänge schauen, die beim Programmieren so ablaufen. Wenn das gut unterstützt wird, ist Reflection schon OK.

Reflection vermeiden die meisten wenn möglich.
Es ist absolut gut unterstützt. Wenn möglich, versucht man
die Dinge über OOP zu erreichen. Reflection ist langsam.
Über Reflection ist es (z.B.) möglich private Member von aussen
anzusprechen. Also recht übel für OOP-Verfechter ;-)
Aber gut, im richtigen Moment im richtigen Mass ist es
es wohl akzeptabel. Also in meinem Beispiel ist es wohl
einigermassen ok, da keine eigenen strings benutzt werden müssen.
(also halt: http://Dzaebel.NET/TypesafeProps.htm)
"Manuelle" Strings und Reflection wären allerdings noch viel
gefährlicher als manuelle Strings und DataBinding.


Ich bin übrigends *nicht* dafür, die Sachen alle aufzunehmen. Dann würde C# bald die gleichen Probleme haben wie C++ heute. Aber interessant ist es schon.

Interressant und wichtig sind die anderen Sprachen
auf jeden Fall. Die haben u.U. auch Konzepte, die ggf. demnächst
wiederum in C# auftauchen können. Das ist IMHO ok, wenn sie in
das Grundkonzept, die Spezifikation, und die Sprache "passen".
In der Summe sehe ich aber C# einfach momentan "vorne".


ciao Frank
--
Dipl.Inf. Frank Dzaebel [MCP/MVP C#]
http://Dzaebel.NET

.



Relevant Pages

  • Re: [PHP] Object to array conversion oddity
    ... I can see that there might be some reason for converting the object with additional information in some circumstances (much like serialization to strings does), but here we're only talking about casting, which should be a 'best-fit' data matter. ... here we have undocumented behaviour justified by yet more undocumented behaviour! ... I think trying to preserve this information is entirely pointless - it's not as if you can cast back from an array to an object, and I can't think of any circumstances in which it is preferable to using reflection. ...
    (php.general)
  • RE: Grundsatzfrage zum Klassen-Design
    ... Normalerweise ist es von OOP aus gesehen nicht gewünscht, dass abhängige Klassen etwas über Reflection voneinander wissen. ... Dipl. Inf. Frank Dzaebel ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: How to query n web services
    ... When I added web references, I wrote 10 different web references name. ... and then invoke service01.someMethod... ... The subset is given by strings. ... Using Reflection, you can use a string to create an instance of an object and then invoke methods on that instance. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Getting Method objects without reflection
    ... methods and fields can be obfuscated while strings cannot. ... > So being able to call getName() on a Field has a big security advantage ... > over using raw reflection. ... I don't think that it would permit more thorough obfuscation that is currently ...
    (comp.lang.java.programmer)
  • Re: get the name of a property
    ... With Reflection you can interate through a class ... and generate a list (strings) of all the methods, properties, etc. ...
    (microsoft.public.dotnet.general)