File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Starter Template Files for Java Programmers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Starter Template Files for Java Programmers" Watch "Starter Template Files for Java Programmers" New topic

Starter Template Files for Java Programmers

Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 397
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 ( 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.

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15080

Examples of how to use certain APIs etc. would certainly be useful.

Do you know this website?
And have you seen Krugle
and Google Code Search

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: Starter Template Files for Java Programmers
jQuery in Action, 3rd edition