• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need for servlets development environment

 
Tarun Oohri
Ranch Hand
Posts: 189
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,
I have just completed reading the chapter based on MVC . I understood the flow but one things that i am stuck with is ::
What is the need of making Development Environment if one has to copy everything into Deployment Environment and also execute the servlet class file from it.
Is Development Environment is just to compile servlet .java file into .class file ??
Thanks!!!
 
Abhay Agarwal
Ranch Hand
Posts: 1375
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tarun

Please let us know which book are you reading for Servlets.

Also please elaborate your question. Developement eniv allow us to write and execute quick and effective Java code.

~ abhay



 
Mansukhdeep Thind
Ranch Hand
Posts: 1158
Eclipse IDE Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First answer this question:

What is the difference between development and deployment environments?
 
Tarun Oohri
Ranch Hand
Posts: 189
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abhay Agarwal wrote:Hi Tarun

Please let us know which book are you reading for Servlets.

Also please elaborate your question. Developement eniv allow us to write and execute quick and effective Java code.

~ abhay




Hi,
I am reading Head First , completed reading 3rd chapter (Mini MVC Tutorial)...Till now what i have studied is , make Development & Deployment Structure, then compile the .java file situated in src-com-example-web ..After compiling using -d the directory structure will be derived with a .class file in it. Then copy the ( .class file , web.xml file, form.html , .jsp ) filesto Deployment structure and start the tomcat and execute the .class file in it. Am i right till now ? If i am then my question, so far we made use to Developement Environment just to generate the .class file from.java file....Nothing else ...Rest everything is done in the Deployment Structure which is under tomcat.
I hope my question is clear to you now.
Thanks!!!
 
Tarun Oohri
Ranch Hand
Posts: 189
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mansukhdeep Thind wrote:First answer this question:

What is the difference between development and deployment environments?

I got your point Mansukh but if everything we are doing under deployment (except compiling) what is the use of development.
 
Mansukhdeep Thind
Ranch Hand
Posts: 1158
Eclipse IDE Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We do not want to expose our source code to the customer when deploying our web application. All the java sources should be kept hidden from the user. Suppose if I hack into flipkart/amazon web server, then , if sources are on the server too in addition to jars and classes, can you imagine what all havoc I can cause? You certainly do not want to expose your source code to the users for security.

Second reason is segregating stuff makes things simple and easy to manage. If you had everything on deployment side, even source files, and say you wanted to change some servlet code to accommodate some new feature/enhancement or manipulate some logic, how would you do it? Would you shutdown your server and change the code and then restart it? That is precisely the whole point of have development environment. Touching code on the deployment side comes with its share of risks. You are introducing downtime. While if I have development environment, I can easily change and test and then deploy without restarting my server.

If anyone else has some other points , would be appreciated.
 
Tarun Oohri
Ranch Hand
Posts: 189
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mansukhdeep Thind wrote:We do not want to expose our source code to the customer when deploying our web application. All the java sources should be kept hidden from the user. Suppose if I hack into flipkart/amazon web server, then , if sources are on the server too in addition to jars and classes, can you imagine what all havoc I can cause? You certainly do not want to expose your source code to the users for security.

Second reason is segregating stuff makes things simple and easy to manage. If you had everything on deployment side, even source files, and say you wanted to change some servlet code to accommodate some new feature/enhancement or manipulate some logic, how would you do it? Would you shutdown your server and change the code and then restart it? That is precisely the whole point of have development environment. Touching code on the deployment side comes with its share of risks. You are introducing downtime. While if I have development environment, I can easily change and test and then deploy without restarting my server.

If anyone else has some other points , would be appreciated.


Ok thanks..getting to understand it more...nice explanation.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic