What to Expect When You're Expecting: PHP 7, Part 1

This is part one in our Expecting PHP 7 miniseries. Read part two.

As many of you are probably aware, the RFC I mentioned in my PHP 5.0.0 timeline passed with PHP 7 being the agreed upon name for the next major version of PHP.

Regardless of your feelings on this topic, PHP 7 is a thing, and it’s coming this year! With the RFC for the PHP 7.0 Timeline passing almost unanimously (32 to 2), we have now entered into feature freeze, and we’ll see the first release candidate (RC) appearing in mid June.

But what does this mean for you? We have seen a huge reluctance of web hosts to move towards newer versions of 5.x. Won’t a major version bring huge backwards compatibility breaks and make that move even slower?

The answer to that is: it depends. So keep reading.

A number of language edge cases have been cleaned up. Additionally, both performance and inconsistency fixes have been major focuses for this release.

Let’s get into the details.

Read More

Seven Unusual Ruby Datastores

Admit it: you like the unusual. We all do. Despite constant warnings against premature optimization, an emphasis on "readable code", and the old aphorism, "keep it simple, stupid", we just can't help ourselves. As programmers, we love exploring new things.

In that spirit, let's go on an adventure. In this post, we'll take a look at seven lesser-known ways to store data in the Ruby language.

The Ones We Already Know

Before we get started, we'll set a baseline. What are the ways to store data in Ruby that we use every day? Well, these are the ones that come to mind for me: string, array, hash, CSV, JSON, and the filesystem.

We can skip all of these.

So what are some of the other ways to store data in Ruby? Let's find out.

Struct

What Is It?

A struct is a way of bundling together a group of variables under a single name. If you've done any C programming, you've probably come across structs before.

A struct is similar to a class. At its most basic, it's a group of bundled attributes with accessor methods. You can also define methods that instances of the struct will respond to.

In Ruby, structs inherit from Enumerable, so they come with all kinds of great behavior, like to_a, each, map, and member access with [].

You can define a struct object by setting a constant equal to Struct.new and passing in some default attribute names. From there, you can create any number of instances of the struct, passing in attribute values for that instance.

Read More
Learn about Engine Yard
Try Engine Yard for your Ruby or PHP Apps

Deploying Ghost on Engine Yard

Over the past few years a few new blog systems have been released which aim to bring simplicity back to blogging. One of these is Ghost, which got a huge amount of attention with it's amazingly successful Kickstarter campaign in 2013.

If you wanna move your blog to Ghost or wanna start a new one, carry on reading. Follow these steps and you’ll have a Ghost blog running on Engine Yard in a jiffy.

Clone

Before deploy Ghost, we will fork it on GitHub. This way we can add custom themes and deploy hooks. In case you are not familiar with forking a project, go to the Ghost repository and press the Fork button on the top-right of the page. If you don't have an account yet it'll lead you through the steps of creating one.

You should end up with a new fork in your account. Next, we clone the repository to our local machine to prepare it for deployment via git clone and create a new branch. We’ll use this for deployment specific changes.

git clone git@github.com:bastilian/Ghost.git
cd Ghost

Ghost recommends you use the stable branch rather than master production.

So, let's create a branch based on stable:

git checkout stable
git checkout -b 'deploy'
Read More

Integrating React With Backbone

There are so many JS frameworks! It can get tiring to keep up to date with them all.

But like any developer who writes JavaScript, I try to keep abreast of the trends. I like to tinker with new things, and rebuild TodoMVC as often as possible.

Joking aside, when it comes to choosing frameworks for a project, emerging frameworks just haven't been battle-tested enough for me to recommend to clients in most cases.

But like much of the community, I feel pretty confident in the future of React. It's well documented, makes reasoning about data easy, and it's performant.

Since React only provides the view layer of a client-side MVC application, I still have to find a way to wrap the rest of the application. When it comes to choosing a library that I'm confident in, I still reach for BackboneJS. A company that bets on Backbone won't have trouble finding people who can work on their code base. It's been around for a long time, is unopionated enough to be adaptable to many different situations. And as an added bonus, it plays well with React.

In this post, we'll explore the relationship between Backbone and React, by looking at one way to structure a project that uses them together.

Read More

Ninefold Customers, Welcome to Engine Yard!

Since our founding in 2006, Engine Yard has been a stalwart supporter of Ruby on Rails. Over the years we have supported the Bundler, RVM, JRuby and Merb efforts. We continue to move forward with new initiatives to bring Ruby on Rails to a production container.

Our blood is Ruby Red.

As other vendors have transitioned their businesses away from native Ruby on Rails, we are pleased to welcome those who have been left behind to the Engine Yard community.

Ninefold has announced that they will be no longer be supporting their native hosted Ruby customers. Engine Yard stands ready to provide our industry leading platform, migration assistance, and coached deployments of your application today. Our team of support and service engineers will personally assist you in bringing up your application.

As technologies change and evolve, Engine Yard will continue to support you running your applications your way.

Our primary focus is on your success.

We are dedicated to supporting your most critical apps with a platform and a team of professionals who are the best in the business. With real-time customer satisfaction that is consistently at 98% or better, we back up those words publicly with proven results.

To get started, come over to our Ninefold customer page and join us.

We’re standing by to help.

CHECK OUT OUR CURATED COLLECTIONS

Look through our specially curated posts to get focused, in-depth information on a single topic.