Thursday, 30 June 2011

Digging deeper into Google+ or why it can be very big thing

Simply put, Google+ is to fight Facebook

Main business model is (well, who was doubting it!) - online ads

Why Google+ can be big thing?

Small story. Luckily I've received an invitation today to Google+ so I could try it out.
Invitation came from ... Won't tell the name, ok?
But he is a big guy (the big tech guy behind Red Hat, hi5, LinkedIn and now Google (10 months)).
Why would I receive an invitation from him? Well, he is the biggest guy behind Apache Shindig and
OpenSocial. That's why (I am also quite active here). When I entered Google+, I realized that he is in Google now and he is one of the people behind Google+ :). I got as well an invitation from another OpenSocial/Shindig guy who is also in Google.

As I looked closely at the interface, I realize that it is nothing but the implementation of OpenSocial specification.
1. Circles are exactly OpenSocial groups - Family, Acquaintances, Friends, Following.
That's the main (and cool!) difference from Facebook where everybody is a friend (which often does not make sense at all)
2. Activity Streams - standardized in OpenSocial 2.0. These Streams are connected to Groups or a Person.
3. Albums - standardized in OpenSocial

I do not know if they already opened the apis to these things, but it is exactly OpenSocial thingy, so I am quite sure they will.
This means their data is interoperable with LinkedIn, hi5 and all others OpenSocial compliant containers - all but Facebook.

That's about connections to OpenSocial. So why it can be a big thing?

1. OpenSocial gadgets and APIs are to come (for sure). They are open vs. closed Facebook-own APIs.
2. Google has a big luggage of cool things and services already and they will be integrating it within Google+.
    a) they integrated google talk chat already.
    b) Picasa photoes are integrated
    c) They integrated your contacts from gmail
    e) How about sharing a google calendar with a circle ?
    f) How about gmail, sending emails to a circle ?
    g) How about Google docs shared within a circle ?
3. A lot of people already use google tools and Google+ allows to take advantage of sharing these tools with people (circles), making these tools social. Facebook actually does not have any tools. I can't imagine using Facebook with my colleges, for example.
4. Everybody is using google as a start page, and now you get this Google+ at a starting page. Why would you go to Facebook ?
5. Google has very nice, simple and intuitive interface!
6. Google has a lot of data about his users, which means recommendations/suggestions can be very precise :)
7. Hehe - you can actually export all your facebook friends :)

In any case. As in any Google application, there are a lot of techy and nice visual things to re-use in building web applications. See multiple selections and drag-and-drop, for example.

Long life to Google.

I have no relation to Google (I'd like it to but I don't, at least for now)

Wednesday, 22 June 2011

Why is JavaScript 2.0 the Next Big Language?!

2007 forecast is turning into reality.

Why JavaScript ?

Everything below is my personal opinion and experience (I am just a researcher at university,
no company interests involved :)). You are free to agree or disagree.

It is already big thing. It is in every browser, on every mobile, in palm's WebOS you can run it natively. There is a lot of work around "JavaScript outside the browser" going on (CommonJS, Node.js, Rhino on Rails). If you know JavaScript, you can code browsers, Web servers, mobile, 2D and 3D graphics, anything!

Some people say: "It's not serious language". Well this language is used to build Google Maps for you, Google Docs, Facebook. If that's not a serious projects, maybe Google should concentrate on some other serious stuff?

Most of JavaScript code is open source. It's running in browser and it's an interpreted language you can easily get the code and run it yourself.

If someone does web development, he has to know javascript. That's THE language to be used on the client (you just don't have a choice). On the server side - well that's up to you! You can choose Java, Ruby, PHP, Python, Scala, whatever. But think, that's one more language to learn.

I personally use now (due to the project requirement) Ruby and Java on the server (before it was also PHP). That's OK for me (cause I've already done it), but it's a pain when new student comes and ... I tell him: "here are four languages you have to learn now - Ruby, Java, PHP, JavaScript". That's a lot for one single student. Of course, one could say - "if you know one language, it is ok to learn another one". Well, that's true but in addition to a language you need to learn a framework for it. And even simply few languages is a lot for a person. It's much easier to say: "Learn JavaScript and you are done", right?

Write code only once
I've been coding for Web for quite some time now. I do heavy client side applications and unfortunately sometimes I need the same functionality both on the client and on the server. Well for now I have to implement a thing in Ruby and then re-implement it in JavaScript or vice-versa. That's a real pain! With JavaScript everywhere, I don't need it any more - I write every function only once!

JavaScript is an interpreted language. Which means that it is supposed to be much slower, than compiled languages (C, Java), and get into category of Ruby/Python/PHP.

JS is around 3-10 times slower than Java while Ruby is 10-30. See this benchmark study:
This is due to special optimizations done by Google and other browsers. The constant rivalry between browsers makes the JavaScript engines faster and faster every day.

There are discussions (and implementations!) about introducing static types to javascript, that would make its performance the same as compiled languages.

Actually JavaScript is a very nice language. Many people used to see it as a hacky not-reliable language, but many things have changed since its first introduction in Netscape. I (and many will agree with me) find it as a nice, elegant language. If you disagree, get a good book and start reading it :)

It is so easy to start. Just run the Chrome browser. Right click -> Inspect Element -> Console tab. You got it! Just type the code 8+5-7 and hit the Enter. You'll see 6 as a result. It was easy, right?

Google behind and others
Google is a big pusher for JavaScript. Having a big company behind the language is almost often language success (Java, as example). There are many others to help Google here (Joyent, Mozilla, Opera, etc.)

JavaScript is THE language for Web development

Some people claim Scala to be the Next Big Language. Well, I doubt it. I find it very cool and I would definitely prefer Scala to Java. Maybe it will get accepted in some areas, but I don't think in Web development. I personally do not want to learn an additional language. I am fine with only one. I do not want to rewrite my code for both Scala and JavaScript. Remember - I have to do it for JavaScript, no choice here :)

If you are creating a web application, very often language speed does not matter that much. The most important thing is the memory management and JavaScript has a super-cool thing here called Node.js It is an event-driven server-side JavaScript based on fastest V8 JavaScript engine from Google. This is THE WAY to go today and this is one more big PLUS for JavaScript.

If you are to learn a programming language and you have a slightest feeling you might need to do some work for the browser, pick up JavaScript!