Nov 13th, 2012, 09:24 AM
Anatomy of a web-app
Ok.. This question has been nagging at me for a while now.. In looking at sample code for various Java projects that are web-driven, I'm wondering why some tend to use very deeply nested file structure with java classes sometimes 5+ directories down.. I realize that Eclipse and some other IDE's will try to hide the nesting to a point and convert directories like com/foo/bar/myapp/dao/src or similar into a single directory called com-bar-myapp-dao-src or something like that effectively collapsing the structure into something more management from a development position.
So, I guess I'm wondering if this sort of deeply nested structure is required or people do it to follow prior 'java works'? Is there any particular 'recipe' I should follow when building a web-app that would make it follow some required 'recipe' (or layout)? In my case I need a bunch of POJO objects for starters and frequently see these stored down in the deep recesses of most apps.. I'm just looking for the background on this and how to properly layout an app before I get too far into things..
Nov 13th, 2012, 09:51 AM
Ok.. Found this thread on StackOverflow.. Seems to point to some good references & practices.. I'll assume that most probably follow some of these suggestions.. I particularly liked this reference.. Seems like what I need to follow -- better than the package-by-layer methodology..
Last edited by webappRound3; Nov 13th, 2012 at 09:54 AM.