On the AppDev team, we often refer to front-end code or back-end code. But what on earth does that all mean? I’ve mentioned in the past that we write code in the Ruby programming language. That code is back-end code. That means that it runs on a server and sends some information back in the form of a web page or data from an API.
When you click on a link or enter a URL into a browser, that sends a request to a server that’s at the address of the URL. The back-end code interprets that request and sends something back as a response. There’s often some processing that happens before the response is sent. For example, the code on the server may connect to a database to retrieve some information and send a web page back with the contents of that information. All of this happens on the back end.
But we also write front-end code. Front-end code is code that is executed on your computer in the web browser. The interactive parts of a web page are often front-end code, written in a language called JavaScript (not to be confused with Java). Take the Room Search site, for example. When you open the “Location” menu and check a checkbox there, what you see on the page changes. That interaction happens using JavaScript that your browser runs. Neither the server, nor Ruby are involved at all.
So, as a team, we need to know how both of those languages work. Fortunately, the concepts between them are often similar even though the syntax is different. It’s similar to learning Spanish after you’ve already learned French. Familiarity with one makes learning and understanding the other easier.
No comments:
Post a Comment