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

Rob Allen:
Notes for working on the OpenWhisk PHP Runtime
Jul 04, 2018 @ 15:19:03

Continuing the theme of posts related to using PHP on the OpenWhisk serverless platform, Rob Allen has posted a few notes for working with the PHP runtime.

These are some notes for working on the OpenWhisk PHP Runtime, but are probably applicable to the other runtimes too.

His notes cover:

  • some basic setup
  • building the two containers (PHP 7.1 and 7.2)
  • running tests
  • using the container interactively
  • checking the format of Scala files

Commands are included for each item along with some of the output to expect.

tagged: openwhisk runtime notes container test scala tutorial

Link: https://akrabat.com/notes-for-working-on-the-openwhisk-php-runtime/

Chad Minick:
PHP frameworks are obsolete
Aug 22, 2012 @ 14:25:47

In his latest post Chad Minick shares some thoughts as to why he thinks PHP frameworks are obsolete and how, despite there still being a use for them, a lot of them are just trying to solve the same problems all over again.

Now before I start getting hate mail, let me explain that I still think there is a market for PHP frameworks. I think if you have a moderately low traffic site that’s going to live on shared hosting, and is basically a CRUD application on top of MySQL, disregard this article, it probably isn’t for you. However, I’ve seen so many projects start out with that scope. They either grow or the developer/client wants to add more fancy new features they are starting to see elsewhere on the web. Then I see all these PHP developers hacking things that the PHP stack really isn’t meant to do.

He takes some of the core features of several of the popular frameworks out there and breaks them out into a list of technologies that do that work themselves (such as "Web Server", "Dependency Management", "Caching" and "Messaging"). He points to a Java/Scala framework, Play as an example of having several of these technologies built-in where you don't have to have a whole other set of skills to use them effectively. It's an interesting idea but seems a little NIH to me.

tagged: framework opinion obsolete java scala play

Link:

Community News:
IPC10 – PHP: Yesterdays Scala and the Cobol of tomorrow? (video)
Apr 15, 2011 @ 17:52:52

The International PHP Conference has posted the video they recorded at their 2010 event of Pierre Joye and Johann-Peter Hartmann's keynote presentation "PHP: Yesterday's Scala and the Cobol of Tomorrow".

PHP came a long way, and we are no longer the cool new kid on the block. On the other hand side we are still far away from being the new cobol, and there is a lot of great stuff going on inside php and the php community. What happened to PHP the last few years, what is happening right now and what will be the next 5 years? Is PHP ready for nowadays trends? Does it fit for Social Web, NoSQL and HTML 5? Should You better be learning Scala right now?

The video runs about 45 minutes and compares some of the features Scala offers, a brief history of PHP, some of the trends of current development and where PHP needs to go in the future to keep up with trends.

tagged: video scala cobol history future language

Link:

Alvaro Videla's Blog:
Reply to "Scala is Easier than PHP"
Nov 22, 2010 @ 14:29:12

Alvaro Videla has written up a response to Wade Arnold's Scala's easier than PHP post and some of the points he doesn't agree with him on.

Before going on with the points, let me state something: please avoid flame wars, all the Scala vs. PHP stuff, fanboyism and what not. This post is not about that. Regarding Wade Arnold I have to say that I fully respect him. While I don’t know him personally, I know him for his work on AMFPHP, since it was a platform I used to work with before.

Alvaro talks about functional programming and some of the main points he had made about Erlang in a talk he had given - code reload, being ready for multi-core and no shared state between scripts. He talks about how these (really) apply to PHP.

tagged: scala opinion easier language shared state multicore erlang code reload

Link:

Wade Arnold's Blog:
Scala is easier than PHP
Nov 18, 2010 @ 17:03:56

According to this new post on his blog Wade Arnold thinks that Scala, the "general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way", is easier that PHP for handling some of the common web application related issues.

I still believe that PHP is the best language for the web for the majority of programmers; it quite possibly has the best documentation and examples of any language like a DSL for the web! [...] So why is Scala easier?

The first reason he suggests is that Scala, unlike PHP makes it simpler to handle concurrency issues and makes it to where partial functions and mutable/immutable types all play well together. He compares some of the skills a PHP developer might have to have to reproduce the features that Scala comes built in with (a "resume" of 13 lines as compared to one with 5).

It really is a grind to overcome that first 4-6 months but if you need scale I would recommend taking the haul. It will change how you think about problems forever.
tagged: scala programming langage opinion easy

Link:

David Para's Blog:
Writing a simple PHP sourcecode buildscript in Scala
Jan 11, 2010 @ 18:42:27

David Para has written up a tutorial for his blog today about working with Scala to create a build tool for his PHP repositories.

So what do I exactly need? I want to build multiple versions of PHP from the same branch without checking out the code twice. I also want to configure these builds somewhere without always typing in the parameter list or so. For further versions I want to be able to configure these in a file that can easily be distributed to other machines.

He includes the basic Scala script to make the build process work - defining the locations of the build tools, setting up a few parameters and define a few build parameters for his PHP6, PHP6-debug, PHP 5.3 and PHP 5.3-debug installations. An example of running the script is also given, passing in the name of the script along with the target to the java VM (or tell it to build all instances). You can download the jar file here.

tagged: scala buildscript tutorial java

Link:

Pawel Turlejski's Blo:
What's wrong with PHP closures?
Oct 06, 2009 @ 18:16:18

In a recent post Pawel Turlejski takes a look at what he thinks is wrong with PHP closures as compared to syntax in a few other languages.

PHP 5.3, along with many other features, introduced closures. So now we can finally do all the cool stuff that Ruby / Groovy / Scala / any_modern_language guys can do, right? Well, we can, but we probably won't... Here's why.

He compares the PHP syntax for using closures/lambda functions with the abilities of Groovy and Scala. He does point out out that the ArrayObject wrapper does allow you to work a bit more fluently with the array's contents, but it's still not quite the same. According to him:

I’m sure closures will find their uses in the PHP world (like delayed execution or automated resource management), but IMHO replacing traditional loops and array operations is not one of them.
tagged: closure groovy scala array example

Link:


Trending Topics: