Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

My first GUI program

Options
  • 25-01-2011 2:04am
    #1
    Registered Users Posts: 7,869 ✭✭✭


    Hi guys,
    Software Development student here.

    I managed to score a non-paying gig with a local business so I can start a portfolio.

    The program sounds easy enough on paper, but the only thing is, anything I've previously made in college has all been terminal, command line stuff. So, I'm on here looking for advice on how best to tackle this.

    I'll be using Visual C++ Express 2010, which I got for free off the Microsoft website. I have access to VS2010 full version though through college.
    So, I'll be using the built in tools contained in that, ie drag a textbox here, button there, double click and edit the "onClick" code etc etc. Also, I'll be using C++.
    There's a data storage element too, but not a large one. We're talking storing of 1 table, with about 30 lines and a 5 or 6 fields, updated infrequently. Actually, there might be another table or two, but not many. There'll have to be a password protected area of the program for the finances too so dont wanna store the data where someone can just open the file in notepad or whatever.

    Is this too much for an xml file? Too little for mySQL? It'll just be a stand alone app, no network, running on a single PC in the office (dont wanna start installing SQL server or anything). Very basic altogether.

    So, with that in mind, can someone tell me if i've made the wrong choice regarding IDE, or recommend a suitable database? and maybe a few tips for making the actual GUI! :D

    I'm going to start making it now using visual C++ and see how I get on.

    Thanks for the help.


