is there a java program that writes code for you?

Discussion in 'Mac Programming' started by mac000, Nov 13, 2006.

  1. mac000 macrumors 6502a

    Joined:
    Sep 6, 2005
    #1
    is there any java programs that you can tell it what you want it to compile/perform and it writes the code for you? there has to be, there has to be:confused: :eek: :mad:
     
  2. Grover macrumors member

    Joined:
    May 14, 2004
    #2
    The answer is yes and no. There are code generators that are quite sophisticated like Deklarit (for .NET) http://www.deklarit.com. You can find lots of them listed at http://www.codegeneration.net/.

    In general I've found that you have to know enough to have written the code yourself before a code generator is helpful. So I'd say there's no magic bullet (yet) but if what you want is fairly straightforward you may find something there you can use.

    CodeCharge http://www.codecharge.com will generate web apps targeting several languages and has gotten pretty sophisticated over the last couple of releases.

    There are several interesting current books about Code Generation if you're interested in a how-to. Apress has one about .NET code generation and Manning has a more general book.
     
  3. notjustjay macrumors 603

    notjustjay

    Joined:
    Sep 19, 2003
    Location:
    Canada, eh?
    #3
    While not exactly a code generator, I did really like Eclipse as an IDE, particularly the fact that you could have it help you generate class templates, function prototypes, etc. Automatic generation of setters and getters was a real time-saver, too.
     
  4. oldpismo macrumors member

    Joined:
    Aug 12, 2003
    Location:
    UK
    #4
    It really depends on the type of program that you want to have.

    For example if you want a web app then something like Java Studio Creator from Sun (free download) will do most of the work for you (you may still need to do some things).

    What kind of app are you trying to create?
     
  5. lmalave macrumors 68000

    lmalave

    Joined:
    Nov 8, 2002
    Location:
    Chinatown NYC
    #5
    What do you need the program to do?

    The short answer is no.

    But for specific applications, there is software that will write a lot of the "plumbing" code for you so that you can focus the higher-level functionality.

    For example:

    - If you're writing a desktop application, there are visual programs that let you build a GUI so that just the only coding you have to do is to write even handlers.

    - If you're writing a web application, there are tools that simplify a lot of the coding such as session handling, personalization, shopping carts, etc.

    - If you're writing an enterprise business class application, there are plenty of tools that generate code for things like: writing "business objects" to a relational database, parsing XML files into Java data structures, etc. etc.

    Please be more specific about what you're looking for and I can point you to some software.
     
  6. savar macrumors 68000

    savar

    Joined:
    Jun 6, 2003
    Location:
    District of Columbia
    #6
    If there was something like this, then Java wouldn't be a very useful language, would it?
     
  7. mufflon macrumors 6502

    Joined:
    Sep 15, 2006
    #7
    programming isn't all that hard tbh - is there any problem in simply trying to learn to program instead? You can be your own code generator =)
     
  8. notjustjay macrumors 603

    notjustjay

    Joined:
    Sep 19, 2003
    Location:
    Canada, eh?
    #8
    Writing a program to write programs is kinda like writing madlibs. The end result is a product which can be used to generate new stories, sure -- but they're very, very limited in scope.

    Visual Basic might be better for someone who would prefer to have the IDE develop most of the "code" behind the scenes. Still, it's good to have a strong foundation so you know when to NOT use the code that the compiler generates.
     
  9. notjustjay macrumors 603

    notjustjay

    Joined:
    Sep 19, 2003
    Location:
    Canada, eh?
    #10
    ooh, technically does meet all of the OP's requirements...
     

Share This Page