Blog

DNS Redundancy Update May 18, 2010

This post is to let everyone know that we have added a 3rd DNS server to provide an extra level of redundancy in our DNS systems.

This DNS server will only be used if you add it to your domains at their registrar, so we recommend that you do so wherever you can.  It's not critical, but extra levels of protection against downtime never hurt.

These are our current nameservers:

NS1.HOSTED.BY.ACTIONVERB.COM
NS2.HOSTED.BY.ACTIONVERB.COM
NS3.HOSTED.BY.ACTIONVERB.COM (new)

[note, versions without the "HOSTED.BY" are also available, but we prefer that you use the fully spelled out version so it is clear to anyone who looks that your sites are our customers not properties].

Please feel free to drop us a line with any questions.

Better Permalinks May 13, 2010

First, a programming note to anyone who subscribes to this blog via RSS, most of our updates have moved to Twitter!  Follow us at http://twitter.com/VaePlatform.

We just made a pretty cool change to the way permalinks work on Vae.  They've always been a confluence of 2 things:  they represent both a context and a particular HTML template.  Well, what if you want to render a different page but within the same context?

For example, let's say you have a collection called Items, permalinking to HTML page called item.html.  A permalink for an item (say, Freefall's Road Trip EP album) might look like http://example.com/item/freefall-road-trip-ep.  This is a very semantic, readable, and SEO-friendly URL.  I like it a lot. 

But what if you had another page that renders the reviews of that album?  Say, reviews.html.  Before, you would need to link to that page explicitly and pass the ID of the item in as a parameter.  The URL (as generated by the <v:a> tag) looked like this: http://example.com/reviews/13423. Definitely less obvious and less SEO-friendly.

We've made this better.  Now, the URL will be generated by appending the new template HTML file name to the end of the permalink.  That review link will now look like http://example.com/item/freefall-road-trip-ep/reviews.  Much better.  Our page rendering engine will know to load the HTML file called reviews and render it within the context of the Road Trip EP

The <v:a> tag has been updated to automatically generate the new-style URLs.  If you're generating URLs manually in PHP, you can just start generating links in the new style.

Enjoy!

Release: New Vae Data API for PHP February 18, 2010

It's been a while since we've had a major feature announcement here at Vae CMS, but this is a big one! We're proud to announce Version 2 of the Vae Data API, which is available and running on all Vae accounts as of today.  The new API is an object-oriented replacement for the current vae() and vae_find() functions in PHP, and is also used by any VaeML tag that accepts a path="" attribute.

The biggest feature of the new release is performance.  The old Vae Data API has long been a major bottleneck for Vae sites, especially on sites with large amounts of data or heavy use of associations.  With the new release, we have addressed both of these issues head-on, and have reduced page rendering times by as much as 90% for some pages.  The upgrade is included in all Vae plans for no additional charge.

Behind the scenes, the new API is powered by a new set of Vae Database servers running our new proprietary database server software, VaeDB.  VaeDB is a ground-up rewrite of Vae's data storage and query engine.  All data  (including associations) is now stored in RAM at all times to enable lightning-fast lookups without having to read from the disk. Additionally, VaeDB analyzes your query history to anticipate future queries and get your data ready before you even ask for it.

The other major feature of the new API is its object-oriented nature.  Since examples are worth 1000 words, here's a quick overview of how the new API works.  Non-coders might want to skip this part.

vae() and vae_find() are now the same function and may be used interchangeably.

They return a VaeContext or VaeQuery object that contains the results of your query.  VaeContext and VaeQuery present mostly the same interface.  Let's start up the example with a familiar looking query that retrieves an Artist by ID:

$artist = vae("artists/13421");

Child structures may be accessed by either the arrow operator or via array notation:

echo $artist->name;
echo $artist['name'];

If your query returned multiple contexts (for example if you asked for a collection), you may iterate over the object just like it was an array:

$artists = vae("artists");
foreach ($artists as $artist) {
  echo $artist->name;
}

You can get the ID, permalink, or type of any context easily, via the arrow operator or array notation:

$artist = vae("artists/13421");
echo $artist->id;           // 13421
echo $artist->permalink;    // artist/freefall
echo $artist->type;         // Collection
echo $artist->name->type;   // TextItem
echo $artist->albums->type; // Collection

You can also get info about the structure represented by the context:

$artist = vae("artists/13421");
echo $artist->structure->id;        // 1269
echo $artist->structure->name;      // Artists
echo $artist->structure->type;      // Collection
echo $artist->structure->permalink; // artist   (URL of page to render by default for permalinks)

You can still get the ID in the foreach block too:

$artists = vae("artists");
foreach ($artists as $id => $artist) {
  echo $artist->name;
}

Run scoped XPath queries via the get() method, which supports any valid VaeQL expression:

$artists = vae("artists");
foreach ($artists as $artist) {
  foreach ($artist->get("albums[type='CD']") as $album) {
    echo $album->name . " is a CD!";
  }
}

All query options that were previously supported are still supported.  We have also added query options for pagination. They get passed in as a parameter, after the query. Supported options include filter, groups, limit, order, paginate, page, and skip:

$artists = vae("artists", array('limit' => 10));
$artists = vae("artists", array('paginate' => 5, 'page' => 2));
$albums = $artists->get("albums", array('order' => 'name'));
$albums = $artists->albums(array('order' => 'name')); // same as above, shortcut syntax

Debugging functions like var_dump() (including serialize(), print_r(), var_export(), etc.) will not work directly on the new objects. However, we've wired up a special method that will allow you to debug your code like many of you have always done.  Just invoke the debug method on the object:

var_dump($artist->debug);

Note:  Internally the debug() method is the same as the data() method, which I'll tell you about in a second.

And for the really geeky, a few more implementation details: The $context variable passed into functions registered with vae_register_hook() will now be a VaeContext object. You may manipulate it in your hook functions just as if you had created it in PHP.  Additionally, you can create a VaeContext object out of your own vanilla PHP arrays by invoking the vae_context() function on that array.

You don't have to do anything at all to enjoy the speed boosts and object-oriented features provided by the new API. 

We've rolled it out onto your sites and you are up and rolling.  You may begin using the Object-Oriented features in your PHP code right away as well.  Over the next few months, we will use statistics gathered from the system to build in further optimizations for speed.

*** IMPORTANT ***

For the most part, this API is backwards-compatible with the old API. There is, however, a few things about the new API that may break your old code, though we checked and don't think they affect any websites currently live.

You may no longer directly iterate over the child structures of a context.  For example, this used to work, but will not work anymore:

foreach (vae("artists") as $artist) {
  foreach ($artist as $structure_name => $value) {
    echo $structure_name . ": " . $value . "\n";
  }
}

This change was necessary in order to combine the vae() and vae_find() functions into a single function.

This would work though:

foreach (vae("artists") as $artist) {
  echo "name:  " . $artist->name  . "\n";
  echo "genre: " . $artist->genre . "\n";
  echo "bio:   " . $artist->bio   . "\n";
}

That is, you want your code to explicitly state the name of the structure you wish to access.

If you need to access context data as an array (like before), just invoke the data() method on the object:

foreach (vae("artists") as $artist) {
  foreach ($artist->data as $structure_name => $value) {
    echo $structure_name . ": " . $value . "\n";
  }
}

Also, you need to be careful using objects in "if" statements, as the object will always return true.  For example, this will not work as expected:

if (vae("artists")) {
  echo "There are artists";
}

You can use the ->count() method to achieve what you want:

if (vae("artists")->count) {
  echo "There are artists";
}

Additionally, you should be careful when casting values to a numeric type.  This will not work as expected:

foreach (vae("artists") as $artist) {
  echo (int)$artist->age;
}

This is because objects may not be directly cast to numeric types.  If you need a numeric value, you'll need to first cast to a string.

foreach (vae("artists") as $artist) {
  echo strftime("%m-%d-%Y", (string)$artist->formed_on);
}

I think that covers most of the breaking changes and gotchas.

Thanks for reading this far.  I hope that this made your day.  I also hope that I explained everything fully and that there are no unforeseen complications or bugs.  If you have any questions or notice any issues, please email [email protected] and we'll get it  ironed out immediately.

