Pros and Cons of PHP and Classic Asp

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • Sentry

    Developer-first error tracking and performance monitoring

  • construct that HTML document with JavaScript and after that hand it over to the browser. This can be experienced as a slight delay on the first page load.

    Old code bases can always have the problem of being badly maintained and non-existing coding convention, no proper error reporting and stuck on an old language version. But you can mitigate that by using a good error reporting tool like Sentry (https://sentry.io/) or similar. When adding new views you could use a micro framework for those new views only and keep the old code as is, Slim framework could be an option for that.

    I work with PHP professionally I always opt for server side rendering, it is faster to develop and easier to maintain. Main reason for that is that you already have all data available server side. When doing client side all that data needs to be exposed in an API that you need to design, write and maintain. Things has a tendency to be duplicated on both the server and the client. Many underestimate this cost.

    When I need some dynamic updates of a component on the page I use JavaScript to solve that specific case only, not the entire page. To minimize what the JavaScript needs to do (fetch new data, render it to HTML and the put it on the page) it is better to deliver it as HTML fragment from the API endpoint directly rather than JSON, you avoid unnecessary JSON encode/decode step by doing that and you can just take the HTML fragment from the ajax call and insert it onto the page. By doing it like this you can reuse the same backend components when rendering the entire page or just a part of a page. It just how they are delivered to the page that differs. There is even a JavaScript library that can do all that work fetch and swap for you https://htmx.org/

    With the htmx library you could also use that for page navigating on the site too if you want it more fluid.

  • htmx

    </> htmx - high power tools for HTML

  • construct that HTML document with JavaScript and after that hand it over to the browser. This can be experienced as a slight delay on the first page load.

    Old code bases can always have the problem of being badly maintained and non-existing coding convention, no proper error reporting and stuck on an old language version. But you can mitigate that by using a good error reporting tool like Sentry (https://sentry.io/) or similar. When adding new views you could use a micro framework for those new views only and keep the old code as is, Slim framework could be an option for that.

    I work with PHP professionally I always opt for server side rendering, it is faster to develop and easier to maintain. Main reason for that is that you already have all data available server side. When doing client side all that data needs to be exposed in an API that you need to design, write and maintain. Things has a tendency to be duplicated on both the server and the client. Many underestimate this cost.

    When I need some dynamic updates of a component on the page I use JavaScript to solve that specific case only, not the entire page. To minimize what the JavaScript needs to do (fetch new data, render it to HTML and the put it on the page) it is better to deliver it as HTML fragment from the API endpoint directly rather than JSON, you avoid unnecessary JSON encode/decode step by doing that and you can just take the HTML fragment from the ajax call and insert it onto the page. By doing it like this you can reuse the same backend components when rendering the entire page or just a part of a page. It just how they are delivered to the page that differs. There is even a JavaScript library that can do all that work fetch and swap for you https://htmx.org/

    With the htmx library you could also use that for page navigating on the site too if you want it more fluid.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts