"OD" <webmaster @ e-naxos dot comwrote in message
news:mn.51047d743658469e.18651@e-naxosdotcom...
Quote:
Quote:
>It's a component that includes and produces code, it's not a simple Select ..., however,
>you aren't in control what code it produces,so you'll never know how this code works,
>you'll never learn to do something more complex, you are at the mercy of a dumb and
>brain-dead wizard.
>
I respect your point of view but it is, for me, a little antiquated. Cause if you don't
use this component because you can't control all the code within it, you'll have to avoid
using almost all components... And, of course, this not the direction of the history of
IDE since now more than 10 years. And VS 2005 and the next release are walking on this
same road.
As I said before, some wizards (like this one) are only available in the professional and
higher versions of VS, and why should I use VS to implement my projects?
In VS2005, there are wizards that are quite helpful in VS, while there are others that are
too basic, the one you are referring to is such one, once you know System.Management and WMI
you won't use it any longer even for the most simple things. The same is true for other
wizards like the "Windows Service Control", of little use for those who know what Services
are about, of little or no help for those who don't know what Services are about.
Quote:
About 'learning something more complex', writing code to achieve all functions of a
program is certainly a very good school, but it is not the only one. And if we had to
write code from scratch for each program, I'm afraid applications will look today like the
ones of the 70's.
>
I see you think RAD is the silver bullet, I know and other real developers know it's not.
Quote:
Quote:
>Because all system aren't the same, why restrict yourself to limited/common set of
>management objects?
>
because in the real life you never have to write a program for 'any computer in the world
that existed and will exist'. You write code for a customer who expressed a specific need
in a specific environment.
Right, and for instance that customer has expressed a need to manage IIS , do you have IIS
installed on your development machine, is it the same version as the one running on the
customers machine? A customer has expressed to manage his Vista Systems (added ~400 WMI
classes not available on XP), do you run Vista on your development system? If No, well, you
won't be able to access all the new classes using the wizard. Want some more samples?
Why you fail to accept that this *control* can only access YOUR own development system's
assets (HW and Software) but not those on any other system is beyond me.
You are never sure whether the WMI classes used exists on the other system or worse, you are
never sure they support the same properties (some are OS version and product version
dependent) and most importantly, you have no access at all to the classes that are part of
products that are missing on you system.
Quote:
Of course, if you're coding for your pleasure, you can spend the rest of your life writing
a pac-man that will run on all known computers... That can be a very interesting challenge
and a good way to be famous...
>
You don't get it do you, who's talking about "all known computers", I'm talking about
specific user requirements.
Quote:
Quote:
>What if I need to manage IIS through WMI on the target system, when IIS is not installed
>on the development system, what if I need to implement Exchange management when Exchange
>is not available on the delelopment system? In that case your "simple trick" won't work,
>you'll have to write code, you'll have to understand what *you* want the system to do,
>not what the wizard allows you to do.
>
In theory you're right.
I'm right in practice, if you don't read the WMI docs before starting to code, you won't
able to do anything else than the most simple things, you only will know what's available in
your restricted environment, and you will never learn what else is available.
Quote:
But there is no "what if" in developer real life. As I said it, there are customers
wanting specific applications for specific environments.
Right. That's exactly why I said you can't use the control to code against specific user
requirements.
Quote:
If they want to change it in the future, things will be study at this time. And generaly,
technology has changed so much since the application was written that it must be rewrite
from scratch with a new language, on a new platform, etc..
Who's talking about change?
Quote:
A "lifelong application" can't exist because technology is moving too fast as the needs of
customers.
Developers are not Pharons, they don't need to build pyramids which will last for
centuries... just because technology is not like the rocks under the pyramids, technology
is more like moving sand.
>
Quote:
>Also, WMI is not only about counters, it' s about a way to manage systems (hardware and
>software) via a service with the help of several WMI providers and WMI enabled device
>driver components.
>
I did not said WMI is just about counters, read more carefully.
I did, you where talking about counters...and the OP's question has nothing to do with
counters, it's about specific system info, like the processor's type and the OEM string.
These are exposed through the Win32_Processor class, but... some of it's properties are only
available on some OS versions. That means you have to read the doc's and code accordingly,
if you don't and use the RAD tool, you'll be missing the attributes unless you run the same
OS version as the target. Get it?
Quote:
I just said that, for example, it is 'not bad' to use the trick I was speaking about for
simple things like counters. That makes a big difference.
>
But one question : why are your splitting hairs ?
You are splitting hairs, I'm only trying to be correct.
Willy.