I really appreciate your support of Vae Platform, and look forward to bringing you many new toys in the future!

Kevin Bombino
Founder
Vae Platform

Release: Production Environments! December 23, 2009

Hey guys!  It's been a while, but the time has come for a new Vae feature.  And we think this one is huge.  We're proud to announce that Vae now has full support for a separation of Staging and Production environments on your website.

We worked hard to develop this feature in a way that fits in naturally with the different workflows employed by the many different designers using Vae.  Basically, this is how it will work:

Once you opt-in to Vae's Production Environment feature for one of your domains by going to the Domains tab under the Vae tab, Vae will create a Production Environment for that website.  FTP will be directed to the Staging Environment, which can be browsed at http://<;site>.vaesite.com/.  Any changes made to the FTP will be instantly reflected there.  However, they will not be reflected on the main domain until perform a 'release'. 

You can release your site to the production environment from the new Production Environment tab under the Site tab.

5 previous releases are stored, and you may roll back to them at any time.  This provides an awesome recovery option if you accidentally release a bad copy of the site.

Here's what it looks like:

Screenshot of Releases

You may also make a new release by using the Vae Local Development Environment.  Simply type verb release to make a new release to production.  Or type vae stagerelease to update the Staging Environment and Production Environment with the current copy from Subversion.

The best part of all: there is no additional cost for this feature.  It's just one more thing that we're doing to make Vae the most powerful and unique shared hosting environment in existence.  Thanks for your support!

If you have any questions, please direct them to [email protected].

Video Tuesday: Building Zips July 28, 2009

Get the Flash Player so you can see an awesome video about Vae.

Today we're showing you how to dynamically create zip files using Vae's <v:zip> tag. For more videos and examples, check out our Documentation and Integration Center.

Video Tuesday: Permalinks July 14, 2009

Get the Flash Player so you can see an awesome video about Vae.

Permalinks keep your address bar clean, is good for SEO, and is easy to implement with Vae. As always, check out our Documentation and Integration Center for more videos and tutorials.

Using <v:rss> With Google Product Search July 08, 2009

As you may know, <v:rss> makes it easy to quickly create an RSS feed from any Collection in your site. Vae also takes this a step further by making it easy to create an RSS feed that can be submitted to Google Product Search, so potential customers can locate your items when querying this search engine. In this mini tutorial, we'll create an RSS feed that's ready to submit to Google Product Search.

Here's our example Collection that we're going to be working with; it's called "Records":

<v:rss> works with any Collection, so you can quickly create RSS feeds from your existing Collections.

Next, we'll need to write the code inside our rss.xml file. Normally it takes just one line of VaeML code to create an RSS feed; since we're submitting this feed to Google Product Search, we'll have to add some Google Base tags. Here's the contents of our rss.xml file:

<v:rss title="Action Verb Records" description="Records" path="records" title_field="record_name" description_field="description">
<g:condition>new</g:condition>
<g:id><v-></g:id>
<g:payment_accepted>Visa</g:payment_accepted>
<g:payment_accepted>MasterCard</g:payment_accepted>
<g:payment_accepted>AmericanExpress</g:payment_accepted>
<g:payment_accepted>Discover</g:payment_accepted>
<g:price><v=price></g:price>
</v:rss>

And we're all done! When we load up the RSS file in our browser, we can see the contents of the Collection is now accessible via RSS:

If our customers wanted to easily stay up-to-date on what records we have for sale, they could subscribe to this RSS feed using any browser or RSS client. Since we can use <v:rss> to output the contents of any Collection, we could just as easily create an RSS file for our blog or any other Collection our customers might want to subscribe to.

Since we integrated the Google Base Tags into our RSS feed, it's ready to be submitted to Google Product Search [just follow Google's instructions]. After we submit it, our records will appear in Google Product Search results, and we'll have increased traffic to our website without much effort.

Video Tuesday: <v:formmail> July 07, 2009

Get the Flash Player so you can see an awesome video about Vae.

Vae's <v:formmail> helps you quickly make a form that submits to an email address.

Want more videos and tutorials? Check out our Documentation and Integration Center.