Test locally first, then deploy to the cloud.
As recommended by Cheuk Chau on Medium, I read 'How to Develop a Daily Writing Habit’ - I’ll try to put it in practice here with my second advise - should have been my #1 advise:
Run a local copy of your application first, before to test it on your cloud instance.
While it’s simple to run directly on the Cloud, and we have a lot of samples available to get started, working local first is the best way to get ready when trouble come your way.
Samples are available from:
- Your own Cloud instance SDK : https://javatrialxxxx-usoracletrialxxxx.java.us2.oraclecloudapps.com/doc/index.html
- another instance of the SDK documentation, hosted for you : https://javas2-jcscdc.java.us2.oraclecloudapps.com/doc/index.html
- The Cloud documentation books : https://docs.oracle.com/cloud/latest/javacs_gs/index.html
- OTN samples : http://www.oracle.com/technetwork/indexes/samplecode/cloud-samples-2203466.html
- Same samples, hosted on github : https://github.com/oracle/Oracle-Cloud
One challenge you will face : there are many ways to get code deployed - you need to find the best option for you and your organization. Here are a few :
- JDeveloper workspace, using 184.108.40.206.1 build.
- ant build.xml (part of the SDK samples)
- maven pom.xml (part of the SDK samples)
- java cli (part of the SDK samples)
- the web console
The other step important is to check the output of the deployment and minimize the number of error and warning you see.
In one case, I started to look at some error I was seeing first in my Cloud instance, assuming it was a new issue. After a few trials, I finally run another test with my local setup and found that I was getting the same error. I made a mistake while editing some of the source code for my application and did not catch the error with local testing, which would have been cheaper for me.
For my next post, my advise is going to be of a different form - what you should not try. The do not advices are as valuable as the do advises - In some case. you have to learn from your mistakes, but sometime, it’s cheaper to leverage someone else mistakes.