Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 38 additions & 27 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Framework X</title>
<title>Framework X – Simple and fast PHP micro framework. Async made easy.</title>

<meta property="og:url" content="https://framework-x.org/" />
<meta property="og:title" content="Framework X" />
<meta property="og:description" content="Simple and fast PHP micro framework. Async made easy." />
<meta property="og:image" content="https://framework-x.org/src/og-image.png" />
<meta property="og:type" content="article" />
<meta name="twitter:title" content="Framework X" />
<meta name="twitter:site" content="@x_framework" />
<meta name="twitter:creator" content="@x_framework" />
<meta name="twitter:card" content="summary_large_image" />
<meta property="description" content="Simple and fast PHP micro framework. Async made easy." />

<link
href="https://unpkg.com/tailwindcss/dist/tailwind.min.css"
Expand Down Expand Up @@ -66,16 +77,13 @@
<div class="lg:grid lg:grid-cols-12 lg:gap-8">
<div class="px-4 sm:px-6 sm:text-center md:max-w-2xl md:mx-auto lg:col-span-6 lg:text-left lg:flex lg:items-center">
<div>
<a href="#cooperation" class="inline-flex items-center text-white bg-black rounded-full p-1 pr-2 sm:text-base lg:text-sm xl:text-base hover:text-gray-200">
<span class="px-3 py-0.5 text-white text-xs font-semibold leading-5 uppercase tracking-wide bg-indigo-500 rounded-full">Cooperations welcome</span>
<span class="ml-4 text-sm">Let’s work together</span>
<svg class="ml-2 w-5 h-5 text-gray-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
</svg>
</a>
<span class="inline-flex items-center text-white bg-black rounded-full p-1 pr-3 sm:text-base lg:text-sm xl:text-base">
<span class="px-3 py-0.5 text-white text-xs font-semibold leading-5 uppercase tracking-wide bg-indigo-500 rounded-full cursor-help" title="Framework X is ready for PHP 8.1, but also supports PHP 7.1+ with no extensions required">PHP 8.1 ready</span>
<span class="ml-4 text-sm">Be among the first to take advantage of async fibers!</span>
</span>
<h1 class="mt-4 text-4xl tracking-tight font-extrabold text-white sm:mt-5 sm:leading-none lg:mt-6 lg:text-5xl xl:text-6xl">
<span class="md:block">Framework X</span>
<span class="text-indigo-400 md:block">react all the things</span>
<span class="text-indigo-400 md:block">async made easy</span>
</h1>
<p class="mt-3 text-base text-gray-300 sm:mt-5 sm:text-xl lg:text-lg xl:text-xl">
The simple and fast micro framework for building reactive web applications with PHP.
Expand Down Expand Up @@ -160,7 +168,8 @@ <h2 class="text-base font-semibold tracking-wider text-indigo-600 uppercase">Too

<p class="mt-12 max-w-prose mx-auto text-xl text-gray-500">
But that’s not all!
We are currently working on the documentation with all the details to give you a deep understanding of how everything works and how to build most common use-cases.
Take a look at <a href="docs/" class="text-indigo-800 hover:underline">our documentation</a>
to get a deep understanding of how everything works and how to build most common use-cases.
</p>
</div>
</section>
Expand Down Expand Up @@ -438,7 +447,8 @@ <h3 class="text-2xl font-extrabold text-gray-900 tracking-tight sm:text-3xl">
</h3>
<p class="mt-3 text-lg text-gray-500">
Thanks to async programming, Framework X allows you to do multiple things at once.
On top of this, its built-in web server also utilizes the async execution model to process multiple incoming connections at once.
On top of this, its built-in web server also utilizes the async execution model to process multiple incoming connections at once.
We support fibers, coroutines, and promises. Your choice!
</p>

<dl class="mt-10 space-y-10">
Expand Down Expand Up @@ -511,21 +521,21 @@ <h3 class="text-2xl font-extrabold text-gray-900 tracking-tight sm:text-3xl">
</div>
</div>

<pre class="text-left mt-12 col-span-full shadow-2xl"><code class="php rounded-md">$app->get('/book/{id:\d+}', function (Psr\Http\Message\ServerRequestInterface $request) use ($db, $twig) {
return $db->query(
'SELECT * FROM books WHERE ID=?',
[$request->getAttribute('id')]
)->then(function (array $row) use ($twig) {
$html = $twig->render('book.twig', $row);

return new React\Http\Message\Response(
200,
[
'Content-Type' => 'text/html; charset=utf-8'
],
$html
);
});
<pre class="text-left mt-12 col-span-full shadow-2xl"><code class="php rounded-md">$app->get('/book/{isbn}', function (Psr\Http\Message\ServerRequestInterface $request) use ($db) {
$isbn = $request->getAttribute('isbn');
$result = await($db->query(
'SELECT title FROM book WHERE isbn = ?',
[$isbn]
));

assert($result instanceof React\MySQL\QueryResult);
$data = $result->resultRows[0]['title'];

return new React\Http\Message\Response(
200,
[],
$data
);
});
</code></pre>
</section>
Expand Down Expand Up @@ -637,6 +647,7 @@ <h3 class="text-2xl font-extrabold text-gray-900 tracking-tight sm:text-3xl">
<p class="mt-3 text-lg text-gray-500">
Framework X is scalable from the ground up.
We provide a simple API that is easy to get started with for the smallest of projects, yet allow to grow to complex, production-ready setups.
We're ready for PHP 8.1, but also support PHP 7.1+ with no extensions required!
</p>

<dl class="mt-10 space-y-10">
Expand All @@ -654,7 +665,7 @@ <h3 class="text-2xl font-extrabold text-gray-900 tracking-tight sm:text-3xl">
Support running behind existing PHP stacks
</dt>
<dd class="mt-2 text-base text-gray-500">
We support running behind existing PHP stacks using Apache, nginx or any other web server using CGI/FastCGI.
We support running behind existing PHP stacks using Apache, nginx or any other web server using CGI / FastCGI (PHP-FPM).
This means you can create a simple web application in minutes and run it anywhere from shared hosting to your own clustered server setup in the clouds.
</dd>
</div>
Expand Down
Binary file added src/og-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.