Registering Custom Post Types in the WordPress Admin: Our CloudFest Hackathon Report

With WordPress today you need to use custom code or a plugin to create a custom post type like “Book” or “Member.” This is a popular need, and there are a variety of approaches; however, one challenge is that the end-user experience can be confusing and non-standardized.

A few weeks ago, some Automatticians and I went to the 7th CloudFest Hackathon in Rust, Germany to explore a solution for this. We started hacking on a deeply nerdy project, JSON Schema forms and fields, and ended up with a fascinating approach to an age-old question: What if you could register custom post types and custom fields directly in the WordPress admin?

Forty-eight hours turns an idea into reality

The CloudFest Hackathon is an event that allows developers from around the globe to take ideas and turn them into realities.

During the Hackathon, teams of developers from various content management systems and hosting companies come together to contribute to projects that align with the core principles of the event: the projects must be not-for-profit, interoperable, and open source.

Last year, we worked on a project that allowed us to embed WordPress directly in VS Code. We built the WordPress Playground VS Code extension on top of WordPress Playground. It uses WebAssembly to run WordPress entirely within the browser, and it turned out pretty darn slick. 

This year, we focused on a JSON Schema Field/Form Renderer. While most of us explored using JSON Schema to dynamically register admin forms and fields, Dennis Snell and Adam Zieliński decided to take the project one step further! They hacked together a plugin that introduced the ability to register custom post types and custom fields directly from the WordPress admin. More notably, everything happens within the block editor—you have to see it to believe it:

This work poses some interesting possibilities for custom post type and custom field implementation because it could fundamentally change the way low- to no-code WordPress users modify their sites.

Naturally, I took the idea to Twitter/X:

Should WordPress let you register custom post types and custom fields from the admin? #CFHack2024— daniel (@dbchhbr) March 17, 2024

I got quite a range of responses, ranging from “Heck Yes! It should have already been a core feature now. Such an integral part of every other site” to “Admin should only be for content and user management. Everything else should be configured in code and version controllable.”

So why the range in responses? Let’s discuss.

It turned out to be pretty simple

Dennis and Adam built our prototype using the following conventions:

A custom post type wp_data_type holds templates for user-defined data types.

The title of a post in the wp_data_type defines the name of the new data type. The post itself is the rendering template and comprises any set of normal blocks. Names are given to select block attributes within the post, and these names are mapped into the data type.

When creating new posts for the given data type, the locked template is copied from the wp_data_type template, and the block attribute annotations are preserved.

Finally, when rendering the wp_data_type template, the attributes are pulled from the individual post of the given data type and spliced into the template.

The fascinating idea is that we don’t have to think about form fields; blocks already provide a rendering view and a modal editing experience. We can rely on the fundamental way blocks work and use the very same user experience to create custom data types in a way that users are already familiar with when editing a post or a site.

We can provide JSON-LD markup properties to the block editor using our Custom Fields Names block settings.

Custom post types define custom data types, so we use a template to not only define the data type, but also to provide a default rendering template. Each data attribute within a post type has a field where it’s possible to define that field with its JSON-LD property. 

For example, say you had a “Book” custom post type. A few JSON-LD properties you could define using custom fields are:

description

copyrightYear

author

bookEdition

bookFormat

isbn

numberOfPages

We also chose to store a copy of each block attribute in the JSON attributes for that block. Since WordPress can now provide a post-to-JSON function, which merges the extracted attributes with the names assigned in the custom post type template, that template may have changed since the custom post was created. This means that no database migrations are necessary to render an updated version of a post.

The best part? The WordPress infrastructure that already exists (aka Gutenberg!) defines the data type. Because these custom posts are normal posts, and because they adopt the locked template for the data type definition, they are, in fact, renderable on their own! Even if the template has been updated and only the post itself is rendered, it will still display a meaningful representation of the data type as it was when it was created.

While our original Hackathon project was tailored towards developers and UX designers who would love to see a forms and fields API in WordPress, this prototype puts more power in the hands of low- to no-code WordPress users.

It also opens up a world of possibilities for providing a rendering view for any structured data. Imagine uploading a CSV and mapping the column names to block attributes, or connecting to a database or JSON API to map the records in the same way. 

For example, if you had a CSV with business names, addresses, a rating, and a description, we could take that template post and insert a map block, a heading block, a star rating block, and a paragraph block and set the attributes to map to the CSV columns. It’s essentially an instant structured data renderer!

But even if we can define custom post types and fields in the editor, should we, as a WordPress community, consider adding it to core?

The existential question: Should it exist?

Adding this kind of functionality into WordPress core could open up a ton of opportunities for the average WordPress user. Instead of needing to get a developer involved to add a custom post type to their site, a user could simply do it themselves and define the necessary fields and structured data attributes. 

On the other hand, allowing everyday users, who may not have a full grasp of how custom post types and structured data should work, free reign to create these data types themselves could have detrimental effects on the user experience of their websites. Clunky or incorrect implementation of structured data markup could also cause issues with how search engines crawl these sites, causing unintended negative impacts to search traffic.

Not only that, but as of right now, if a custom post type is accidentally deleted, all of the content posted to that custom post type will no longer be accessible through the admin (even though it will still be stored in the database). The user could think they “lost” their data.

Let’s talk about it

What do you think? Are you in favor of giving website owners the ability to change and customize their custom post types and attributes? Or are there some website features that should always require a more technical hand and implementer? 

We’d love to chat with you about your thoughts in the comments below.

For another interesting exploration on a related idea, check out this discussion on GitHub with the core team.

Thanks to Lars Gersmann for leading the JSON Schema project with me and to everyone on the Syntax Errors team: Adam Zieliński, Dennis Snell, Julian Haupt, Michael Schmitz, Anja Lang, Thomas Rose, Marko Feldmann, Fabian Genes, Michael Schmitz, Jan Vogt, Lucisu, Maximilian Andre, Marcel Schmitz, and Milana Cap.
Quelle: RedHat Stack

Azure high-performance computing leads to developing amazing products at Microsoft Surface

This blog was written in collaboration with the Microsoft Surface and Azure team. It describes how we used Azure high-performance computing (HPC) to save time, costs, and revolutionized our product design piece of manufacturing our Microsoft Surface products.

The Microsoft Surface organization exists to create iconic end-to-end experiences across hardware, software, and services that people love to use every day. We believe that products are a reflection of the people who build them, and that the right tools and infrastructure can complement the talent and passion of designers and engineers to deliver innovative products. Product level simulation models are routinely used in day-to-day decision making on design, reliability, and product features. The organization is also on a multi-year journey to deliver differentiated products in a highly efficient manner. Microsoft Azure HPC plays a vital role in enabling this vision. Below is an account of how we were able to do more with less by leveraging the power of simulation and Azure HPC. 

Surface devices development on Microsoft Azure 

I’m a Principal Engineer at Microsoft and a structural analyst. I’ve been a heavy user of Azure HPC and an early adopter of Azure A8 and A9 virtual machines. In 2015, with the help of our Surface IT team, we deployed and solved many issues with Abaqus (a Finite Element Analysis (FEA) software) implementation in Azure HPC. By 2016, product level structural simulations for Surface Pro 4 and the original Surface laptop had fully migrated to Azure HPC from on-premises servers. Large models with millions of degrees of freedom became routine and easily solved on Azure HPC. This early use of simulations enabled problem solving for design engineers tasked with robustness and reliability metrics. Usage grew along with product line growth. Along with my colleagues Pritul Shah, Senior Director of a cross product engineering team, and Jarkko Sihvonen, Senior Engineer of the IT Infrastructure and Services team, we collaborated to scale up structural simulation footprint in our organization. The vision to build a global simulation team meant access to computing servers in Western North America and Southeast Asia which was easily deployed by the Surface IT and Azure HPC teams. 

Product development: Surface laptop  

The availability of Azure HPC for structural simulations using Abaqus helped make this a primary development tool for product design. Design concepts created in digital computer-aided design (CAD) systems are translated into FEA model in detail. These are true digital prototypes and constitute all major subsystems in the device. The analyst can use FEA models to impose different test and reliability conditions in a virtual environment and determine feasibility. In a few days, hundreds of simulations are executed to evaluate various design ideas and solutions to make the device robust. Subsequently, the selected design becomes a protype and then subject to rigorous testing for real-world use conditions. There are multiple feedback loops built into our engineering process to compare actual tests and FEA results for model validation.  

In the first graphics depicted above, a digital prototype (FEA model) laptop device is set-up to drop on its corner to the floor. This models the real-world physical testing that is conducted in our Reliability Engineering labs. The impact velocity for a given height is the initial condition for the dynamic simulation. The dynamic drop simulation is executed on hundreds of cores of an Azure HPC cluster using Abaqus solver. We used the Abaqus and Explicit solver which is known for its robust and accurate solution for high-speed, nonlinear, dynamic events such as consumer electronics drop testing and automotive crashworthiness. These solvers are optimized especially for Azure HPC clusters and enable scaling to thousands of cores for fast throughputs. The simulation jobs complete in a matter of a few hours on these optimized Azure HPC servers instead of the days it used to take previously. The results are reviewed by the analysts and stress levels are checked against material limits. Design teams and analysts then review the reports and make design updates. This cycle continues in very quick loops as the Azure HPC servers enable fast turnaround for reviews.  

