X
X

Login

Login if you already have an account

LOGIN

Register

Create a new account. join us!

REGISTER

Support

Need some help? Check out our forum.

FORUM

FYI – FatFractal Makes File Upload Easy

You can access the source code for the sample application here.

Inspired by a recent blog post by Raymond Camden, we decided to show how much easier FatFractal makes it to create an object containing a blob. This example uses our JavaScript SDK in a PhoneGap app, but all of our SDKs feature the same ease of use.

Here’s the relevant code for uploading with FatFractal:

// Not even a little bit complex -- just set the member
var newNote = {
clazz: "Note",
text: noteText
};
if (imagedata) newNote.picture = imagedata;

ff.createObjAtUri(newNote, "/Note", function(result) {
$.mobile.changePage("#home");
}, function(error) {
console.log("Oh crap", error);
});
cleanUp();

Here’s the Parse code (from Raymond Camden’s blog):

/*
A bit complex - we have to handle an optional pic save
*/
if (imagedata != "") {
var parseFile = new Parse.File("mypic.jpg", {base64:imagedata});
console.log(parseFile);
parseFile.save().then(function() {
var note = new NoteOb();
note.set("text",noteText);
note.set("picture",parseFile);
note.save(null, {
success:function(ob) {
$.mobile.changePage("#home");
}, error:function(e) {
console.log("Oh crap", e);
}
});
cleanUp();
}, function(error) {
console.log("Error");
console.log(error);
});

} else {
var note = new NoteOb();
note.set("text",noteText);
note.save(null, {
success:function(ob) {
$.mobile.changePage("#home");
}, error:function(e) {
console.log("Oh crap", e);
}
});
cleanUp();
}

(The only other significant change was to switch to reading the image from the filesystem rather than receive it as a base64-encoded string, which is arguably better practice anyway. Check out the full source up on GitHub!)

So, instead of forcing you to create and save a special file object, FatFractal lets you do the natural thing: you set the member, we take care of the rest.

FYI – FatFractal now provides textual term search for NoServer apps!


As a developer, I want to be able to retrieve information from my backend using search technology so that I can create even more powerful queries and get super fast responses.

You can see working code for everything below (here).
You can access the source code for the sample application (here).

We are really excited to announce that we our latest release includes full textual term search for all your data that is stored on FatFractal NoServer applications. This opens up an entirely new set of options for your queries and they are super fast to boot!

How it works:

We have recently started to use elasticsearch – a superb product by the way, and a future post will outline why we switched to it – as one of the data stores for your app’s data. Basically, as before, everything that is stored is fully indexed for you automatically without any configuration of your application or schema required. In addition, our implementation does not impose any additional overhead on any interaction with your data (Create, Read Update or Delete), but it has vastly improved the response times for all queries and we have added full textual term search as well.

How to use it:

We have added two new operators that you can use in your queries, “contains_all” and “contains_any”. These provide textual term search capability for queries that looks for, you guessed it, ANY submitted term matches or ALL submitted terms match.
For more information, you can find the documentation for the FatFractal Query Language (here).

Examples:

As usual, we have created a sample application to illustrate this, you can try the application (here), and the source code for the application is (here) and also play with the databrowser for the application’ backend (here).

The sample application uses a Movies collection that holds Movie objects. The movie objects have a member called “description” which we will be searching.

The model for Movie is as follows:

function Movie() {
this.title = null;
this.description = null;
this.year = null;
return this;
}
We have populated the collection with two Movies as shown below:

{
"title": "The Conjuring",
"description": "Paranormal investigators Ed and Lorraine Warren work to help a family terrorized by a dark presence in their farmhouse. Forced to confront a powerful entity, the Warrens find themselves caught in the most terrifying case of their lives.",
"year": 2013
},
{
"title": "Grown Ups 2",
"description": "After moving his family back to his hometown to be with his friends and their kids, Lenny finds out that between old bullies, new bullies, schizo bus drivers, drunk cops on skis, and 400 costumed party crashers sometimes crazy follows you.",
"year": 2013
}
So, now let’s create a couple of queries that use free text search.

Search using contains_any

First, we will search the Movies collection for any Movie objects whose description member contain any one of two terms (for example, “family” and “terrorized”). The query looks like this:

/Movies/(description contains_any 'family terrorized')
The code looks like this:
function searchAny() {
var eli = document.getElementById('movies-search-any-input');
ff.getArrayFromUri("/ff/resources/Movies/(description contains_any '" + eli.value + "')", function(movies) {
// handle success
}, function(code, msg) {
// handle error
});
}
Since “family” is contained in both “The Conjuring” as well as “Grown Ups 2” descriptions, this query will return both objects.

Search using contains_all

Next, let’s use the same search terms, but use the contains_all operator, which will search for any Movie objects whose description member contain both search terms.

/Movies/(description contains_all 'family terrorized')
The code looks like this:
function searchAll() {
var eli = document.getElementById('movies-search-all-input');
ff.getArrayFromUri("/ff/resources/Movies/(description contains_all '" + eli.value + "')", function(movies) {
// handle success
}, function(code, msg) {
// handle error
});
}
In this case, the query will return only “The Conjuring” as it’s descrption contains both terms and “Grown Ups 2” does not.

As mentioned above, these operations are extremely fast and efficient as any data that is stored on your backend is fully indexed automatically as soon as it is created or modified.

Have fun!

Kevin

FatFractal Console 2.0

As you may have noticed, the FatFractal Console recently underwent a major upgrade, and we’d like to talk a little bit about what’s new.

The most obvious change is the look and feel. Following in the footsteps of the Data Browser and the rest of the internet, the new Console now uses Bootstrap for a nice, consistent and functional interface. As you probably know, Bootstrap makes web development a lot simpler, giving you a lot of good-looking styles for basic interface elements and layout for free.

A less obvious but more important change is the frontend framework. We are now using AngularJS, and were really impressed with the ease of development. Angular also encourages a very maintainable code organization and separation of concerns, which will make future updates a lot easier (and thus more frequent). Overall, we were really impressed with Angular and very glad to have made the leap for this Console upgrade. The new interface is clean and fast, and we think you’ll like it a lot.

Major new functionality has been added as well. Now that we have left public beta, the new Console lets you manage your accounts and subscriptions. Subscriptions are the way you choose the service level for your applications; everyone gets free Sandbox subscriptions when they sign up. When you’re ready for production, subscriptions are the way to choose your limits for things such as API calls, how many domains and applications you need, backup settings, etc. The Console is also your destination for app analytics. Wonder how many API calls you’ve used this month, or what your app’s average response time is? The Console is the place to find out.

Finally, it’s worth mentioning something that hasn’t changed: The FatFractal Console is a NoServer application: all of the Console business logic, including accounts and billing, is implemented as event handlers, server extensions, and scheduled code. In other words, the Console is running atop the same FatFractal backend available to you. Can Parse or StackMob say the same? I sincerely doubt it.

We’re very excited about the new Console, and there’s more yet to come! We will be continuously rolling out new features and improvements to make your development work even easier.

Emerging from Beta – Thank you to everyone!

I would like to express my sincere thanks to the FatFractal team and to all of our beta testers over the last months for all of their efforts and collaboration. As a result of lots of hard work, we emerged from Beta today.

What does this mean?

New Console

If you look at the new console application (see it here), you will see some new options. Some relate to setting up accounts and payment methods. But don’t worry, your apps are all safe and you will have lots of options for development and production, including free ones. We have also added a number of features and a new look and feel to the console application, including:

  • App and domain search
  • App metrics
  • Improved navigation

New Pricing

We have updated our pricing model and are pleased to offer the most competitive pricing in the industry, made possible by our unique architecture — optimized top to bottom to provide the most efficient application frameworks to developers for your applications. You can see our new pricing at the following:

  • NoServer application pricing is here.
  • Ruby and Java/Servlet application is here

New Features and Improvements

We have also released a new version of the platform and SDKs with a lot of new features there as well. One of the most exciting new features is that NoServer now supports full textual term search on your data (eg description contains_any ‘BaaS PaaS’) – check out the Release Notes!

Questions? Feedback?

We would love to hear your questions and feedback on the console application as well as our pricing. Please share your thoughts with us (click here).

FAQ:
Q: I am still in development with my app, do I need to do anything?
A: No, we believe that asking developers to pay during development would inhibit development of cool new stuff, and we never, ever want to inhibit developers from developing cool new stuff.

Q: My app is being used by real customers, do I need to do anything?
A: We now have a development “sandbox” separate from “production”. If your app is in use, you should migrate to “production” to ensure that your data is best protected and your application is always available.

Q: When will the new pricing take effect?
A: The new pricing takes effect immediately when you create a subscription for your application and move it out of the sandbox. Ruby and Servlet apps have a 30-day trial period, after which time they will be required to have a paid subscription.

Q: I have more than three applications or domains already. Do I need to remove them?
A: No, your existing apps will all continue to work. However, in the next few weeks we will ask that such legacy apps be moved into either your sandbox subscription or a production subscription where possible.

Q: What is the difference between Sandbox and the other tiers for NoServer apps?
A: The most important distinction between Sandbox and non-Sandbox apps is that in Sandbox the data is not guaranteed or backed up in anyway. So, if you have data that can’t be lost, you should be in production. Sandbox apps also are subject to usage limits for bandwidth, API calls, and storage.

Q: I see that Ruby and Servlet apps have a 30 day free trial period. Why is this different from the SandBox for NoServer apps?
A: Ruby and Servlet apps have to be provisioned differently than NoServer apps. They are allocated reserved instances from the beginning and as a result, we have elected to provide 30 day free trial period as the best means of helping developers get started.

Contact