PHPNews

"Software architecture is failing" by Alex Hudson

Written by Rob Allen - Published on Rob Allen's DevNotes
Aggregated on Monday October 16, 2017 - Permalink

Alex Hudson 's article, "Software architecture is failing" is a really interesting article and resonates with me as I come across this a lot. I recommend reading it. I'm very much in the camp of designing for the business requirements first and my biggest successes are the apps which solve my clients' problems. To call one of my apps "legacy" is a compliment; it means that I've written …

Continue reading »


Pretty print curl -i

Written by Rob Allen - Published on Rob Allen's DevNotes
Aggregated on Wednesday October 11, 2017 - Permalink

My favourite tool for working with APIs is curl and in particular, I like using the -I switch to view the status line and headers too: This generates an output that looks like this: $ curl -i https://api.joind.in HTTP/1.1 200 OK Date: Wed, 04 Oct 2017 09:51:46 GMT Server: Apache X-Powered-By: PHP/5.6.4 Access-Control-Allow-Origin: * Content-Length: 363 Content-Type: application/json; …

Continue reading »


Converting a Composer dependency to git for editing

Written by Rob Allen - Published on Rob Allen's DevNotes
Aggregated on Wednesday October 4, 2017 - Permalink

I'm adding a new feature to ZF's Problem-Details component and it's easiest to do this within the context of the application I'm developing. The component lives in vendor/zendframework/zend-problem-details and was installed using composer require so doesn't have its own git repository as the distribution zip file was used to install it. To change it to a git repository, we can use the …

Continue reading »


Custom URLs for a Cloud Foundry application

Written by Rob Allen - Published on Rob Allen's DevNotes
Aggregated on Wednesday September 27, 2017 - Permalink

Now that I have my application deployed to Cloud Foundry , I need it to work with my own domain, such as bookshelf.akrabat.com rather than slim-bookshelf.eu-gb.mybluemix.net . We can do this via the command line which is useful. To do this we need to create a domain and then we can create a route . Create a domain To create a domain, we use the command cf create-domain {organisatio…

Continue reading »


CORS and OpenWhisk web actions

Written by Rob Allen - Published on Rob Allen's DevNotes
Aggregated on Wednesday September 20, 2017 - Permalink

By default, OpenWhisk will handle the relevant responses for CORS . Specifically, it will respond to an OPTION request with these headers: Access-Control-Allow-Origin: * Access-Control-Allow-Methods: OPTIONS, GET, DELETE, POST, PUT, HEAD, PATCH Access-Control-Allow-Headers: Authorization, Content-Type If you need to change what is sent or you don't want to send these headers at …

Continue reading »