January 22, 2005 Re: Is there a lower level to OOP? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | John Reimer wrote: >> Digital Mars software, on the other hand, doesn't load until you actually >> try to use it. Then, when you're done, it unloads. Uninstalling it is as >> simple as blowing away the directory it sits in. It can be run off of the CD >> without even installing it. You can transfer it to your new machine when >> upgrading by xcopying the directory. What a concept! > > I must admit, I've really come to appreciate the simple way digitalmars deals with installation. I wish all software installation were that simple. While there are advantages of using a single directory, I prefer using a package manager myself. (such as RPM) It makes the compilation and setup easier, while still allowing for that single command uninstall / upgrade... When installing on Linux from a tarball/zipfile, I must: 1) unzip 2) edit confs 3) copy to /usr *or* edit $PATHs With a package, I can just use a single command or double-click? I also get all the dependencies and requirements, automatically. With regular applications (not compilers), I also like drag and drop. Use it all the time on the Mac OS X, when packages are not required ? --anders PS. http://www.algonet.se/~afb/d/dmd-0.111-3.nosrc.rpm http://www.digitalmars.com/d/archives/digitalmars/D/13575.html |
January 22, 2005 Re: Is there a lower level to OOP? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | Anders F Björklund wrote:
>
> While there are advantages of using a single directory,
> I prefer using a package manager myself. (such as RPM)
>
> It makes the compilation and setup easier, while still
> allowing for that single command uninstall / upgrade...
>
> When installing on Linux from a tarball/zipfile, I must:
> 1) unzip 2) edit confs 3) copy to /usr *or* edit $PATHs
>
> With a package, I can just use a single command or double-click?
> I also get all the dependencies and requirements, automatically.
>
>
> With regular applications (not compilers), I also like drag and drop.
> Use it all the time on the Mac OS X, when packages are not required ?
>
> --anders
>
> PS. http://www.algonet.se/~afb/d/dmd-0.111-3.nosrc.rpm
> http://www.digitalmars.com/d/archives/digitalmars/D/13575.html
Hello Anders,
Linux and Mac OS are a completely different matter. In those cases, I agree with you: the package system makes things a whole lot easier.
In my previous post, I was referring to the installation proccess of applications on Windows machines only. I've come to appreciate simple install methods, as demonstrated by Walter's software, over messy registry based ones. Installing any other way creates a clogged, messy Windows machine.
- John R.
|
January 22, 2005 Re: Is there a lower level to OOP? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Georg Wrede |
> But today, when we are wiser, is such fervor fruitful? This might sound as an utterly academic question, but what happens if we are designing a library? Should Phobos be procedural? Should it be entirely converted to OOP? Should there be (an arbitrary level) beyond which we switch to OOP? Or should there be certain parts where OOP is used and others where it really should be avoided? Or entirely two alternate versions of Phobos?
I sometimes find it annoying to have to subclass to use some GUI toolkits (eg Java) so I'm trying to make MinWin OOP neutral. For example here are two versions of a program that shows a window with a button in it that brings up a modal OK/Cancel dialog and changes the window title based on the choice. The OOPS one is slightly nicer, I suppose, but the procedural one has nifty nested anonymous delegates.
module minwin.samples.sample7;
import minwin.all;
class MyDialog : Dialog {
int result;
this(MyWindow f, char[] str) {
super(f,str);
Button clicked;
Button ok = new Button(this,"OK");
Button cancel = new Button(this,"Cancel");
ok.actionDelegate ~= &okCallback;
cancel.actionDelegate ~= &cancelCallback;
}
void okCallback(Component c) {
MyWindow win = cast(MyWindow)owner;
win.title = "you hit ok";
result = 100;
visible = false;
}
void cancelCallback(Component c) {
MyWindow win = cast(MyWindow)owner;
win.title = "you hit cancel";
result = 101;
visible = false;
}
}
class MyWindow : Window {
this(char[] str) {
super(str);
Button but = new Button(this,"click me");
but.actionDelegate ~= &doDialog;
}
void doDialog(Component c){
MyDialog dlg = new MyDialog(this,"hello");
dlg.visible = true;
if (dlg.result == 0) {
title = "you destroyed the dialog";
}
}
}
extern (C)
int MinWinMain(Application* app) {
MyWindow f = new MyWindow("window");
f.quitOnDestroy = true;
f.visible = true;
return app.enterEventLoop();
}
module minwin.samples.sample8;
import minwin.all;
const int OK = 100;
const int CANCEL = 101;
const char[] KEY = "result";
extern (C)
int MinWinMain(Application* app) {
Window f = new Window("window");
f.quitOnDestroy = true;
Button but = new Button(f,"click me");
but.actionDelegate ~= delegate void (Component c) {
Window w = cast(Window)c.parent;
Dialog dlg = new Dialog(w,"hit ok or cancel");
Button ok = new Button(dlg,"OK");
ok.cmd = OK;
Button cancel = new Button(dlg,"Cancel");
cancel.cmd = CANCEL;
dlg.commandDelegate ~= delegate void(Component c, int cmd) {
Dialog dlg = cast(Dialog)c;
switch (cmd) {
case OK:
dlg.owner.title = "you hit ok";
break;
case CANCEL:
dlg.owner.title = "you hit cancel";
break;
}
// store some data on the dialog using run-time application data
int* data = new int;
*data = cmd;
dlg.appdata[KEY] = data;
// end the dialog modality
dlg.visible = false;
};
dlg.visible = true;
if ((KEY in dlg.appdata) is null) {
w.title = "you destroyed the dialog";
}
};
f.visible = true;
return app.enterEventLoop();
}
|
January 22, 2005 Re: Is there a lower level to OOP? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | John Reimer wrote:
> In my previous post, I was referring to the installation proccess of applications on Windows machines only. I've come to appreciate simple install methods, as demonstrated by Walter's software, over messy registry based ones. Installing any other way creates a clogged, messy Windows machine.
In my encounters with Windows machines, it was usually something like:
start InstallShield exe, Next, Next, Next, Next, Next, Finish. (Reboot?)
Uninstalling was something like Add/Remove Programs, Hope For The Best ?
(you still had to format and reinstall everything every 6 months anyway)
Didn't look back. ;-)
--anders
PS. Apple's Installer doesn't even *have* an uninstall option, sadly.
While it's the "easiest" option, I think RPM/Fink do it better...
|
January 23, 2005 Installing Software | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | John Reimer wrote:
> Linux and Mac OS are a completely different matter. In those cases, I agree with you: the package system makes things a whole lot easier.
It's not only the package system, but also the question of "who packs up the program". On Windows, everybody packs up their own programs into installers. Of course the original author of a program often thinks: "Hey this program is so important - everybody would want it to be started right after boot-up. Uninstalling? Of course, I'll be polite and implement this, but why would anybody want use that feature anyway?"
On Linux, packaging is usually done by a distributor who usually has a slighly more realistic view about the importance of programs.
|
Copyright © 1999-2021 by the D Language Foundation