What is a Servlet Container?

In this post, I write a little bit about the basic ideas of web server, Servlet container and its relation with JVM. I want to show that Servlet container is nothing more than a Java program.

1. What is a Web Server?

How Machine-Learning-as-a-Service Can Help the Internet of Things Reach its Potential

By the sound of it, the Internet of Things (IoT) might be one of the biggest technological breakthroughs since the invention of the internet itself. 

The basic concept revolves around sensors embedded in nearly anything (mobile devices, clothing, manufacturing equipment, appliances, etc.) being able to communicate with each other, providing for a more convenient interconnected life with the cloud

How To REST With Rails and ActiveResource: Part Three

It’s easy to use OpenURI and Net::HTTP. Well, "easy" is a relative term. Building a client library to access our task manager service still requires a fair amount of boilerplate code — more than we care to write, test, and maintain. We have shown you some principles and conventions for designing RESTful web services, and in this final part of our three-part series, we'll take it a step further and show you how we can use them to develop a client library for the task manager using ActiveResource.

If you missed parts one and two of the series you can find them here:

How to Render Your Website

A little history

Back in the days, rendering a website was simple. You needed a web server that served HTML files. Those were static sites. Then developers started using databases and authentication. To achieve that, they needed to manipulate the HTML file before serving it. That's how server-side rendering was born. Let's fast forward until 2010, when Backbone got released. The front-end got richer and more complex. Then the era of client-side applications begin. Developers migrated their data and routing logic to the client side. They could, because Google "understood" JavaScript. The servers became slimmer, but the websites became more complex. Yet, recently server-side rendering became a trend again. All thanks to React and its server-side hydration feature.

Static sites

Static sites are the simplest way to render a website. You code your website in HTML/CSS, and serve those files from a web server. This is the simplest way to render your website, but it comes with pros and cons.

Faking Server-Side Rendering With Vue.js and Laravel

Server-side rendering (SSR) is a design concept for full-stack web apps that provides a rendered page to the browser. The idea is that the page can be shown while the user waits for scripts to be downloaded and run.

If you aren't using a Node.js server for your app then you're out of luck; only a JavaScript server can render a JavaScript app.

Client-Side v/s Server-Side Rendering: What to Choose When?

The Web Page Rendering Dilemma

The discussion about a web page rendering has come to light only in recent years. Earlier, the websites and web applications had a common strategy to follow. They prepared HTML content to be sent to the browsers at the server-side; this content was then rendered as HTML with CSS styling in the browser.

JavaScript frameworks came in with a completely different approach to web development. JavaScript frameworks brought in the possibility of shedding burden off the server.

Advanced Server-Side Rendering With Laravel and Vue: Multi-Page App

A few weeks ago I wrote a tutorial on the new Vue server-side rendering capabilities for Laravel. That tutorial mostly focused on the set up of SSR in a Laravel environment and so I only had time to demonstrate a simple "Hello World" app with no significant features.

Now I want to build on that previous tutorial and demonstrate how to server render a Vue app that includes multiple pages with Vue Router since most of your Laravel projects will have more than one page.

Facebook Authentication and Authorization in Server-Side Blazor App

Introduction

The latest preview for .NET Core 3 (preview-6) has introduced the functionality to add authentication and authorization in a server-side Blazor application. In this article, we will learn how to implement authentication and authorization using Facebook in a server-side Blazor application. You can refer to my previous article Understanding Server-side Blazor to get in-depth knowledge on server-side Blazor.

Prerequisites

  • Install the latest .NET Core 3.0 Preview SDK from here.
  • Install the latest preview of Visual Studio 2019 from here.
  • Install ASP.NET Core Blazor Language Services extension from here.

Source Code

Get the source code from GitHub.

Two Interesting Session-Related Vulnerabilities

Sessions are an essential part of most modern web applications. This is why session-related vulnerabilities often have a sizable impact on the overall security of a web application. They frequently allow the impersonation of other users and can have other dangerous side effects.

What Are Session Variables?

For those not familiar with session variables, they are server-side variables whose value is tied to the current session. This means that if a user visits the website, you could store their username in the session variable as they log in and it will be available until the session expires or the user logs out. If another user logs in, that triggers a new session and the session variable will return a different username for that particular user.