File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Need for servlets development environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Need for servlets development environment" Watch "Need for servlets development environment" New topic
Author

Need for servlets development environment

Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 167
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

Joined: Feb 29, 2008
Posts: 1000
    
    1

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




Oracle Java Web Service Developer (1z0-897), Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I
Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

First answer this question:

What is the difference between development and deployment environments?


~ Mansukh
Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 167
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

Joined: Feb 20, 2013
Posts: 167
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

Joined: Jul 27, 2010
Posts: 1157

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

Joined: Feb 20, 2013
Posts: 167
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need for servlets development environment
 
Similar Threads
Intersection of Development and Deployment Environments
requested resource cannot be found.
Setting Up Development Environment Using Ant
Tomcat servlet runs within local network but refuses to do so online.
Setting Up Ant/Tomcat Development Enivornment