dark IntroductionQuick StartRealm Mindset 01. Hello world02. Element Attributes03. Element States04. Element Flow05. Global States06. Data Bindings07. Children Rendering08. Custom Script Flow09. Reusability10. Dynamic Styles11. Events12. Conditional Rendering13. List Rendering14. HTTP Request15. The Dot Notation16. State Mutation17. Finale Server-side RenderingShadow DOM StylingASTRA StackPRO Stack
IntroductionQuick StartRealm Mindset 01. Hello world02. Element Attributes03. Element States04. Element Flow05. Global States06. Data Bindings07. Children Rendering08. Custom Script Flow09. Reusability10. Dynamic Styles11. Events12. Conditional Rendering13. List Rendering14. HTTP Request15. The Dot Notation16. State Mutation17. Finale Server-side RenderingShadow DOM StylingASTRA StackPRO Stack

PHP doesn’t suck anymore. It’s the video title posted by Aaron Francis. You can watch it here. The new feature is really mindblowing. It’s like a JavaScript but in PHP. It’s really cool.

Why PHP?

It is indeed true that PHP is widely used and considered the most popular language for web development, powering approximately 80% of the web. Many websites and applications are built using PHP frameworks such as Laravel and content management systems like WordPress.

One of the advantages of PHP is its ease of setup and deployment. PHP websites can be developed and hosted on inexpensive shared hosting services, eliminating the need for complex DevOps knowledge or Infrastructure as Code practices. Deploying a PHP website often involves simply uploading the files to the server, making it a straightforward and accessible process.

This simplicity in setup and deployment aligns with the goal of shipping products faster. With PHP, developers can focus more on building and iterating their websites or applications, as they can quickly deploy their code without significant infrastructure considerations. This convenience allows for a streamlined development process, enabling faster time-to-market for products.

Realm’s role

One of the advantages of using Realm is that you don’t need to worry about setting up complex tooling, bundlers, or compilers. With Realm, you can directly write client interactivity within your theme or Page Builder if you’re using a CMS like WordPress. This means you can seamlessly integrate interactive elements into your website without the need for additional setup or configuration.

Similarly, if you’re using a framework with Realm, you can write client interactivity within the View or Template. This allows you to easily incorporate dynamic functionality into your web application without the overhead of configuring build tools or dealing with complex dependencies.

By eliminating the need for additional tooling and simplifying the development process, Realm enables you to focus on writing the logic and interactivity directly where it’s needed. This streamlined approach helps you save time and effort, allowing for faster development and easier maintenance of your app or website.

Styling (using OpenProps)

It’s true that many PHP developers have expressed frustration with the complexity of the JavaScript tooling ecosystem. When building websites, they often need to clone boilerplate projects or set up tooling from scratch to bootstrap their apps or websites.

Even frameworks like Tailwind, which are popular for their utility-first CSS approach, still require JavaScript tooling to be set up. This can be a hurdle for PHP developers who prefer a more straightforward workflow.

However, with Open Props, you have the ability to embed CSS variables directly into your Custom Element, eliminating the need to rely heavily on JavaScript tooling. This approach allows you to define and manage CSS variables within the Custom Element itself, providing a more consistent and self-contained solution. This way, PHP developers can work with CSS variables to achieve desired styles without getting entangled in complex JavaScript tooling dependencies.

By using OpenProps, PHP developers can enjoy a simpler and more streamlined development experience, focusing on the core aspects of their websites without worrying about the consistency and complexities of the JavaScript tooling ecosystem.