Click here to Skip to main content
15,886,919 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: How do you problem solve? Pin
Amar Vala10-Feb-17 2:36
Amar Vala10-Feb-17 2:36 
AnswerRe: How do you problem solve? Pin
Eddy Vluggen10-Feb-17 4:22
professionalEddy Vluggen10-Feb-17 4:22 
AnswerRe: How do you problem solve? Pin
Gerry Schmitz10-Feb-17 10:38
mveGerry Schmitz10-Feb-17 10:38 
QuestionSomething I use a lot Pin
Munchies_Matt18-Jan-17 10:26
Munchies_Matt18-Jan-17 10:26 
AnswerRe: Something I use a lot Pin
Richard Andrew x6421-Jan-17 5:44
professionalRichard Andrew x6421-Jan-17 5:44 
GeneralRe: Something I use a lot Pin
Munchies_Matt21-Jan-17 13:57
Munchies_Matt21-Jan-17 13:57 
JokeRe: Something I use a lot Pin
Brisingr Aerowing21-Jan-17 15:45
professionalBrisingr Aerowing21-Jan-17 15:45 
QuestionHow to build a tool using XML to draw a GUI and to generate an output stream? Pin
yobibytes17-Jan-17 5:43
yobibytes17-Jan-17 5:43 
FlagComposer: let's build a software tool using XML to define a set of national flags.

This project is mainly addressed to students or programmers who'd like to have a challenging programming task to solve as an exercise in their free time…

So, here is the description…

Let's imagine, we want a software tool to define a set of national flags. The tool should use XML data to (1) draw a GUI and (2) to generate an output.

Aim of this application is to build a GUI starting from a XML file (e.g., see "FlagComposer.xml" in the GitHub linked at the end of the post) and to generate an output XML file (e.g. "FlagGermany.xml") according to what has been set by the user in the GUI.

In input we have one (or more… but not simultaneously processable) XML file(s) defining which elements (graphical controls) should compose the GUI, which parameters are needed to define a flag, which values are valid; in output we want to have one XML file for each flag definition. It is not required to display an image of the flag: the XML file is all that we want to have as a result of the processing.

The application must read a XML file containing a "GUIDefinition" element and draw a graphical user interface accordingly. It must also be able to generate and write out a XML file containing a "FlagDefinition" element.

[Application is launched]
==>
[Read XML <guidefinition>]
==>
[Draw GUI accordingly]
==>
[Process user's "Save" or "Exit" command]
==>
["Save" creates XML <flagdefinition>]
==>
[Exit]

Starting from the <guidefinition> element of the input XML data, we want to build up a GUI where the user can enter the required parameters, for instance (…see "FlagComposer.xml"):

1. a "Name" should be entered through an editable text field;

2. a "Direction of Stripes" specification should be entered through a list box (or choice box) displaying the available options ("Horizontal" and "Vertical") and allowing the user to select one of them;

3. a "Number of Stripes" should be entered through a numeric spin box ranging from "MinValue" to "MaxValue" (eventually initialized to a "DefaultValue");

4. a set of list/choice boxes should allow the user to enter the colors of the flag: the GUI must provide N occurrences of the "Color of Stripe" parameter (list/choice boxes) according to the previously set "Number of Stripes".

Once the user has entered all the required data, an enabled button or menu option should allow him to generate and save the output XML file with the final <flagdefinition> element (to have an example of the output file, see "FlagGermany.xml").

To develop the application, free or open source tools should be preferred over commercial ones, but the choice of the programming language, IDE and framework, with which to implement the application, is ultimately left open to any option and demanded to the programmer (that is, to anyone who's going to try to implement a solution to this problem): you may choose whatever language or framework you like. Of course, the simpler and faster-to-implement-and-maintain the solution is, the more it will turn out valuable.

A set of XML files, to use as a model of the input data (<guidefinition>) that should be used by the application and of the output (<flagdefinition>) that should be produced, is available on GitHub (there you'll find XML data files only; there's no source code, as the application doesn't exist yet…):

https://github.com/FromTimeToTime/FlagComposer/

Please, fork the GitHub project to suggest your ideas or your implementation of a solution…

As you can see, the application that I'm asking you to design (and eventually develop) is just a "toy", but it could give me the crucial hint necessary to deliver a solution in the professional field where I'm working… and - yes - to save my job!
(In the company where I'm currently employed I'm struggling to solve a problem with several technical analogies already since a long time, unfortunately without success till now… Well, I'm just a junior developer, after all; I hope you'll understand…)

XML is a ground requirement in this "FlagComposer" simply because it is a requirement (for the communication between many software components, having distinct producers even) in the project I'm professionally working on. For understandable reasons, I couldn't post anything related to the real project… but in the "FlagComposer" problem (note again that there's no such application yet!) a few technical aspects of the "real" project, whereto I have to deliver a solution, are reflected.

Also links to useful resources and to existing source code doing more or less what is involved here could be very helpful!
Any contribution will be very appreciated! Thanks a lot in advance!!! Smile | :)
AnswerRe: How to build a tool using XML to draw a GUI and to generate an output stream? Pin
Gerry Schmitz17-Jan-17 6:08
mveGerry Schmitz17-Jan-17 6:08 
GeneralRe: How to build a tool using XML to draw a GUI and to generate an output stream? Pin
yobibytes17-Jan-17 22:08
yobibytes17-Jan-17 22:08 
GeneralRe: How to build a tool using XML to draw a GUI and to generate an output stream? Pin
Richard MacCutchan17-Jan-17 22:17
mveRichard MacCutchan17-Jan-17 22:17 
GeneralRe: How to build a tool using XML to draw a GUI and to generate an output stream? Pin
Pete O'Hanlon17-Jan-17 23:18
mvePete O'Hanlon17-Jan-17 23:18 
GeneralRe: How to build a tool using XML to draw a GUI and to generate an output stream? Pin
yobibytes18-Jan-17 0:15
yobibytes18-Jan-17 0:15 
GeneralRe: How to build a tool using XML to draw a GUI and to generate an output stream? Pin
Pete O'Hanlon18-Jan-17 0:21
mvePete O'Hanlon18-Jan-17 0:21 
GeneralRe: How to build a tool using XML to draw a GUI and to generate an output stream? Pin
Pete O'Hanlon18-Jan-17 0:28
mvePete O'Hanlon18-Jan-17 0:28 
AnswerRe: How to build a tool using XML to draw a GUI and to generate an output stream? Pin
yobibytes19-Jan-17 23:33
yobibytes19-Jan-17 23:33 
GeneralRe: How to build a tool using XML to draw a GUI and to generate an output stream? Pin
Gerry Schmitz20-Jan-17 5:14
mveGerry Schmitz20-Jan-17 5:14 
QuestionWill C++ and even MFC Work in this Environment? Pin
Richard Andrew x6415-Jan-17 10:50
professionalRichard Andrew x6415-Jan-17 10:50 
AnswerRe: Will C++ and even MFC Work in this Environment? Pin
Munchies_Matt18-Jan-17 10:29
Munchies_Matt18-Jan-17 10:29 
AnswerRe: Will C++ and even MFC Work in this Environment? Pin
Albert Holguin18-Jan-17 12:17
professionalAlbert Holguin18-Jan-17 12:17 
GeneralRe: Will C++ and even MFC Work in this Environment? Pin
Richard Andrew x6421-Jan-17 1:54
professionalRichard Andrew x6421-Jan-17 1:54 
QuestionLogin systems Pin
V.4-Jan-17 1:40
professionalV.4-Jan-17 1:40 
AnswerRe: Login systems Pin
Nathan Minier4-Jan-17 1:58
professionalNathan Minier4-Jan-17 1:58 
GeneralRe: Login systems Pin
V.4-Jan-17 2:05
professionalV.4-Jan-17 2:05 
GeneralRe: Login systems Pin
Nathan Minier4-Jan-17 2:30
professionalNathan Minier4-Jan-17 2:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.