9 Replies - 1679 Views - Last Post: 30 August 2015 - 07:13 AM Rate Topic: -----

#1 nilanila   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 28-September 14

How do I use my console application for real?

Posted 28 August 2015 - 12:56 PM

I'm a total beginner who started study programming one year ago. And though I have studied a whole year now, I have this pretty embarrising question. (I'm actually rather disappointed that this wasn't clearer in my courses, since the education I'm attending had no special knowledge demand in programming.) Anyway... my question:

One of my courses was programming in C#, where we learned to program console applications in Visual Studio. Fine. But! My question is: how do I use that? How do I make it "real"? Do I use a special program to use my C# code in a graphic layout?

Is This A Good Question/Topic? 0
  • +

Replies To: How do I use my console application for real?

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15792
  • View blog
  • Posts: 63,281
  • Joined: 12-June 08

Re: How do I use my console application for real?

Posted 28 August 2015 - 01:00 PM

Ideally you would make a new solution, but pick a wpf or winform solution. Visual Studios sets up your GUI references for you. Depending on what you wrote you can porting functionality and methods over and start wiring it up to your UI objects.
Was This Post Helpful? 1
  • +
  • -

#3 ybadragon   User is offline

  • Home Owner
  • member icon

Reputation: 571
  • View blog
  • Posts: 2,647
  • Joined: 11-May 12

Re: How do I use my console application for real?

Posted 28 August 2015 - 01:12 PM

What Modi said, or if you are in my line of business and most of your projects don't need a UI you just install them as a service and set up a scheduler to run them, or in my case they are triggered from some watched directories.
Was This Post Helpful? 1
  • +
  • -

#4 Curtis Rutland   User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5106
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: How do I use my console application for real?

Posted 28 August 2015 - 01:56 PM

I'd suggest against calling a console application "not real". I've been a professional developer for the better part of a decade now, and I have written way more console applications than I have client apps with a GUI, that have been used for a real purpose.

Console applications are useful in their own right. I've written them to do all kinds of task. Most of them are meant to be automatically run by the task scheduler or invoked by a service.
Was This Post Helpful? 2
  • +
  • -

#5 astonecipher   User is offline

  • Enterprise Software Architect
  • member icon

Reputation: 3151
  • View blog
  • Posts: 11,956
  • Joined: 03-December 12

Re: How do I use my console application for real?

Posted 28 August 2015 - 03:46 PM

I'm not a .net developer, but I write many shell scripts that obviously don't have gui's. There are different reasons for different types of programs. Don't dismiss it because you don't know it's usage, yet.
Was This Post Helpful? 0
  • +
  • -

#6 andrewsw   User is offline

  • palpable absurdity
  • member icon

Reputation: 6905
  • View blog
  • Posts: 28,565
  • Joined: 12-December 12

Re: How do I use my console application for real?

Posted 29 August 2015 - 03:55 AM

I recommend that you do not start by attempting to port one of your console applications. The paradigm, the approach, to a GUI is very different to a console application.

A console runs linearly: get input, process it, produce output (possibly repeat), then the application exits. GUIs are event based. The user fills-in details then nothing happens until they, typically, press a button. The output is typically a modification to what appears on the form/window and usually the application won't exit until the user specifically closes the application.



The output for a GUI or, more specifically, for a form/window, could also be considered the displaying of a second form/window, or the production of a printed document or report. (Or the insertion of data into a database.) But at the early stages the output will be additional information that is displayed on the currently running form, produced in response to an event such as clicking a button.
Was This Post Helpful? 1
  • +
  • -

#7 baavgai   User is offline

  • Dreaming Coder
  • member icon


Reputation: 7507
  • View blog
  • Posts: 15,558
  • Joined: 16-October 07

Re: How do I use my console application for real?

Posted 29 August 2015 - 04:29 AM

View PostCurtis Rutland, on 28 August 2015 - 04:56 PM, said:

I'd suggest against calling a console application "not real". ... Most of them are meant to be automatically run by the task scheduler or invoked by a service.


I would define terms here.

Command line application: A program that can be invoked with user arguments and can then run non interactively sending output, if any, to standard output.

Console application: A program that uses console input and output to interact with the user. Essentially a GUI where the G is terminal IO.

A command line app is appropriate for many modern jobs. However, if you're essentially doing a 1990's DOS app with conio or curses, then you're either a student or living in the past.

So, to the OP, rather than use the console for IO, you use use a GUI form of some sort to interact with the user.

The reason you start with console apps is because you are meant to learn programming logic. The particulars of how a user enters input and receives output are a distraction from the more basic task of processing data. One you can write a program to process data, then you can start to worry about how you get data from and to the user.
Was This Post Helpful? 1
  • +
  • -

#8 nilanila   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 28-September 14

Re: How do I use my console application for real?

Posted 30 August 2015 - 12:10 AM

View PostCurtis Rutland, on 28 August 2015 - 01:56 PM, said:

I'd suggest against calling a console application "not real". I've been a professional developer for the better part of a decade now, and I have written way more console applications than I have client apps with a GUI, that have been used for a real purpose.

Console applications are useful in their own right. I've written them to do all kinds of task. Most of them are meant to be automatically run by the task scheduler or invoked by a service.


Okey, I'll reprase my question: In a couple of months I'll start a new course, where I'm doing my own project, which I'm really looking forward to. I've already started planning this in my head and want to prepare for it. Not because I have to right now, but because I think it's fun to learn. My statement about C# was not meant to talk down to Console Applications, of course I understand that they're useful! I'm sure I'll get more information on the way in my education but, as I said, I want to prepare myself. So to my question:

If I want to do for example an app for Android, IOS or Windows, where do I start? (The only program language I know this far is C#, but perhaps I'll use this course to learn another one.)
Was This Post Helpful? 0
  • +
  • -

#9 andrewsw   User is offline

  • palpable absurdity
  • member icon

Reputation: 6905
  • View blog
  • Posts: 28,565
  • Joined: 12-December 12

Re: How do I use my console application for real?

Posted 30 August 2015 - 01:37 AM

Quote

but perhaps I'll use this course to learn another one.

Is the course not focussed on a particular language?

It is possible to develop in C# for Android and iOS using Xamarin:

Cross-Platform Development in Visual Studio

I don't recommend switching languages at such an early stage, it's better to continue until you are able to confidently create a non-trivial program.
Was This Post Helpful? 1
  • +
  • -

#10 astonecipher   User is offline

  • Enterprise Software Architect
  • member icon

Reputation: 3151
  • View blog
  • Posts: 11,956
  • Joined: 03-December 12

Re: How do I use my console application for real?

Posted 30 August 2015 - 07:13 AM

Just because you are taking courses doesn't mean that is the only place to learn. Learn more about c#. winforms is likely the next thing you will go into in school, but asp is another area to understand, as is WPF.

Start toying with small projects now. It gives a better understanding of the process and language as you move forward.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1