[Developers] New Acre release (r18)
Jason Douglas
jason at metaweb.com
Thu Mar 26 19:14:04 UTC 2009
We just pushed a new release of Acre, our hosted environment for
developing Freebase apps and services.
http://freebaseapps.com/
Some highlights of the release:
Short URLs
=========
You can now register a short http://*.freebaseapps.com URL for your
app in addition to the http://*.username.user.dev.freebaseapps.com/
URL your app was given when you created it. Registering this "release
URL" means your app will also be listed in the up-coming App Directory
(soon!). To register a release URL for your app, go to the new
Versions tab of the app menu.
App Versions
===========
While there's much to love about the live editing nature of Acre...
it's not without it's downsides. How do you share your app with
people without having to worry about breaking it as soon as you resume
development?
To address this problem, we've introduced a new versions feature.
Versions are addressable snapshots in time of an Acre app. You create
a new version of the current state of your app just by giving it a
label. That label can then be used in URLs to always refer to that
app as of that moment in time, e.g.:
http://label.appname.username.user.dev.freebaseapps.com/
Note that it's only the top-level app that is frozen in time. If your
app refers to files in other apps, they do not inherit the same
timestamp. (If you're adventurous, you can try out the new versioned
acre.require -- there's now a second argument for the label -- but it
hasn't been thoroughly tested yet.)
In addition, any version can be mapped to the app's release URL if
you've registered one. So you can create a version, set it as the
released version, and then continue developing. Once you're at a new
safe point, you can the create another new version, update it as the
released version, and your users should be seamlessly upgraded.
New Debug Console
=================
We've made a shift in this release to sending logs back down in HTTP
headers (when the x-acre-enable-log request header is present in the
request). This change should be transparent other than the fact that
the web-based console is now triggered by the presence of an
'acre.console=1' query arg instead of the '/acre/preview' path prefix
we used to use.
console.log to Firebug with FirePHP
============================
The switch to header-based logging also now enables the use of the
FirePHP (https://addons.mozilla.org/en-US/firefox/addon/6149) Firefox
extension with Acre apps. If you can live with the PHP formatting,
this is a great debugging tool as you'll see all of your console.log
statements for every single Acre request... including AJAX requests
and POSTs.
New App Editor Design
==================
To accommodate all of these new features (and a few more coming soon),
we've redesigned the App Editor. The redesign better surfaces the
most commonly-used editor functions as buttons while still showing
more code. We also got feedback that having the App and File menus
next to each other was confusing, so the App menu is now separate and
triggered by clicking on the app name in the header. There are many
more improvements too, like IE7 and IE8 support... so just check it
out for yourself.
New Code Editor
=============
We've also upgraded the version of the CodeMirror (http://marijn.haverbeke.nl/codemirror/
) library that we use for editing. In addition to fixing a number of
bugs, the current line will now be remembered between file switches.
Indentation is also no longer forced. So:
* Tab key now shifts a line to the right rather than re-setting
indentation
* Highlighting a section and pressing tab shifts the whole section
* To re-indent a selection, press shift-cmd-i on a Mac and shift-ctrl-
i on a PC.
Acre API updates
==============
* acre.freebase.img_thumb(id, height, width, mode, errorid) has two
new arguments: mode and errorid. Mode takes any of 'fit', 'fill',
'fillcrop' and 'fillcropmid', while 'errorid' is the ID of the
placeholder image to use if an image is not found.
* acre.form_url(base_url, dict). This is a new helper API that will
take a base URL and append a serialized Javascript dictionary as a
query string to it. This is basically the reverse of
acre.environ.params.
Acre API Reference & Code Search
============================
We're experimenting with a new API browser (much more current and easy
to browse, but still lacking some detail), as well as making all Acre
scripts searchable so you can find example uses of different APIs.
You can try out both from the Help menu in App Editor or directly at http://api.freebaseapps.com/
and http://codesearch.freebaseapps.com/.
Faster JSON parsing
================
All of our JSON parsing used to be done in Javascript, which for large
requests (like, say... a big mqlread :-) could get quite slow. In
this release, we've switched to a native Java JSON parser which is
much faster.
-- the Acre team
More information about the Developers
mailing list