CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2007
    Posts
    71

    Destop app: C# or Java (swing)

    Hi Guys

    I am planning on working on a desktop application which will be used to connect to DB servers (mysql, oracle etc), execute queries, would like it cross platform and so on. I have the choice between C# or Swing. I haven't used any of these for desktop apps before but I would like insight from more experienced programmers so that I can make a more informed choice.

  2. #2
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: Destop app: C# or Java (swing)

    I have been using .NET for years now, so I would be comfortable writing this in C#. However, some one else would have some other opinion. But the rule of the thumb is that if you are comfortable with a programming language then use that. Say if you have developed applications using C# earlier then use C# rather than learning something else and then working on it.

  3. #3
    Join Date
    May 2002
    Posts
    10,943

    Re: Destop app: C# or Java (swing)

    Cross-platform as in various Windows operating systems? Or are you referring to Windows, Mac OS X, and Linux? If you are referring to the second, then C# will get you no where. Mac OS and Linux have had Java capabilities for years, but not access to the .NET framework.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  4. #4
    Join Date
    Mar 2007
    Posts
    71

    Re: Destop app: C# or Java (swing)

    I meant cross platform as linux, mac, windows etc - I think I will use Java in that case. However, I would prefer the UI to take the look & feel of its native OS and Java uses lightweight components.

    Just out of curiousity, if we take firefox for example, do they build seperate browsers for each individual OS ?

  5. #5
    Join Date
    May 2002
    Posts
    10,943

    Re: Destop app: C# or Java (swing)

    Quote Originally Posted by aShape View Post
    Just out of curiosity, if we take Firefox for example, do they build separate browsers for each individual OS ?
    That all depends on the company or individual doing the programming. In Mozilla's case, Firefox is written in C for Windows. Since native Cocoa for Mac uses Objective-C, a derivative of C, I'm sure that this was a re-write of several portions of code.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  6. #6
    Join Date
    Apr 2004
    Posts
    102

    Re: Destop app: C# or Java (swing)

    Quote Originally Posted by aShape View Post
    I meant cross platform as linux, mac, windows etc - I think I will use Java in that case. However, I would prefer the UI to take the look & feel of its native OS and Java uses lightweight components.

    Just out of curiousity, if we take firefox for example, do they build seperate browsers for each individual OS ?
    In the case of something like a web browser, you will have some common components that operate the same at the C++ level regardless of OS Platform, things like text-parsing (html, javascript, etc.). These will be shared source code files.

    There will also be some shared concepts between platforms (say, drawing a rectangle), that will differ in function name/header and source library. One might look like void DrawRect(Point vertex, int length, int height) and another might look like int drawRectangle(Vertex corner1, Vertex corner 2). (These are arbitrary examples I made up off the top of my head.)

    In this case, you would make your own function header to bridge the difference, with a different implementation for each platform. You'd possibly place each implementation version in a different source file.

    Beyond that, there will be a separate makefile / IDE project for each platform, with both different and shared source files and libraries included for each different platform.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured