Yesterday I learned about express and today is a continuation of that. According to the Express website
“A template engine enables you to use static template files in your application. At runtime, the template engine replaces variables in a template file with actual values, and transforms the template into an HTML file sent to the client. This approach makes it easier to design an HTML page.”
Express by default has Jade running but you can change it to many different types of template engines. The template engine I used in the course was EJS. Creating HTML files on the fly is a very powerful feature.
The next topic discussed was about body parsers, which is another middleware. It parses HTTP requests in the body before handlers get to it since it is middleware. I used this for submitting surveys and parsing JSON. Parsing in JSON is useful since data is usually in JSON format.
Ended the courses today learning about RESTful APIs and JSON which I’ve gone over before in my blogs, but it is always nice to get a refresher on information. This ultimately led to the structuring on apps which in the course was this.
Most of the structuring is based on REST and the folders usually in an app. Then just seeing how to call modules and data from other folders in what order usually.<div class='sharedaddy sd-block sd-like jetpack-likes-widget-wrapper jetpack-likes-widget-unloaded' id='like-post-wrapper-155635758-487-5d0773ee13a93' data-src='https://widgets.wp.com/likes/#blog_id=155635758&post_id=487&origin=trilamanila.com&obj_id=155635758-487-5d0773ee13a93' data-name='like-post-frame-155635758-487-5d0773ee13a93'><h3 class="sd-title">Like this:</h3><div class='likes-widget-placeholder post-likes-widget-placeholder' style='height: 55px;'><span class='button'><span>Like</span></span> <span class="loading">Loading...</span></div><span class='sd-text-color'></span><a class='sd-link-color'></a></div>