Deploy React Applications in a Servlet Environment

Categories:

Modern web applications using React and other frameworks are often distributed as static websites. It is undoubtely the simplest, cache-friendly and dead-cheap solution. However, some enterprisey projects (think about data-entry and legacy business applications) need to be deployed in a constrained environment like a Java JEE Servlet Engine (Tomcat, Jetty, Resin) or a full-fledged Application Server (Weblogic, JBoss / WildFly, Websphere).

Forget having your app deployed on a separate “lightweight” web server like Apache or Nginx, let alone a dedicated 3rd-level domain or IP address like frontend.mylegacyapp.com! These new requirements can easily interfere with the standard toolchain of the so-called React boilerplates, slowing down development and discouraging developers.

In this article we will see a solution that enables frontend developers to:

  • bootstrap applications using create-react-app
  • pack and deploy them in a Servlet Engine, even under a relative context path
  • enable the use of HTML5 History Push API with React Router
  • keep the modification to code base substantially intact

All this while preserving development speed!

Read More →

Soluzione del Cubo di Rubik per principianti

Categories:
La prima volta che ho risolto il Cubo di Rubik sono rimasto incredulo! In passato ci avevo provato in tutti i modi, ma senza ottenere granché. Un bel giorno mi decido: vado su del.icio.us e cerco qualche articolo sull’argomento. Sorpresa: sembra esserci molta gente pronta ad aiutarmi! Fra tutti gli articoli di super-geni che lo risolvono in dieci secondi me ne salta all’occhio uno dal titolo promettente: “Soluzione del Cubo di Rubik per Principianti”, di Jasmine Lee. L’articolo originale si intitola: “Jasmine Lee’s Beginner Solution to the Rubik’s Cube”. Il giorno 4 Aprile 2006 alle ore 11:45 ho risolto per la prima volta il Cubo, da solo e senza sbirciare nelle soluzioni. Fico.

Read More →