Best practices

So far, we've only covered building Vanilla JavaScript, which should not be confused with the Vanilla framework. Even though it is the best way to learn, it is more likely that you will work with some kind of framework. Webpack will work with any JavaScript or TypeScript framework, including Ionic and jQuery; however, more tricky frameworks include Angular, Vue, and YAML. 

Now, we will get to grips with YAML, but before delving into this, you may be wondering whether backend frameworks can be integrated. The simple answer is that they can, but they are not bundled. The only level of integration, however, is through linking source code, as we do with most projects or APIs, such as REST APIs.

As we have already discussed, Webpack has a production and development mode. Production mode bundles your project into its finished state, ready for web delivery or publication, and provides little room for tweaking. Development mode gives the developer the freedom to modify database connections; this is how the backend integrates. Your project's backend will likely be ASP.NET or PHP, but some backends are more complex and utilize OpenAuth. As a developer, you will need an overview of all of them. This guide, however, only deals with Webpack.

Rest assured that all of these frameworks will integrate, which is done via a REST API, which returns data in JavaScript Object Notation (JSON) format. It is also possible to do this using AJAX. In any case, ensure that secure best practices are followed, as JSON calls to databases are not as secure as using a server-side script.

If your project uses Ionic, then you should follow the instructions for Angular as the Ionic framework is based on this.

That should give you a solid overview of the best practices for working with backends and libraries. We will now discuss each of the most common libraries that you will encounter in a Webpack. Let's start with JSON, as it is the easiest to understand and is the most important way that external or backend code and databases interact with your Webpack application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.12.172