Thread: Software Design issue

  1. #1
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459

    Software Design issue

    G'day,

    I'm writing a sort of kiosk / internet cafe manager (For Windows, but other things perhaps later). A while ago I asked about "locking the screen" and I managed to whip up a prototype in C using the information posted. My question is about architecture more than anything else.

    Currently I have a client, which is an interface written in Java that creates a child process (Written in C) to lock the screen when required, they communicate over stdin/stdout using a simple IRC like protocol I designed. I also have another program, written as a windows service in C which communicates with the interface over TCP/IP using the same protocol I designed (for a coin validator).

    Then I have the server which is written in Java, and a manager program that is written in Perl (web application).

    So my question is, mainly with regards to the client, should I just write the whole thing in C? The reason why Java found itself in there is because it's portable, but cannot do things like keyboard hooks (to lock the screen). And if I went to say, a Mac all I'd have to do is re-write the screen locking program (in theory).

    Ideas / suggestions?
    Thanks!

  2. #2
    Complete Beginner
    Join Date
    Feb 2009
    Posts
    312
    Quote Originally Posted by zacs7 View Post
    G'day
    Guten Tag.

    Currently I have a client, which is an interface written in Java that creates a child process (Written in C) to lock the screen when required, they communicate over stdin/stdout using a simple IRC like protocol I designed. I also have another program, written as a windows service in C which communicates with the interface over TCP/IP using the same protocol I designed (for a coin validator).
    Holy crap.

    So my question is, mainly with regards to the client, should I just write the whole thing in C?
    Yes.

    You won't make friends among software designers if you tell them that you wrote three different programs in three different languages only to remotely lock a screen. If you do it in a single program, it's pretty straightforward: listen on port 31337 for "on"/"off" and lock/unlock the screen accordingly. 30 lines of code? For security purposes, you might want to implement a simple challenge-response-mechanism to prevent people from locking other people's screens. But in an internet cafe, you already have built-in security: "Yeah, and don't forget the burly 85 kg RelationalWeenie who might object, track down your location through your IP, and ram your keyboard down your nose so far it sticks out your elbow..." (C2 wiki)

    The reason why Java found itself in there is because it's portable
    A common misconception. Java byte code is not portable at all, as it only runs on Java virtual machines ;-)

    Greets,
    Philip
    All things begin as source code.
    Source code begins with an empty file.
    -- Tao Te Chip

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. float calculation issue
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 05-26-2008, 04:56 AM
  2. Helper functions: design issue
    By anon in forum C++ Programming
    Replies: 3
    Last Post: 02-20-2008, 03:44 PM
  3. C# and C++ Past, Present, Future :: Software Engineer
    By kuphryn in forum C++ Programming
    Replies: 0
    Last Post: 04-06-2004, 10:59 AM
  4. software licences
    By trekker in forum Tech Board
    Replies: 3
    Last Post: 06-17-2003, 08:37 AM
  5. Software Licensing
    By jester in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 12-30-2001, 06:42 PM