The second graphic depicts an example of the hinge in the device that was optimized for strength. The team was able to visualize the impact induced motion and stress levels of the hinge internal parts from the simulation. This enabled us to isolate the main issue and make the right design improvements. This insight helped redesign the hinge assembly to cause lower stress levels. Significant time was saved in the design process as only one iteration was needed for success. Tooling, physical prototyping, and testing costs were also saved. 

Presently, the entire Microsoft Surface product line utilizes this approach of validating design with digital prototypes (FEA models) run on Azure HPC clusters. Thousands of simulation jobs are executed routinely in a matter of weeks to enable cutting-edge designs that have very high reliability and customer satisfaction. 

What’s next 

The team is now focused on deploying more scalable simulation and Azure HPC resource for multi-disciplinary teams and for multi-physics modeling. There is a huge opportunity to enable machine learning and AI in product creation. Azure HPC and the partnerships within Microsoft organizations will be leveraged to drive large scale innovations at a rapid speed. We are also continuing this digital transformation journey with model based systems engineering (MBSE) with the V4 Institute. World-class organizations looking to do more with less and on a quest for scaling digital simulations will greatly benefit from collaborating with Azure.  

Learn More 

Learn more about Azure HPC.

Get the latest Azure HPC content.

Find out how Microsoft Cloud for Manufacturing can help you embrace new design and manufacturing paradigms. 

Azure high-performance computing

Unlock your innovation

Discover solutions

The post Azure high-performance computing leads to developing amazing products at Microsoft Surface appeared first on Azure Blog.
Quelle: Azure

AI study guide: The no-cost tools from Microsoft to jump start your generative AI journey

The world of AI is constantly changing. Every day it seems there are new ways we can work with generative AI and large language models. It can be hard to know where to start your own learning journey when it comes to AI. Microsoft has put together several resources to help you get started. Whether you are ready to build your own copilot or you’re at the very beginning of your learning journey, read on to find the best and free resources from Microsoft on generative AI training.

Let’s go!

Azure AI

Build intelligent apps at enterprise scale with the Azure AI portfolio

Lean more

Azure AI fundamentals

If you’re just starting out in the world of AI, I highly recommend Microsoft’s Azure AI Fundamentals course. It includes hands on exercises, covers Azure AI Services, and dives into the world of generative AI. You can either take the full course in one sitting or break it up and complete a few modules a day.

Learning path: Azure AI fundamentals

Course highlight: Fundamentals of generative AI module

Azure AI engineer

For those who are more advanced in AI knowledge, or are perhaps software engineers, this learning path is for you. This path will guide you through building AI infused applications that leverage Azure AI Services, Azure AI Search, and Open AI.

Course highlight: Get started with Azure OpenAI Service module

Let’s get building with Azure AI Studio

Imagine a collaborative workshop where you can build AI apps, test pre-trained models, and deploy your creations to the cloud, all without getting lost in mountains of code. In our newest learning path, you will learn how to build generative AI applications like custom copilots that use language models to provide value to your users.

Learning path: Create custom copilots with Azure AI Studio (preview)

Course highlight: Build a RAG-based copilot solution with your own data using Azure AI Studio (preview) module

Dive deep into generative AI with Azure OpenAI Service

If you have some familiarity with Azure and experience programming with C# or Python, you can dive right into the Microsoft comprehensive generative AI training.

Learning path: Develop generative AI solutions with Azure OpenAI Service

Course highlight: Implement Retrieval Augmented Generation (RAG) with Azure OpenAI Service module

Cloud Skills Challenges

Microsoft Azure’s Cloud Skills Challenges are free and interactive events that provide access to our tailored skilling resources for specific solution areas. Each 30-day accelerated learning experience helps users get trained in Microsoft AI. The program offers learning modules, virtual training days, and even a virtual leaderboard to compete head-to-head with your peers in the industry. Learn more about Cloud Skills Challenges here, then check out these challenges to put your AI skills to the test.

Invest in App Innovation to Stay Ahead of the Curve

Learn more

Challenges 1-3 will help you prepare for Microsoft AI Applied Skills, scenario-based credentials. Challenges 4 and 5 will help you prepare for Microsoft Azure AI Certifications, with the potential of a 50% exam discount on your certification of choice1.

