Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Directory structure for a Java stand alone app

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am some one from the MVC background and have not actually developed stand alone applications. For the first time now I am in between a stand alone java app development whose high level logic is as follows:

1. Read a CVS file
2. Process the data in three stages (I have stored the data in 3 temporary DB tables)
3. Apply business rules and finally write the data to the main DB table

I went ahead with the same app directory structure as MVC apps:
action - Read file action, loadIntoTemp1Table action, loadIntoTemp2TblAction, loadIntoTemp3Action, WritetoMainTblAction
service - similar to action class, I have 4 service interfaces and implementations
dao - 4 dao implementation classes

For the service and dao layers I created interfaces and then provided implementation for these interfaces. If I have to do it simply I can do it 3/4 java classes.
I want some suggestions if this logical design of my application is correct or not?
 
Praveen Sharma
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am some one from the MVC background and have not actually developed stand alone applications. For the first time now I am in between a stand alone java app development whose high level logic is as follows:

1. Read a CVS file
2. Process the data in three stages (I have stored the data in 3 temporary DB tables)
3. Apply business rules and finally write the data to the main DB table

I went ahead with the same app directory structure as MVC apps:
action - Read file action, loadIntoTemp1Table action, loadIntoTemp2TblAction, loadIntoTemp3Action, WritetoMainTblAction
service - similar to action class, I have 4 service interfaces and implementations
dao - 4 dao implementation classes

For the service and dao layers I created interfaces and then provided implementation for these interfaces. If I have to do it simply I can do it 3/4 java classes.
I want some suggestions if this logical design of my application is correct or not?
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Praveen Sharma wrote:I am some one from the MVC background...


Is there any particular reason that you've posted exactly the same question a second time?

If it's simply because you haven't received a reply, I'd suggest that it's because nobody really knows what you want.
Also: we're all volunteers here, so "nagging" isn't appreciated.

If you want to "bump" your thread, just post something like an "Anyone out there?" message (although that, too, may get some caustic responses ).

For example: What do MVC and CVS have to do with each other?
Are you trying to emulate a CVS-like system in MVC form? And, if so, what makes you think that the original isn't already built that way?

I think it would be far better to back up and explain what you're trying to do; not how you want to do it.

Winston
 
Praveen Sharma
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Winston,
Sorry if my duplicate post offended the audience.

In simple terms this is what I am trying to do:
1. Read a file (Type of file is irrelevant)
2. Store the file data in data base.

I wanted suggestion on how should I structure my code. Me being from the web applications background, I have always used directory structures as defined by the model-view-controller pattern. And I am little unsure of how a java stand alone project should be organized?
 
I'm gonna teach you a lesson! Start by looking at this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic