<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Joshua Parker</title>
    <description>The latest articles on DEV Community by Joshua Parker (@nomadicjosh).</description>
    <link>https://dev.to/nomadicjosh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1165211%2Fb09afdbc-7216-4aef-83e9-9c58a35299d6.jpeg</url>
      <title>DEV Community: Joshua Parker</title>
      <link>https://dev.to/nomadicjosh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nomadicjosh"/>
    <language>en</language>
    <item>
      <title>What Problems Does Devflow CMF Solve for Developers?</title>
      <dc:creator>Joshua Parker</dc:creator>
      <pubDate>Fri, 31 Jan 2025 20:43:40 +0000</pubDate>
      <link>https://dev.to/nomadicjosh/what-problems-does-devflow-cmf-solve-for-developers-5f54</link>
      <guid>https://dev.to/nomadicjosh/what-problems-does-devflow-cmf-solve-for-developers-5f54</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Before the early 2000s when CMSs started competing for market share, websites were built with pure &lt;strong&gt;HTML&lt;/strong&gt;, &lt;strong&gt;CSS&lt;/strong&gt;, and sometimes &lt;strong&gt;Javascript&lt;/strong&gt;. After years of monolithic CMS domination, more and more people are turning to simple static websites. A headless CMS like Devflow CMF gives you that option, unlike a traditional CMS.&lt;/p&gt;

&lt;p&gt;But it begs the question, "Why would a developer ditch an all-in-one traditional CMS and website builder for a headless one?" Well, the answer is quite simple. Investing in a headless CMS like Devflow is investing in your future as a &lt;strong&gt;PHP software developer,&lt;/strong&gt; a &lt;strong&gt;full-stack developer,&lt;/strong&gt; and a &lt;strong&gt;&lt;a href="https://jamstack.org/survey/2022/#whos-doing-the-building" rel="noopener noreferrer"&gt;JAMstack developer&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Devflow CMF can be used to create any website. Websites fall under one of three types:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Informational&lt;/strong&gt; - They are used to educate, entertain, or promote a cause.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Transactional&lt;/strong&gt; - Allows visitors to purchase a product or service.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Interactive&lt;/strong&gt; - Allows users to interact with a website by playing a game, interacting with forums, or leaving a comment.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The most common and easiest of websites to build are informational - which also includes personal websites. These are the types of websites a developer will build for most of their career. Informational websites make up the majority of the web, with some of them having some added interactive or transactional service powered by &lt;a href="https://www.phpbb.com/" rel="noopener noreferrer"&gt;phpBB&lt;/a&gt;, &lt;a href="https://flarum.org/" rel="noopener noreferrer"&gt;Flarum&lt;/a&gt;, &lt;a href="https://www.shopify.com/" rel="noopener noreferrer"&gt;Shopify&lt;/a&gt;, &lt;a href="https://www.etsy.com/" rel="noopener noreferrer"&gt;Etsy&lt;/a&gt;, or some other open source or eCommerce SaaS.&lt;/p&gt;

&lt;p&gt;Informational sites with a traditional setup may work in certain circumstances. But for a bespoke website that needs to scale and grow over time, you need a non-traditional and modern solution without limits.&lt;/p&gt;

&lt;p&gt;Furthermore, content creators can create reusable content to be used in multiple channels and applications. Creating a single source of truth. Change it once in Devflow, and it updates everywhere that pulls content from the API. Publish once; &lt;strong&gt;use anywhere&lt;/strong&gt;. Edit once; &lt;strong&gt;update everywhere&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Issues With No-Code Development
&lt;/h2&gt;

&lt;p&gt;Before we get into the meat of this article, let's first bring up the issue of &lt;strong&gt;no-code development&lt;/strong&gt;. I can't speak for all no-code platforms, but let's use &lt;a href="https://wordpress.org/" rel="noopener noreferrer"&gt;WordPress&lt;/a&gt; - the most popular monolithic CMS - as an example.&lt;/p&gt;

&lt;p&gt;There are several no-code page builders available for WordPress. This lowers the barrier to entry for less technical developers to build a website agency around. But there is one problem. The entire website, including the presentation layer, is &lt;strong&gt;saved in the database&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Who thought this was a good idea? This introduces &lt;strong&gt;bloat&lt;/strong&gt;, &lt;strong&gt;scaling issues&lt;/strong&gt;, and &lt;strong&gt;excessive database connections&lt;/strong&gt; on every page load. Which also drives up costs. With a headless CMS, you have a &lt;strong&gt;separation of concerns&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  No Head
&lt;/h2&gt;

&lt;p&gt;As an alternative to &lt;strong&gt;theme-based development&lt;/strong&gt; - which could make a site look cookie-cutter - a headless CMS allows developers to build &lt;strong&gt;bespoke websites&lt;/strong&gt; for B2B or B2C clients needing their website to convey &lt;strong&gt;professionalism&lt;/strong&gt; and &lt;strong&gt;maturity&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Event Sourcing
&lt;/h2&gt;

&lt;p&gt;This feature speaks more for Devflow than headless in general. As developers, we know that our clients' needs change. Therefore, we need a CMS that can scale and grow over time. In this vein, Devflow offers developers two benefits:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Flexibility for future development&lt;/strong&gt; - Developers can use historical data to build innovative solutions.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Improved testing and debugging&lt;/strong&gt; - Developers can replay domain events in a controlled environment to ascertain problem areas.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Reusable Content
&lt;/h2&gt;

&lt;p&gt;With an &lt;strong&gt;API-first architecture&lt;/strong&gt;, developers can deliver content to websites, mobile apps, and smart devices with a seamless and enhanced user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Customization and Artistic License
&lt;/h2&gt;

&lt;p&gt;With a traditional CMS, the backend and frontend are connected, making it difficult to &lt;strong&gt;scale and customize&lt;/strong&gt;, and introduces a &lt;strong&gt;security&lt;/strong&gt; issue. When using a headless CMS, you have the &lt;strong&gt;artistic freedom&lt;/strong&gt; to build and design &lt;strong&gt;scalable and SEO-rich&lt;/strong&gt; websites. A headless CMS also &lt;strong&gt;fixes the security hole&lt;/strong&gt; by not telling the world what powers your site.&lt;/p&gt;

&lt;p&gt;Don't believe me? Check out &lt;a href="https://whatcms.org/?s=getdevflow.com" rel="noopener noreferrer"&gt;What CMS?&lt;/a&gt; has to say about Devflow's website.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plan for the Future
&lt;/h2&gt;

&lt;p&gt;It is time for PHP developers and web development agencies to &lt;strong&gt;plan for the future&lt;/strong&gt;. The monolithic CMS age will slowly decrease as businesses and startups request headless CMS solutions offering a &lt;strong&gt;seamless digital experience&lt;/strong&gt; across all channels. Even &lt;a href="https://www.gartner.com/en/doc/predicts-2023-composable-applications-accelerate-business-innovation" rel="noopener noreferrer"&gt;Gartner Research&lt;/a&gt; predicts this change, "...businesses will prioritize modular applications that deliver their functionality as API/event-first business components."&lt;/p&gt;

&lt;p&gt;To learn more about Devflow CMF, subscribe to the &lt;a href="https://www.youtube.com/@DevflowCMF" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; channel to receive updates on new tutorials and tips for using Devflow.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>php</category>
      <category>wordpress</category>
      <category>development</category>
    </item>
    <item>
      <title>Devflow CMF vs WordPress: WordPress Alternative</title>
      <dc:creator>Joshua Parker</dc:creator>
      <pubDate>Mon, 20 Jan 2025 15:43:00 +0000</pubDate>
      <link>https://dev.to/nomadicjosh/devflow-cmf-vs-wordpress-wordpress-alternative-197c</link>
      <guid>https://dev.to/nomadicjosh/devflow-cmf-vs-wordpress-wordpress-alternative-197c</guid>
      <description>&lt;p&gt;&lt;a href="https://getdevflow.com/" rel="noopener noreferrer"&gt;Devflow&lt;/a&gt; and &lt;a href="https://wordpress.org/" rel="noopener noreferrer"&gt;WordPress&lt;/a&gt; have quite a few things in common. Both are self-hosted solutions, coded in PHP, and customizable. Devflow also shares a lot of code with WordPress, but it is definitely not a fork. The similarities in the API, event system, and helper functions help lower the barrier to entry.&lt;/p&gt;

&lt;p&gt;Nevertheless, there are key differences that make Devflow stand out as an incredible alternative to WordPress.&lt;/p&gt;

&lt;h2&gt;
  
  
  Framework: Build Bespoke Websites
&lt;/h2&gt;

&lt;p&gt;Devflow is a content management framework that gives developers the autonomy, flexibility, and creativity to build bespoke websites and applications. Devflow is better viewed as a content repository where one builds a firm structure around that content.&lt;/p&gt;

&lt;p&gt;Furthermore, you are not beholden to a Post content type if you don't require a blog. The ubiquitous language for one site may not be the same as another. So instead, you create the &lt;a href="https://docs.getdevflow.com/nav/setup/content-types/" rel="noopener noreferrer"&gt;content types&lt;/a&gt; you need. Even if you develop a blog site, Content Types can act as categories. Developers can customize the admin dashboard which natively is void of widgets and unnecessary content. When utilizing built-in hooks, one can build a &lt;a href="https://docs.getdevflow.com/nav/classes/plugin/#step-1-create-your-plugin-file" rel="noopener noreferrer"&gt;custom dashboard&lt;/a&gt; based on a client's needs.&lt;/p&gt;

&lt;p&gt;Themes and plugins can be installed to extend functionality or add a presentation layer. Otherwise, one can consume the Rest API and choose from the available frontend frameworks to build a presentation layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  DDD, CQRS, Event Sourcing
&lt;/h2&gt;

&lt;p&gt;The top feature of Devflow is that it's built on the &lt;a href="https://codefyphp.com/" rel="noopener noreferrer"&gt;CodefyPHP&lt;/a&gt; framework which is great for architecting domain-driven projects with CQRS, and Event Sourcing. To be fully transparent, a domain-driven architecture is quite complex and overwhelming for some. Nonetheless, if one takes the time to immerse oneself in domain-driven design, there is a significant return on investment with many benefits.&lt;/p&gt;

&lt;p&gt;First, you have revisions built in. Every user, site, content type, or product change in Devflow emits an event and is stored in an event store. A user interface can be built to interact with the events to restore a content type or product to a previous version.&lt;/p&gt;

&lt;p&gt;Second, there is room for more complexity. Have you ever built a website for a client and the project becomes more complex or mission-critical? With Devflow, you can create a product or website that aligns with a business's goal and how it operates.&lt;/p&gt;

&lt;p&gt;Third, Devflow gives you flexibility. When you create a site or product with a modular design, it becomes easier to upgrade, modify, and modernize, extending its lifecycle. It's the gift that keeps on giving for years to come.&lt;/p&gt;

&lt;h2&gt;
  
  
  Page Builder
&lt;/h2&gt;

&lt;p&gt;Unlike the other popular content management systems, a no-code page builder is not included. However, you can easily integrate &lt;a href="https://www.phpagebuilder.com/" rel="noopener noreferrer"&gt;PHPagebuilder&lt;/a&gt; into Devflow. PHPagebuilder is a framework-agnostic drag-and-drop page builder that also allows for customization and the creation of blocks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Built for PHP Developers
&lt;/h2&gt;

&lt;p&gt;Unlike WordPress, Devflow was built for PHP developers. No need to hack it into a CMS, instead you turn it into the CMS you want or need.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Other notable benefits of using Devflow:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Interoperability&lt;/li&gt;
&lt;li&gt;  Rapid Application Development&lt;/li&gt;
&lt;li&gt;  Increased network efficiency and scalability&lt;/li&gt;
&lt;li&gt;  NIST Level 2 Standard for improved data security&lt;/li&gt;
&lt;li&gt;  Content flexibility&lt;/li&gt;
&lt;li&gt;  Automate repetitive tasks&lt;/li&gt;
&lt;li&gt;  Extend or modify functionality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.techradar.com/news/wordpress-now-powers-40-of-the-worlds-websites" rel="noopener noreferrer"&gt;WordPress powers at least 40%&lt;/a&gt; of the world's websites. It is the most popular open source CMS, following Drupal and Joomla. Moreover, it has a longstanding legacy, but if you need something that offers freedom and flexibility, I encourage you to try &lt;a href="https://github.com/getdevflow/cmf" rel="noopener noreferrer"&gt;Devflow&lt;/a&gt; today.&lt;/p&gt;

