This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Starter Template Files for Java Programmers

 
Siegfried Heintze
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm finding that when I'm on the job or in the classroom, I often need a minimal program to get me going on a project quickly. I might need a minimal program to read XML via standard input and query it via XPATH or serialize/deserialize java objects to/from XML (JAXB). Or maybe a starter for jdbc.


So this inspired me to create a library of some starter templates using emacs elisp code. I prompt for a few brief answers to some questions and generate a java program with an accompanying build.xml or bash script to demonstrate a single feature of some framework such as spring or xalan.

This is in contrast to the maven archetype project where you get an entire project that demonstrates many, many features of the chosen framework.
I've seen the list of archetypes and it is impressive (http://docs.codehaus.org/display/MAVENUSER/Archetypes+List). I've tried a few out too. But maven archetypes do not allow the author of the archetypes to prompt for few brief questions and they assume you want to start a brand new project. And the appfuse archetypes are extremely impressive but they can be overwhelming and overkill. It took me a good 20-30 hours to get thru the tutorial to learn how to use the code it generated for me.

I'm targeting something less ambitious than appfuse or typical maven archetypes: I often just need something minimal to get me started with spring class factories, xalan, spring-JPA, spring-hiberante, spring-JMS, jdbc, dbunit, etc...

I was thinking about converting my elisp code into java/eclipse-plugin code so one could more easily augment existing projects with existing source code (but I've never written an eclipse plug-in).

Am I doing something that has already been done? Would such a library of templates be useful to other folks besides me? I'm presently working on various spring templates (hibernate, IBatis and JPA), XML serialization (JAXB), jdbc, xalan for java. I already have other templates for C++ and perl.

I wondering if this could be the basis for a book or open source project.

Thanks,
Siegfried
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15272
37
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Examples of how to use certain APIs etc. would certainly be useful.

Do you know this website? http://www.exampledepot.com/egs/
And have you seen Krugle http://www.krugle.com/
and Google Code Search http://www.google.com/codesearch
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic