• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Web Application Architecture

 
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is what I have designed. experts' input/feedback??


Where the stuff like Jsps,Images and JavaScript would go? Under WEB-INF?
 
Sheriff
Posts: 67598
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do all the packages not start with com.companyname.projectname?

Vishal Pandya wrote:Where the stuff like Jsps,Images and JavaScript would go? Under WEB-INF?



If your app is properly structured such that all requests go through servlet controllers, the under WEB-INF is a great place for the JSPs. That ensures that they cannot be directly addressed.

Images and JavaScript on the other hand, must be addressable by URL and cannot go under WEB-INF.
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Why do all the packages not start with com.companyname.projectname?


Do you mean resources should also be start with com.companyname.projectname?
 
Bear Bibeault
Sheriff
Posts: 67598
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are they on the classpath?
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Are they on the classpath?


Doesn't the whole source directory go to classpath? I didn't get you?
 
Bear Bibeault
Sheriff
Posts: 67598
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Vishal Pandya wrote:

Bear Bibeault wrote:Are they on the classpath?


Doesn't the whole source directory go to classpath?


No, sources shouldn't even be part of the web app. The class files (along with the properties files) go on the classpath.

But with regards to the resources... The purpose of the package structure is to prevent naming collisions. By prefixing the packages with com.whatever.thisnthat you prevent collisions. What is preventing collisions for your resources?
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

No, sources shouldn't even be part of the web app. The class files (along with the properties files) go on the classpath.


Yeah, I mean to convey that only. The whole resources package would be on classpath.

What is preventing collisions for your resources?


Ok, I got your point. So resources too start with com.whatever.thisandthat.

The purpose of the package structure is to prevent naming collisions.

Indeed.

Everything else is ok?
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bear!
reply
    Bookmark Topic Watch Topic
  • New Topic