Challenge #1: Generative AI with Azure OpenAI

In about 18 hours, you’ll learn how to train models to generate original content based on natural language input. You should already have familiarity with Azure and experience programming with C# or Python. Begin now!

Challenge #2: Azure AI Language

Build a natural language processing solution with Azure AI Language. In about 20 hours, you’ll learn how to use language models to interpret the semantic meaning of written or spoken language. You should already have familiarity with the Azure portal and experience programming with C# or Python. Begin now!

Challenge #3: Azure AI Document Intelligence

Show off your smarts with Azure AI Document Intelligence Solutions. In about 21 hours, you’ll learn how to use natural language processing (NLP) solutions to interpret the meaning of written or spoken language. You should already have familiarity with the Azure portal and C# or Python programming. Begin now!

Challenge #4: Azure AI Fundamentals

Build a robust understanding of machine learning and AI principles, covering computer vision, natural language processing, and conversational AI. Tailored for both technical and non-technical backgrounds, this learning adventure guides you through creating no-code predictive models, delving into conversational AI, and more—all in just about 10 hours.

Complete the challenge within 30 days and you’ll be eligible for 50% off the cost of a Microsoft Certification exam. Earning your Azure AI Fundamentals certification can supply the foundation you need to build your career and demonstrate your knowledge of common AI and machine learning workloads—and what Azure services can solve for them. Begin now!

Challenge #5: Azure AI Engineer

Go beyond theory to build the future. This challenge equips you with practical skills for managing and leveraging Microsoft Azure’s Cognitive Services. Learn everything from secure resource provisioning to real-time performance monitoring. You’ll be crafting cutting-edge AI solutions in no time, all while preparing for Exam AI-102 and your Azure AI Engineer Associate certification. Dive into interactive tutorials, hands-on labs, and real-world scenarios. Complete the challenge within 30 days and you’ll be eligible for 50% off the cost of a Microsoft Certification exam2. Begin now!

Finally, our free Microsoft AI Virtual Training Days are a great way to immerse yourself in free one or two-day training sessions. We have three great options for Azure AI training:

Azure AI Fundamentals

Generative AI Fundamentals

Building Generative Apps with Azure OpenAI Service

Start your AI learning today

For any and all AI-related learning opportunities, check out the Microsoft Learn AI Hub including tailored AI training guidance. You can also follow our Azure AI and Machine Learning Tech Community Blogs for monthly study guides.

Microsoft Cloud Skills Challenge | 30 Days to Learn It – Official Rules

https://developer.microsoft.com/en-us/offers/30-days-to-learn-it/official-rules#terms-and-conditions

The post AI study guide: The no-cost tools from Microsoft to jump start your generative AI journey appeared first on Azure Blog.
Quelle: Azure

ElastiCache Serverless ist jetzt in der AWS-Region Kanada West (Calgary) verfügbar

Heute kündigt AWS die Verfügbarkeit von Amazon ElastiCache Serverless in der Region AWS Kanada West (Calgary) an. ElastiCache Serverless vereinfacht das Cache-Management und lässt sich skalieren, um die anspruchsvollsten Anwendungen zu unterstützen. Mit ElastiCache Serverless können Sie in weniger als einer Minute einen hochverfügbaren und skalierbaren Cache erstellen, sodass Sie die Cache-Cluster-Kapazität nicht mehr planen, bereitstellen und verwalten müssen. ElastiCache Serverless speichert Daten automatisch redundant über mehrere Availability Zones (AZs) und bietet ein Service Level Agreement (SLA) für eine Verfügbarkeit von 99,99 %. Mit ElastiCache Serverless zahlen Sie für die von Ihrer Workload gespeicherten Daten und Rechenleistung, ohne Vorabverpflichtungen oder zusätzliche Kosten.
Quelle: aws.amazon.com

Amazon SageMaker Studio Code Editor unterstützt jetzt benutzerdefinierte Images

Ab heute können ML-Teams (Machine Learning) benutzerdefinierte IDE-Images verwenden – mithilfe des Code Editors, unserer integrierten Entwicklungsumgebung (IDE) von SageMaker Studio, die auf Code-OSS (VS Code Open Source) basiert. Mit dieser neuen Funktion können Sie die Produktivität Ihres ML-Entwicklungsteams steigern, indem Sie ihm maßgeschneiderte Entwicklungsumgebungen zur Verfügung stellen, die die benötigten Frameworks, Bibliotheken und IDE-Erweiterungen bieten, sodass sie schneller mit dem Programmieren beginnen können.
Quelle: aws.amazon.com