&lt;p&gt;Devflow CMF equals freedom. Freedom to customize, freedom to build a custom CMS for clients, and the freedom to use any frontend framework.&lt;/p&gt;

</description>
      <category>php</category>
      <category>webdev</category>
      <category>wordpress</category>
      <category>eventdriven</category>
    </item>
    <item>
      <title>An Introduction to CodefyPHP: A Domain-Driven Framework</title>
      <dc:creator>Joshua Parker</dc:creator>
      <pubDate>Mon, 02 Oct 2023 18:50:17 +0000</pubDate>
      <link>https://dev.to/nomadicjosh/an-introduction-to-codefyphp-a-domain-driven-framework-gf9</link>
      <guid>https://dev.to/nomadicjosh/an-introduction-to-codefyphp-a-domain-driven-framework-gf9</guid>
      <description>&lt;p&gt;&lt;em&gt;A PHP Domain-Driven Framework for building complex applications with CQRS and Event Sourcing&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is CodefyPHP?
&lt;/h2&gt;

&lt;p&gt;You might not have heard of a new framework that was released a few weeks ago called CodefyPHP. The framework was created specifically for one of my legacy projects that needs refactoring and would benefit from Domain-Driven Design. I released it to the world in the hope that others may find it beneficial as well.&lt;/p&gt;

&lt;p&gt;As with any new library and project, naming things is always the most difficult. But when trying to think of a name, I wanted it to be meaningful and representative of its goal and mission. Therefore, I came up with CodefyPHP.&lt;/p&gt;

&lt;p&gt;The name Codefy is a derivative of the word &lt;code&gt;codify&lt;/code&gt; which means to arrange into a systematic code according to a plan or system. This is the purpose of CodefyPHP as it pertains to Domain-Driven Design, ubiquitous language and complex applications.&lt;/p&gt;

&lt;p&gt;Codefy is not a full-stack framework such as the likes of Symfony, Codeigniter, Yii2, FuelPHP, or Laravel. Nevertheless, it contains components such as routing, database migrations, multiple PSR implementations, and templating. All the things you need to start building a project.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Purpose of CodefyPHP
&lt;/h2&gt;

&lt;p&gt;The philosophy of Codefy is that code should be systematized, maintainable, and follow OOP (Object-Oriented Programming). CodefyPHP tries not to be too opinionated, yet encourages best practices and coding standards by following &lt;a href="https://github.com/QubusPHP/qubus-coding-standard" rel="noopener noreferrer"&gt;Qubus Coding Standards&lt;/a&gt;. Nevertheless, you can use Codefy as you see fit. You can tap into all, some or none of the features and instead use the interfaces to build your implementations for a domain-driven project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Highlighted Features
&lt;/h2&gt;

&lt;p&gt;CodefyPHP has several noted features outside of the domain-driven scope. Let's take a look at some of them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Codex CLI
&lt;/h3&gt;

&lt;p&gt;When you use the &lt;a href="https://github.com/codefyphp/skeleton" rel="noopener noreferrer"&gt;skeleton package&lt;/a&gt;, you have access to Codex which allows you to generate migrations, controllers, middleware, service providers, start the dev server and more.&lt;/p&gt;

&lt;p&gt;Here are some example commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;❯ php codex serve //This &lt;span class="nb"&gt;command &lt;/span&gt;starts the dev server

❯ php codex stub:make Users_controller //Creates UsersController

❯ php codex password:hash &lt;span class="s1"&gt;'jsx82kjsks9273js'&lt;/span&gt;
Your hashed password is: &lt;span class="nv"&gt;$2y$10$4A3iA5z&lt;/span&gt;.qyi6DZ5bibKXUujbqYdjH.QjpbO/lUDR9dalaN1IbEZtm 

❯ php codex ddd:ulid //Generates a random Ulid string
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Database Migrations
&lt;/h3&gt;

