Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Matthew Weier O'Phinney:
Programmatic Expressive
May 17, 2016 @ 16:45:34

In this new post to his site Matthew Weier O'Phinney looks at a common misconception there seems to be for people using the Expressive framework from Zend - that their applications should be entirely configuration-driven.

Enrico just returned from phpDay, where he spoke about Expressive and the upcoming Zend Framework 3. One piece of feedback he brought back had to do with how people perceive they should be building Expressive applications: many think, based on our examples, that it's completely configuration driven!

As it turns out, this is far from the truth; we developed our API to mimic that of traditional microframeworks, and then built a configuration layer on top of that to allow making substitutions. However, it's not only possible, but quite fun, to mix and match the two ideas!

Matthew goes on to share an experiment he tried using his own code to "tweak" things away from being configuration-driven to a more programmatic approach. He shares a few tips to remember when trying the same with your application too. The post ends with an example of this migration and some of the benefits/issues that could come from the change.

tagged: programmatic expressive framework configuration migrate example

Link: https://mwop.net/blog/2016-05-16-programmatic-expressive.html

CatsWhoCode.com:
WordPress: How to insert data programmatically
Aug 03, 2010 @ 15:14:02

On the CatsWhoCode.com blog today they share an alternative method for getting content into your WordPress blog - a programmatic approach pushing it directly in through bits of code.

Recently, a client of mine asked me to write an article importer for his WordPress powered site, which was a very interesting project for me. In this article, I'll show you how you can easily add data (posts, comments, categories, etc) to your WordPress blog, without any manual effort.

They describe and show examples for a few different types of inserts:

  • Inserting posts
  • Inserting comments
  • Adding categories to a post
  • Adding tags to a post
  • Automatically create a custom field when a post is published

Code snippets are provided for each.

tagged: wordpress insert data programmatic

Link:


Trending Topics: