X2O lets you build database-driven Adobe® Flex®, Flash® and JavaScript apps
without any server-side development. This is the blog.
Thursday, February 19, 2009
by Mustafa Shabib
Like many developers out there, I've tinkered with my fair share of JavaScript. Initially, like most everyone, I struggled with the DOM and blamed my problems on the terrors of the language. As time passes, however, I've become more and more impressed with the language. Chalk up many peoples' disdain to simple inexperience, unfamiliarity with its dynamic nature, the initial missteps in how the language was represented early on by Netscape, and the general glut of poorly written JavaScript.

I invite you all to check out Douglas Crockford's excellent survey of the language and dig deeper into his site for more valuable information. I share many of my feelings on the language with him and have learned a great deal from him about the language.

The more I've used JavaScript, the more confident I am that it's extremely well suited to developing most web apps. Its loose nature and dynamic abilities allow you to write clearly and concisely, especially when dealing with dynamic data exchange across the web. Its ubiquity and well implemented interpreters across web browsers gives you peace of mind knowing that your code will run as intended in most platforms (I'm talking about the language here, not necessarily how the browser allows you to interact with the DOM). Couple that with the new JavaScript Engine Wars (that are sure to bring great performance boosts), and we are sure to see some great uses of JavaScript in the near future...even more impressive than what's already showing up.

With this and the someday-coming enhancements that Brandon Eich talked about a long time ago, I've developed a client library for JavaScript that piggybacks on X2O, which provides a simple yet powerful data modeling system and an "it-just-works" backend. I've had a great experience putting together a few simple web applications with it.

A Quick Demo
Here is a simple recipe application entirely written in JavaScript, using the X2O framework to handle all the server-side integration. It's an almost-exact replica of our sample with code that we provided for Flex/AS3. Feel free to check out the markup and the JavaScript in the source code.

Some disclosures


  • We aren't obfuscating nor minifying/combining any of our generated script files at the moment. It makes debugging a lot easier right now.

  • Also, there are some pretty serious security implications that we haven't found a solution for yet. Aside from the fact that client-server data exchange happens by generating a dynamic script tag, you can stop the code at any point (e.g. Firebug), modify variables, and do some serious misbehaving. For now, these problems keep the JavaScript implementation from being a viable production-ready option for most applications. We would love to hear of any solutions, ideas, or recommendations any of you JavaScript experts can give us.

  • The actual generated JavaScript may not be the most efficient implementation you could come up with. Again, your thoughts and tips to make it better are very welcome.

We think this latest addition to X2O (which we'll be pushing out as part of the beta release in the near future) helps to elevate the use of JavaScript in your minds as, potentially (some day!), a viable language to use to develop your entire web application.

You don't need to create your own database, build stored procedures, write server-side code, or even integrate your code to data services. All of this is managed by X2O. Like our AS3 version, the mantra is the same: Generate your project, write your markup, your application logic, and upload your scripts, HTML, and resources to your server. Things may just work.

Labels: ,

Monday, February 16, 2009
by Mustafa Shabib
Has your X2O been sluggish and unresponsive? Does it mumble something when you ask it how its feeling? Does it complain of freezing cold even though it's wrapped in all of your warmest blankets as it lies on your couch watching daytime soaps?

Worse -- has X2O been randomly hanging when you try to login via the X2OManager.login() method?

It has!? Well, hot damn, so has ours. Looks like a nasty bug is going around!

So, we put on our face masks that we had left over from the last bird flu scare, snapped on our latex gloves, and dug deep to see what the problem was. We tracked down the issue to some extraneous logging code that we had written and have been testing all of our changes out on our dev servers for a couple of days now. Things are looking good and the patient seems stabilized (I know! These medical metaphors are getting forced!) and we'll be pushing up the changes real soon to everyone...

...along with a few other very exciting surprises that we'll be talking a bit more about in the near future.

[dramatic chords]

Labels:

Tuesday, December 23, 2008
by Mustafa Shabib
Happy Christmas/Kwanzaa/Hanukkah/Season to all of our users!

As an early gift, we've upgraded X2O and made it even easier to use than before! Adding relationships should be a little more intuitive and simple than it was in the last incarnation. We hope all of you can spend some of your downtime playing around with it and brainstorming some new ideas of what you can build with X2O...

In the upcoming new year, we're hoping to hold a small/fun competition of sorts to see what kind of great applications you guys are building with X2O. Hopefully this new update will make X2O an even more attractive foundation for your future projects.

Till next time!

Labels:

Monday, November 24, 2008
by Mustafa Shabib
Just messing around with X2O today and I noticed that you can inadvertently add entities as defined-types pretty easily. Once you mark an entity as a defined type, any new entity you add will have that check box checked by default, so if you aren't careful you will be adding those entities as defined types. This doesn't really hurt anything but is probably not what most data models need, so be sure to set that flag properly when you are adding entities, it will simplify and clean up your code and data model.

Just to be sure everyone understands what marking an entity as a defined type does, here's a link to the documentation on the topic:

http://docs.x2oframework.com/?section=p7_2

We're going to clean up this little bug (or is it a feature?) and make it so the check box is off by default each time you add an entity on a future update for X2O. Just wanted to give a heads up in the meantime.

Labels:

New to X2O?
Here's how to get started...
Subscribe to our RSS feed


Recent Posts
Previous Months
Also from the makers of X2O