Skip navigation.

My Opera News

Behind the scenes at My Opera community

New backend features in Banana

, , ,

The Banana release has been out for 2 weeks now. It seems to have been one of the happiest upgrades that we've ever had in a while. Not that it's without bugs, of course, but...

EspenAO already told you about some of the changes that went into Banana.

We'd like to tell you about some other stuff, more from the "engine-room".

Captcha

We have a brand new captcha module, based on ReCaptcha. This took a while to make, because we built a generic Captcha module, that will allow us to use any captcha system out there if we need to switch. We find ReCaptcha very good so far. Some people of course disagree, but the old "string-only" captcha was far too easy to break, and our community/spam moderators had a hard time cleaning up the spam at times.

Legitimate users shouldn't have any big problem with it. In any case, if you're worried about comments in your blog, invite people to join My Opera, so they won't see any captcha anymore :-)

New static server

New users that upload their avatar or profile picture will probably notice (or probably not, if things work correctly) that their new picture is now served from http://static02.myopera.com. Now we have in fact 2 static servers, static01 and static02.

This is the first successful partitioning experiment on MyOpera. This means that some part of our users will see their pictures being served from static01.myopera.com, while others, tipically new users, will go to static02.myopera.com.

This is made possible by our Storage classes, that allow us to move users content around without too much work.

New Javascript framework

To modernize and improve the usability of My Opera, we officially adopted the YUI framework after carefully evaluating several available js frameworks out there. The last two contenders were jQuery and YUI. We chose YUI for several reasons, but they were very close as per speed, features and overall quality.

We were already using YUI in the past, but it wasn't really used that much, and it was an older version anyway. Now we also built a custom js library that "wraps" around YUI, so we don't use it directly, but we access its core functionality with our functions. An example is the new blog import tool. Example:


// JavaScript for the Yahoo 360 blog import page (/community/import/)
O.load_framework_dependencies(
    ['connection','selector'],
    init
);

function init() {
    O.add_event(
        'form[name="blog-import"]',
        'submit',
        blog_import
    );
}

// Form submit handler. Makes the ajax call to the Y360 blog preview script
function blog_import(e) {
    O.prevent_default(e);      // avoid double posting
    O.show('#spinner');
    // ...
    O.ajax(
        form.action,
        {
            success: show_preview,
            failure: preview_failed
        },
        data,
        {method: 'POST'}
    );
}

It allows us to write very clean js code, and tries to reasonably decouple the YUI libraries from our own code. O. stands for Opera library.
O.add_event() is the generic function that of course works for all browsers, to add a new event to the DOM.
O.ajax() is the XHR ajax wrapper, and so on...

This abstraction will also allow us, if needed, to use parts of different frameworks very easily, and even switch to a different framework in the future. But we might not want to do that, I hope.

More stuff

There is new exciting stuff already out that we can't talk about, because it has to do with new features we have right now in our development version of My Opera, but they will be out probably with next release.

Markup changesOpera Unite release day

Comments

Tamil 2. June 2009, 16:17

Dacotah 2. June 2009, 16:19

:cool:

Dacotah 2. June 2009, 16:20

:sst: The "News" tab doesn't show up on top of this page. Hmmm...

Amnith 2. June 2009, 16:21

Noooooooooo! Tamil ate the Banana :frown:

Tamil 2. June 2009, 16:22

Dacotah 2. June 2009, 16:23

:lol:
banana banana banana banana banana banana

drlaunch 2. June 2009, 17:35

Originally posted by CSTREP:

and even switch to a different framework in the future. But we might not want to do that, I hope.


Why not? What if a new framework does everything the old one did but much faster, requiring less processing power and let's you swim in women like Eminem?

Schalandra 2. June 2009, 18:14

Good to know. Thanks alot for your efforts. :smile:

(and I'll have a look into YUI...)

cstrep 2. June 2009, 19:06

@drlaunch: what I meant was that we are building our libs to allow switching to a new js framework, but it would be nice to keep what we have chosen, since we will need to go over all the My Opera js code to refactor and improve it... :-)

drlaunch 2. June 2009, 19:35

Ah I get it. Switching would be a lot of work.

But admit it. It would be worth it if you could swim in women, right?

Amnith 2. June 2009, 20:20

That truly depends whether you will get Bruno's butt in your face or not.

Chas4 2. June 2009, 21:41

banana

:cool:

who has the truck full of :nanners: for Tamil?

ZAHEK 4. June 2009, 12:53

:smile: +1

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.