In this course we'll discover how Cloud9 works, how we can get access to an environment, and how to get a workspace setup for Java application development. What’s great about Cloud 9 online IDE is that your environment is running on a virtual machine in the cloud and is fully configured for you by default in under a minute! Everything is provisioned for you in Cloud 9 with proven, compatibility-tested versions of everything, across the board. What’s also nice is you can access your Cloud environment from any browser, any where, on any device and you can share your environment with other developers for code review and/or paired programming. Working with an online IDE versus working with a typical hard-installed client is a similar experience as coding goes. But, when it comes to testing, running a localhost server, networking and some other subtle tasks, things go a bit differently because your environment is in your browser with Cloud 9. We'll learn the ins and outs of coding in the cloud and see just how efficient it can be.
By leveraging the Cloud 9 online development environment we're on the cutting edge of application development and deployment. Let "Writing Java Apps with Cloud9" take you into the future of application development!
About the Authors
Brett Hooper is a well-seasoned software engineer, entrepreneur, teacher, and all-around techno-surfer. His decades of experience have taken him from years of IT consulting for Fortune 100 behemoths, to a number of entrepreneurial start-up efforts, to the U.S. Dept of Defense in defining their way forward in mobile and web-related technologies. Brett’s excitement in learning, implementing, and teaching new, interesting development frameworks, stacks, and services is never waning and keeps him heads-down more than not. He develops new teaching content from his AlohaCodeWorks headquarters in beautiful Maui, HI.
Review the section description (from the outline). Iterate the section video titles and provide a bit of detail for each.
Cloud9 IDE is a development environment in the Cloud. It runs in the browser, but still provides the power and features to compare with even the best hard installed IDEs such as Eclipse or Visual Studio. How can an app in the browser possibly do what we're accustomed to on our local IDEs?
It may still seem a stretch to have an IDE running in a browser as compared to a locally installed system. You may be wondering how workspaces function and how the IDE actually works. We can look a little closer at these things and address some of the concerns that may still be outstanding.
Cloud9 requires that a user establish an account to access services. There are different options available on different account types to provide the appropriate features and performance for different types of users of the service. We should have an understanding of the different account types before setting up a new account.
What are Servlets and JSPs and why are they used? Think of them as Java classes that can extend the capabilities of an application server. Servlets and JSPs have the capability to respond to any type of request and serve dynamic web content from a container within a web server. They are primarily used with the HTTP protocol.
Servlets and JSPs provide many appealing qualities in a mature and extensible platform for application development. Let's look at how common use-cases sit within this environment in both the contexts of the client and the server-side.
Developing with Servlets and JSPs requires a few specific things—Java, the Servlet and JSP libraries, and an application server with a Servlet container. Let's take a look at these requirements individually and understand what each does individually and collectively.
We can begin fine tuning our Cloud9 workspace for Java development and then get a project scaffolded for a Java Web application. What do we have here that looks familiar?
As we continue to get our Workspace tuned and a Java Web application project scaffolded, we will start to see some differences in how things are done. Let’s setup our app server and test it out.
With our Workspace and project setup and ready to roll, let's examine our active environment and some of its parameters that we should be aware of as we code and test on Cloud9.
Because our environment is running in a VM in the cloud and our interface is the browser, we no longer have local access to anything. So, certain things, like developing database components, are handled bit differently.
Even though we’re working in the Cloud and we’re discovering it’s differences from a local environment, we’ll still find many of the development resources we depend upon readily available, like Git.
We’ve completed the process of readying a Workspace and project for Java Web app development and are ready to code up the world’s next best thing. Let’s review each of the steps we’ve taken and think about their significance.
In getting our project set up for code, we now can take the next step, which is getting Tomcat installed. This includes a list of things that have to happen, in order, for the installation to be successful.
As we progress with our workspace and project definition, we are nearly ready to begin coding. We do need to have a database installed and there is a procedure we can follow to get this done.
The final step in readying our dev environment and project for coding is to get Git configured and connected to an outside repo. We know this is easily done on Cloud9, but let’s review the steps
Get an initial servlet working in our project will prove that everything works and we can continue with development. We can create a servlet to output some html, a jndi implementation for database access, and a build script to build and deploy it all.
With a Servlet defined and running successfully in our app, including the use of a data access class and a Quote bean class, we can focus now on implementing a JSP as well. Let’s use best practices and replace our Servlet’s Quotes page creation functionality with a new JSP.
With a JSP replacing what we had working originally in a Servlet, we can now re-purpose the Servlet to provide a JSON output of our Quotes data. The servlet is already wired up and working, so changing the output code within the Servlet is where we need to modify things.
Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.
With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.
From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.
Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.