Welcome to my monthly “Things I didn’t know that I know now” review. Since I started this blog I have been keeping track of every word, process and acronym that I have ran into and not known. I am hoping that as time goes on, this list will keep getting shorter and shorter. Who am I kidding – the list will keep growing, technology moves so fast and I think that acronyms spawn a minimum of 3 other and new acronyms!
Here is my list for January:
- SOQL – Salesforce Object Query Language – Similar to Structured Query Language (SQL) – used with the Force.com IDE, Apex and Visualforce and it helps to know relationships between objects
- MVC – Model View Controller – In Salesforce the model is the database, or data model, the view would be a page and Visualforce, the controller manages the interactions between the view and the model
- JDBC – Java Database Connectivity -This is the API to the Java language. This means that you can use Java to connect independent databases (it is oriented towards relational databases). This is what would be used to take Salesforce.com and other databases for reporting and integration among other things.
- AJAX – Asynchronous JavaScript and XML – a group of techniques that are used on the client side to develop interactive web applications. This can be used on a Visualforce page because Apex can also handle JavaScript and markup languages.
In a previous post, (JavaScript != Java)… I had covered what JavaScript can do for a webpage and thanks to a great comment from @apexsutherland I now know the answers to the questions that I posed. Thanks again Alex! This post will be brief and cover the syntax of JavaScript.
I have started the book on C++ and that has greatly helped with my understanding of JavaScript (FYI: I will be posting again about the start of the C++ book and probably more on JavaScript as I learn more). Syntax to remember:
- Composed of statements that end can end with a ; or a line break
- Be mindful of capitalization because it is a case-sensitive language
- Single line comments start with //
- Multiple line comments start with /* and end with */
- Read the “=” as “is set to”
- Example : if (test condition) {value if true; value if false;} Note: does not have to have a value for a false return. Note: This is helpful for making sure web-to lead forms are completely and correctly filled out
- I need more time before I completely understand arrays – I see how they are set-up and know they are very important (saw them in action at Dreamforce with help from @jhoskins). Any suggestions?
To me, the syntax seemed very similar to C++. Now that I have started to learn about C++ it is greatly helping my comprehension of JavaScript and vice-versa for that matter! I am hoping it will help with arrays!
You heard it here first – ok, so not first… not even close to first.
JavaScript:
Before I started on this journey my logic would have told me that JavaScript and Java are either: the same language, based off the same language, or an evolution of the same language. And how wrong I would have been! JavaScript is the code that you can use to turn a website from a static page to a dynamic and interactive one. It runs on the browser side and not the server side.
So why is JavaScript called JavaScript if it has nothing to do with Java? Check out what Wikipedia has to say…
Forms:
This is exactly what it sounds like. You have the ability to create a form on a web page. You name the type of data, the format of the data and what to do with the data. You can use JavaScript to interact with the user. For example: Check for form completeness before submitting. Seems straightforward right? It is for the most part, although it does lead me to some questions relating to Salesforce.com.
Looking at a landing page on my company site, I noticed (and knew before) that the oid, campaignid (if you have campaigns), lead source, are all hidden. I also noticed that there is no Salesforce code for each field, like first name. Here are my questions:
- When a user hits submit, how does it get to Salesforce?
- Am I missing code when I look at the page?
- If a field( eg. firstname) doesn’t have a Salesforce ID, how does it match?
- Last question: JavaScript can validate a form, such as if all fields are filled in, can it also dictate the format of the data or would you use XHTML?
I will be looking these up and posting the answers once I find them.
HTML, XHTML & CSS for Dummies is finished. Great information and I am surprised how much more I understand web design and coding. I understand the source code to web pages I look at.
I would recommend reading this book if you are starting off, it was easy to understand and a quick read. It does not go into depth by any means, but gives the reader the background to be able to go out on their own to find the resources they need. It lays the ground work for what is to come. I feel like this is a great start…