&lt;p&gt;Placing your database under version control is easy with CodefyPHP's database migrations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;❯ php codex migrate:generate CreateUsersTable
+f ./database/migrations/20230908035134_CreateUsersTable.php

❯ php codex migrate:status
+--------+------------------+-----------------------+                                                                                                                 
| Status | Migration ID     | Migration Name        |
+--------+------------------+-----------------------+
| down   |  20230908035134  | CreateUsersTable   |
+--------+------------------+-----------------------+

❯ php codex migrate
 &lt;span class="o"&gt;==&lt;/span&gt; 20230908035134 CreateUsersTable migrating
 &lt;span class="o"&gt;==&lt;/span&gt; 20230908035134 CreateUsersTable migrated 0.0090s

❯ php codex migrate:status
+--------+------------------+-----------------------+                                                                                                                  
| Status | Migration ID     | Migration Name        |
+--------+------------------+-----------------------+
| up     |  20230908035134  | CreateUsersTable   |
+--------+------------------+-----------------------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Example from migration file&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;up&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;hasTable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;table&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'users'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;table&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'users'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;callback&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;CreateTable&lt;/span&gt; &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'user_id'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;36&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                        &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;primary&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                        &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;unique&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'userId'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
                    &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'first_name'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;191&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
                    &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'last_name'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;191&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
                    &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'email'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;191&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                        &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;unique&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'email'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                        &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;notNull&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
                &lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Dual Templating Engines
&lt;/h3&gt;

&lt;p&gt;CodefyPHP comes with dual templating engines. The templating engine is called Scaffold, and there is a native engine and compiler engine. The native engine can be used if you are a PHP purist and only want to write PHP code. Here is an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="k"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'main::layout'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;block&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'content'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$params&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;article&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;header&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;?=&lt;/span&gt;&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;esc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nb"&gt;ucfirst&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$params&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'title'&lt;/span&gt;&lt;span class="p"&gt;]));&lt;/span&gt;&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;main&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt; &lt;span class="k"&gt;foreach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$params&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'paragraphs'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;$paragraph&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;
                &lt;span class="cp"&gt;&amp;lt;?=&lt;/span&gt;&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;esc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$paragraph&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt; &lt;span class="k"&gt;endforeach&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/main&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt; &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;



&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;?=&lt;/span&gt;&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;esc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$title&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;&amp;lt;?=&lt;/span&gt;&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;block&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'content'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The compiler engine is similar to that of Twig and Blade. Nevertheless, the framework includes adapters for a few other templating engines as well.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test-Driven Development (TDD)
&lt;/h3&gt;

&lt;p&gt;When you create a new project with the app starter (skeleton), it will include PestPHP which is great for test-driven development. One of the main advantages of TDD is the high test coverage by writing the tests for each feature before the implementation. While coding your implementation, you run your tests until all of them pass. It is a slow but rewarding process.&lt;/p&gt;

&lt;p&gt;Along with the ones previously mentioned, a few other highlighted features are the dual query builders, sanitizing helpers, injector for bootstrapping, routing engine, and adapters for cookies, sessions and cache storage.&lt;/p&gt;

&lt;h2&gt;
  
  
  In Conclusion
&lt;/h2&gt;

&lt;p&gt;But what if you are not interested in the &lt;a href="https://github.com/codefyphp/codefy" rel="noopener noreferrer"&gt;framework&lt;/a&gt;, but the domain-driven stuff is all you need? Well, the framework is built on what's called the &lt;a href="https://github.com/codefyphp/domain-driven-core" rel="noopener noreferrer"&gt;domain-driven core&lt;/a&gt;. The Domain-Driven Core includes the abstractions and interfaces you can use to build your domain-driven project without the dependencies found in the framework, and it includes a lot of tests you can check out. You can even integrate it into your Laravel, Symfony, or Codeigniter project.&lt;/p&gt;

&lt;p&gt;If you are a PHP developer who loves Domain-Driven Design and Test-Driven Development as much as I do, then head on over to the project's &lt;a href="https://github.com/codefyphp" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; page. After such a short time, it already has 7 stars.&lt;/p&gt;

</description>
      <category>php</category>
      <category>eventdriven</category>
    </item>
  </channel>
</rss>
