Page 1 of 1

One of the reason I like SmartFoxServer over ElectroServer

Posted: 12 Aug 2011, 19:21
by hw2002
The team who developed the API client for AS3 knows how to code AS3 style instead of this bullshit sorry.

Code: Select all

var room:Room = _es.managerHelper.zoneManager.zoneById(e.zoneId).roomById(e.roomId);
etc.

This is not the best approach to make things easy for anyone.

You need to go through many methods to catch what you need.

But for SmartFoxServer it's very beautiful.

Code: Select all

var username:String = loginPanel.ti_username.text;
var request:LoginRequest = new LoginRequest(username);
sfs.send(request);

Code: Select all

sfs = new SmartFox(true);
sfs.roomList
sfs.roomManager.ownerZone
etc. :D

So thank you very much for this.

Easy to use :)[/code]

Posted: 14 Aug 2011, 05:12
by levancho
I have nothing agains smartfox and actually I also do prefer it over electroServer but what you are referring as "bullshit"

Code: Select all

var room:Room = _es.managerHelper.zoneManager.zoneById(e.zoneId).roomById(e.roomId); 
is actually called http://en.wikipedia.org/wiki/Fluent_interface and its a quite trend nowadays, makes code more readable.

on the otherhand I agree smartofox has quite good API .

Posted: 17 Aug 2011, 13:22
by Lapo
Yep... actually one of the intentions at the core of SFS was to simplify the API as much as possible.
AS3 has very nice getter/setter syntax which is more effective than good old java-like getThis(), getThat() style, which seems to have inspired the style of ES.

Thanks