Comments

  • Registered Users Posts: 7,869 ✭✭✭The_B_Man


    UPDATE:

    WTF? No Intellisense??? If I try a textbox like "txtName." usually a list will drop down telling me what I can use, eg "text" or "value". Now theres nothing! Anyone know a workaround? I think I might need a new IDE! I might do this in VB or PHP actually.


  • Registered Users Posts: 981 ✭✭✭fasty


    It sounds like you're using C++ CLI, not C++ for that project. There's no intellisense in it for some reason.

    Don't use C++ CLI for projects. It's really only intended as glue between C#/VB.Net and C++

    Hell, just use C# if you want to avail of .Net libraries.


  • Registered Users Posts: 515 ✭✭✭NeverSayDie


    I'd second that; C# with WindowsForms is by far your best option for Windows GUIs, unless you happen to a have a large existing body of experience with MFC/Win32 and the likes. Visual Studio is fine as an IDE, but C++/CLI isn't the easiest way to go about it, platform-wise.

    As ever, StackOverflow has the intel;
    http://stackoverflow.com/questions/1018233/net-gui-c-vs-c-cli

    Re databases, SQL Server Compact Edition should do the job - it's designed to be lightweight and embedded with an application. Otherwise, plain XML text files with LINQ to query them or similar might do the job.


  • Registered Users Posts: 7,869 ✭✭✭The_B_Man


    Thanks for the input.

    I did some looking around and now I'm leaning towards SQLite. Didnt look at SQL Server compact actually, but SQLite seems nice and small and fast.

    Ye I didnt know how to disable the /clr switch in VS2010 to get Intellisense. People have said online its done through the project properties but I couldnt find it.

    I had a quick go at it last night using VB.NET and got a very basic, non-db GUI. Might have a play with C# tonight.

    Which is a more marketable language, say to put on your CV, VB.NET or C#? I already have C and C++ on it from college and I'm learning iPhone development for my project this year so that takes care of Objective-C. I did VB6 years ago too, and thought it was a loada ****e tbh! :p


  • Registered Users Posts: 981 ✭✭✭fasty


    Stick with C#


  • Advertisement
  • Registered Users Posts: 515 ✭✭✭NeverSayDie


    The_B_Man wrote: »
    Thanks for the input.

    I did some looking around and now I'm leaning towards SQLite. Didnt look at SQL Server compact actually, but SQLite seems nice and small and fast.

    Yeah, SQL Server Compact is a similar idea to SQLite, very small and embeddable, either of them would do the job I imagine.
    The_B_Man wrote: »
    I had a quick go at it last night using VB.NET and got a very basic, non-db GUI. Might have a play with C# tonight.

    Which is a more marketable language, say to put on your CV, VB.NET or C#? I already have C and C++ on it from college and I'm learning iPhone development for my project this year so that takes care of Objective-C. I did VB6 years ago too, and thought it was a loada ****e tbh! :p

    Probably C#, seem to recall it getting more interest from job ads and such. I also get the impression that it's seen as a more "serious" language - purely in perception terms (they're actually the same thing effectively - the way .NET works, there's little practical difference between C# and VB.NET beyond the syntax oddities with the latter.)

    Personally, I'd suggest you go with C#, unless you have a strong background in VB6 and want to keep going with similar syntax or something. C# is a lot closer to Java and C++ in terms of general syntax, which is no harm. Personally I'm not at all a fan of the "dim"'s and lack of semi-colons, etc in VB.NET. On a technical level though, there's little practical difference - you can mix the two languages in projects pretty easily for instance, as they're both .NET based anyway. Likewise if you can read/write one, the other will be no great difficulty. About the only one that springs to mind is that the XNA platform used for hobbyist game development on Windows and XBox - if you're into that - only really supports C#.


  • Registered Users Posts: 7,869 ✭✭✭The_B_Man


    Holy crap yeah! I was getting some errors last night in VB saying "Unidentified character" directed towards the semi-colon! I removed it and the line worked fine! I was like "WTF???" especially since I'd just discovered that Intellisense "joke" in VS2010. I posted quite the angry nerd facebook status, I'll tell ya!! :p

    But ye, I'm a C-man (;)) so I'll stick with C# and SQLite, since I've been using C++ or PHP/mySQL for all my projects in college. Seems the safer option.

    While we're here actually, does anyone have any basic tips or anything that I might not have considered as a n00b? Maybe some security concerns? Can the SQLite be readable in notepad++ for example? I'll be validating all user input, as I'm aware of injection but thats about it.
    OR any tips for making an appealing GUI? Any fancy tricks??

    Thanks for the help! :D


  • Registered Users Posts: 515 ✭✭✭NeverSayDie


    Yeah, unless you have a fondness for that syntax, and you obviously don't, I'd give VB.NET a miss :)
    The_B_Man wrote: »
    While we're here actually, does anyone have any basic tips or anything that I might not have considered as a n00b? Maybe some security concerns? Can the SQLite be readable in notepad++ for example? I'll be validating all user input, as I'm aware of injection but thats about it.
    OR any tips for making an appealing GUI? Any fancy tricks??

    Thanks for the help! :D

    I don't know much about SQLite, but if you're storing all the data on the user's machine, I guess there's only so much you can do in terms of keeping folks away from it. Encrypting the database (or parts of it) in one form or another would probably be the best bet to keep out semi-casual unwelcome types (assuming they don't just run your app and access the data through it). Once again, StackOverflow delivers the goods; http://stackoverflow.com/questions/1259561/encrypt-sqlite-database-in-c

    At the lower (but easier) level, encrypting the hard disk on the machine (assuming they don't already) might also be no harm vs theft or other messing, if sensitive data is going to be stored on it. "Bitlocker" is a feature of Windows that might help there, or there are various 3rd party options.

    Re the GUI, keep it simple would be my main advice. Don't add stuff unless you need it, and strip stuff out until you have the minimum interaction you need - avoid clutter. Then focus on making that interaction as intuitive (to a regular user, not to you) as you can. Likewise, summaries and/or dashboards are always worth keeping in mind - don't make the user click/type through several screens to find something they'll want to see every time they log in. Don't be afraid to repeat the same data in different places if it's useful in different contexts - database normalisation is absolutely not something you carry through to UIs.

    "User modelling" is important - find out who's using the data and how they use it; eg, what data they need straight away every time, how they expect to find that data, what data or actions they only rarely need, etc. Design accordingly - eg if XYZ is the first thing I need to know every morning, don't put it three screens or 10 keystrokes away from my starting point. Likewise if I generally come along looking for customers, by name say, don't make the customer displays accessible only through a search of their contracts->accounts->vehicle->customer - give me a customer search as near to my starting point as is feasible. If there's some action I only perform once every few weeks or less, you can keep it tucked away somewhere where it won't be taking up space from stuff that I do use every day.


Advertisement