One of the reason I like SmartFoxServer over ElectroServer

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

Post Reply
hw2002
Posts: 6
Joined: 06 Aug 2011, 10:28

One of the reason I like SmartFoxServer over ElectroServer

Post 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]
User avatar
levancho
Posts: 71
Joined: 27 Jun 2011, 16:03

Post 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 .
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply