Author Topic: Scripted wizards  (Read 11618 times)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Scripted wizards
« on: October 10, 2006, 12:29:11 pm »
i do not like the scripted wizards as they are implemented now
and i'm really sad about, that the templated projects aren't supported any longer from scratch

though project-templates are availabale through the user-templates (please keep them)


the main problem which i have with the scripted wizards is the project-setup with debug and release targets.
in my opinion this is only suitable for small projects which are built of one target.

but in reality you need more often a project which consists of several targets,
think of a library, a library-test program, other libraries ... 
and an application which uses the libraries.

in such a case it is much better to organize the release & debug versions as projects

example of a real application workspace, which uses
e.g. a few open-source libraries lib1, lib2, and dll1

Workspace myapplication
*   Debug_project_unicode
      Target - lib1
      Target - test lib1
      Target - lib2
      Target - test lib2
      Target - dll1
      Target - test dll1
      Target - myapplication

*   Release_project_unicode
      Target - lib1
      Target - lib2
      Target - dll1
      Target - myapplication

*   Release_project_ansi
      Target - lib1
      Target - lib2
      Target - dll1
      Target - myapplication


one debug project for debugging and testing, two release projects for ansi and unicode.

what is *your* opinion ? any suggestions ?

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Scripted wizards
« Reply #1 on: October 10, 2006, 01:01:05 pm »
The problem is that everyone uses differents layouts, for simple projects the "Release & Debug" project is enough, but complex projects requires complex layouts.
The good side is that you can modify the scripts to suit your specific layout needs.
The bad side is that with the previous templates it was a matter of editing a simple xml file, but now to accomplish the same you need to read and understand the scripts.
Not that they are difficult to understand, but it requires more time than before to do the same.

So it's a matter of simplicity vs. powerfullness.

A hybrid solution could bring best of both worlds: using xml for simple needs and generic pages, setting compiler flags, etc. and for projects that requires more than that, like creating new pages in xrc, etc, they'll need to create a script.

This will lower the barrier-entry for writting a template/wizard, keeping the best of before and now.


BTW, I never liked wizards of any type, they're bad performers in GOMS-KLM usability analysis, and this seems to be one of the reasons of why people still like the previous xml file-based templates.
In this case, instead of going trough a wizard every time you create a project, for enabling pch, for choosing the compiler, etc can be avoided and instead put in a single page, a "Setup" dialog for that kind of project.




Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5179
Re: Scripted wizards
« Reply #2 on: October 10, 2006, 01:02:18 pm »
I prefer the way it is now.

Let's focus on a library which provides functionalities to be used by whomever (eg TinyXml) : It makes sense it has a debug build and a release build (debug : debug symbols, maybe some extra logging statements, non optimized; release : cut the crap and do it fast and small).
If the "tinyxml" project would not have these debug/release then every client has to create different targets of his 'program' to either get the library in debug or release dependeing on what he wants. Now he just creates his own (application) project (which also has debug/release) and makes his project dependent on that tinyxml project. Since debug/release is so common practice it's nearly some sort of defacto standard, and thanks to that dependencies between the targets work correctly.

Some IDE's even allow to change the configuration(debug/release) in the dependencies, say in your project you have a debug configuration but you never want that tinyxml library in debug because you trust it (and maybe the debug version is extremely slow), so they allow to even say in my debug "application" I want the dependency to be 'not on the default debug' but on the 'release' configuration.

The main difference it that the "project" view of things is different with what you described in your post.
You have :
  targets : lib, test app, the app
and everything sit's nicely together in the project file.

The view I talk about here is :
 project 1 : lib with 2 targets
 project 2 : the test app (with 2 targets)
 project 3 : the app (with 2 targets)
and everything sits together in the workspace.

I think both practices are ok, I prefer the latter one ;-)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Scripted wizards
« Reply #3 on: October 10, 2006, 01:15:38 pm »
tiwag, if I understand correctly, you 're only concerned about the "debug/release" page? If that's the case then all that's needed is a more elaborate page allowing you complete control over the targets to create.

I, too, understand that editing a script is not as simple as editing an XML file but you get infinitely more power with scripts.

And you, all, seem to have forgotten all the trouble we had with the XML templates. If you 'd like I could dig up a few relevant topics just to remind you ;)...
Be patient!
This bug will be fixed soon...

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Scripted wizards
« Reply #4 on: October 10, 2006, 01:28:19 pm »
tiwag, if I understand correctly, you 're only concerned about the "debug/release" page? If that's the case then all that's needed is a more elaborate page allowing you complete control over the targets to create.
Yes that would be great. I can imagine a wxTree letting you choose the layout of the targets and projects.

I, too, understand that editing a script is not as simple as editing an XML file but you get infinitely more power with scripts.
I'm fine with scripts, they give power, and they are fine as long as user-templates (for when you're in a hurry) remains.

I still don't like the Wizard UI element, since everything can be placed in one dialog and you could edit everything in one-shoot.
But most IDEs seems to use Wizards (not that it's good), so on the good side, at least they will feel at home.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Scripted wizards
« Reply #5 on: October 10, 2006, 01:38:39 pm »
As you all might know I'm a "pro-script/wizard" guy. As Yiannis said: They simply offer more power. By translating the "old" templates into scripts the first thing I realised was: "Hey, you can do much more!". Sure: The current wizards could offer a lot more functionality - but they are just "a first step".
Allthough (IMHO) you already have all capabilities of designing a dialog that will add different compiler targets (I did this with a matlab wizard, see http://wiki.codeblocks.org/index.php?title=Scripting_commands for reference) I agree that the target setup could have another pre-defined wizard page to enable easier access. Anyway: I for myself like the Wizards more than templates. And if you disable all the entry dialogs they have the  amount of "work" for a proper project setup.
With regards, Morten.
« Last Edit: October 10, 2006, 01:54:34 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Scripted wizards
« Reply #6 on: October 10, 2006, 01:44:16 pm »
tiwag, if I understand correctly, you 're only concerned about the "debug/release" page? If that's the case then all that's needed is a more elaborate page allowing you complete control over the targets to create...
correct

i think we should not drive the users into a project-layout, which is inconvenient when it comes to extend the project
as it is with the "debug/release target" approach.

the problem which exists with that "debug/release target" project setup is,
that when you have several projects for building your application,
you have to take care of all needed settings (e.g. wx lib type, threading model, ...) to be the same in all projects
and you have to edit them manually for each project.

When you have a project-layout as i proposed in the first posting,
you start with a debug version and when the project reaches a state,
where you can think of a release version, you only copy the project file
and edit the debug and optimization flags and you can build your release
application without any other modifications.

With the "debug/release target" project setup, this is not easily possible,
until all targets in all projects have the same name (at this time no automatic check is possible)
and when it comes to build them in different object files folders, there is currently also the bug
in the CB- workspace-build-system.


Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Scripted wizards
« Reply #7 on: October 10, 2006, 01:47:04 pm »
I still don't like the Wizard UI element, since everything can be placed in one dialog and you could edit everything in one-shoot.
But most IDEs seems to use Wizards (not that it's good), so on the good side, at least they will feel at home.

That's just a matter of personal preference and I need no UI-guidelines/usability-tests to tell me if I like the look'n'feel of a dialog or not :).
Think of a newbie: is it easier for him/her to take the various options in small, grouped, chunks or present every little nitty-gritty detail in one dialog at once?
Besides, no-one is stopping you to create a wizard with just one page, effectively simulating the dialog you 're suggesting ;).
Be patient!
This bug will be fixed soon...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Scripted wizards
« Reply #8 on: October 10, 2006, 01:51:56 pm »
tiwag, if I understand correctly, you 're only concerned about the "debug/release" page? If that's the case then all that's needed is a more elaborate page allowing you complete control over the targets to create...
correct

i think we should not drive the users into a project-layout, which is inconvenient when it comes to extend the project
as it is with the "debug/release target" approach.

The reason this specific layout was chosen initially is because that's what most of the users coming from other IDEs (other than vim and emacs :P) expect to see. I never said it is the one and only approach to project layout. I think this is proven by the C::B project file itself ;).
Show some little patience and I will try to knock-up another, more powerful version of that page so scripts can have a choice which one to display.


there is currently also the bug in the CB- workspace-build-system.

I heard a rumour that it has been revamped and is waiting to be committed ;)
Be patient!
This bug will be fixed soon...

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Scripted wizards
« Reply #9 on: October 10, 2006, 01:56:05 pm »
When you have a project-layout as i proposed in the first posting,
you start with a debug version and when the project reaches a state,
where you can think of a release version, you only copy the project file
and edit the debug and optimization flags and you can build your release
application without any other modifications.

With the "debug/release target" project setup, this is not easily possible,
until all targets in all projects have the same name (at this time no automatic check is possible)
and when it comes to build them in different object files folders, there is currently also the bug
in the CB- workspace-build-system.

I see what you mean about "targets" vs. "projects".
Indeed I do the same, but for my projects that use GCC, to use DMC and VC. To do that I change the little difference in flags with a sed script.

I think the problem here comes because C::B haves no notion of "configurations" or "properties", only of targets.
A "configuration" is only the difference in flags, thus instead of having a Release and Debug Target, you have one Target and a Release and Debug Configurations each one featuring the differences.


The good news is that this can be done using Build scripts ( http://wiki.codeblocks.org/index.php?title=Build_scripts ).  :)
The bad news is that you can read there "If you choose to go the build scripts way for your project, please don't use the project build options dialog (unless maybe for global project settings). If you do, things may not work as expected and you will unrightfully blame Code::Blocks for this ;)." :(



Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Scripted wizards
« Reply #10 on: October 10, 2006, 02:00:07 pm »
The bad news is that you can read there "If you choose to go the build scripts way for your project, please don't use the project build options dialog (unless maybe for global project settings). If you do, things may not work as expected and you will unrightfully blame Code::Blocks for this ;)." :(

Not wanting to sidetrack this topic but I wanted to give an answer to this.
Were you expecting to use build scripts and, at the same time, use the build options dialogs? You 're in for a mess if you do so :).
Note that C::B is not disallowing you to do so but rather makes you aware that things might not work as expected if you mix these two systems. You could use both if you know exactly what you 're doing though ;).
Be patient!
This bug will be fixed soon...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Scripted wizards
« Reply #11 on: October 10, 2006, 02:04:14 pm »
The reason this specific layout was chosen initially is because that's what most of the users coming from other IDEs ... expect to see...
i hope we don't need to make the same failures than others did  :D

with my post i only wanted to start a discussion to point out the different possibilities of project-setup and their advantages and drawbacks.
i started with my point of view and am interested in the opinion of the proponents of the "debug/release targets" project setup.


there is currently also the bug in the CB- workspace-build-system.
I heard a rumour that it has been revamped and is waiting to be committed ;)
brilliant, thanks !

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Scripted wizards
« Reply #12 on: October 10, 2006, 02:09:42 pm »
That's just a matter of personal preference and I need no UI-guidelines/usability-tests to tell me if I like the look'n'feel of a dialog or not :).
Hehe, I'm not talking about look'n'feel of a dialog, but about the time and steps you have to spent to create a new project.

Think of a newbie: is it easier for him/her to take the various options in small, grouped, chunks or present every little nitty-gritty detail in one dialog at once?
Yes that's true, that's why I said that they'll feel at home.
In short: wizards are good for newbies and non-tech-savvy users. But otherwise, they are not the best for power-users or programmers and so is revealed with a simple GOMS-KLM analysis.

What I'm saying is that instead of a "Go" button for the wizards, use two, a "Create" button which will create the project instantly and a "Setup" button which will let you choose the paths, configurations and whatever, which rarely changes each time you create a project.

Besides, no-one is stopping you to create a wizard with just one page, effectively simulating the dialog you 're suggesting ;).
Of course nothing stops no-one, but we have to discuss things first, right? If not, one could do a wizard in one way and another person in other way. And consistency would be lost.

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Scripted wizards
« Reply #13 on: October 10, 2006, 02:14:24 pm »
Note that C::B is not disallowing you to do so but rather makes you aware that things might not work as expected if you mix these two systems. You could use both if you know exactly what you 're doing though ;).
I though it could be plagged with bugs and crashes so I feared :P
So that's good news, I can ditch the sed scripts in favor of the build scripts :D

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Scripted wizards
« Reply #14 on: October 10, 2006, 02:19:22 pm »
Note that C::B is not disallowing you to do so but rather makes you aware that things might not work as expected if you mix these two systems. You could use both if you know exactly what you 're doing though ;).
I though it could be plagged with bugs and crashes so I feared :P
So that's good news, I can ditch the sed scripts in favor of the build scripts :D

Make sure you post any bugs you find, as the usage of both systems (concurrently) hasn't been tested ;)
Be patient!
This bug will be fixed soon...