Jump to:

22998 Posts in 11853 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Sapphire framework

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2576 Views
  • Mo
    Avatar
    Community Member
    485 Posts

    Sapphire framework Link to this post

    Hi All,

    I am looking into making a browser based strategy game as a personal project and have been looking into frameworks to make my life easier.

    I considered Symfony, as it seems the most flexable of all the PHP ones (especially with its large range of databases supported), but it relies heavily in CLI to build its ORM and generally a lot more compex to work with than Silvstripe/Sapphire.

    I ae mulled it over, an I am fairly certain Sapphire has all the capabilities I would need for such a project. The majority of the work will be done via forms storing info into the database, then outputting that data in a Rich UI. What does everyone else think?

    Also, how difficult is it to separate Sapphire from the CMS? Can I just remove the CMS folder and rebuild the database (or better still, start a new project without it)? I know there was a topic on this a while ago, but I cant seem to find it.

    Cheers,

    Mo

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Sapphire framework Link to this post

    Hi Mo

    I'm sure you could achieve your goal using the sapphire Framework, although I never used it outside the SilverStripe context. I suggest you also have a look at the Zend Framework (http://framework.zend.com/) if you didn't do so already.
    It's a highly modular and mature framework with powerful DB abstraction, logger, and Server-Components. It comes with a JSON-RPC Server component (if you have a JavaScript client-app) or a AMF Component (if you plan to write your game-client in flash/flex).

    I really like the templating engine of sapphire and its auto-db table creation mechanisms, but these features could be redundant in a game project like yours. Maybe your client-app can't be based on templates and I'm sure you write your own DB/SQL code to get the best results.

    Anyway.. I wish you all the best with your project. It sounds like a lot of fun

  • Mo
    Avatar
    Community Member
    485 Posts

    Re: Sapphire framework Link to this post

    I have looked at Zend before, but didn't really get on with it, thought I cant remember why. I have been told in a few places "try Zend" so I am giving it another chance.
    <br >
    <br >At the moment it does seem a likely candidate, thought I also really like Sapphire's database model and templating. One big issue I am having however, is that if you remeve the CMS, then there seems to be no way to control routing. Is this the case?
    <br >
    <br >I am dfinatly going to give Zend a go for this project, but my issue is that I am fairly adept at Silverstripe, and although learning another framework doesnt bother me, I barely have enough time.... If only I could give up sleeping!
    <br >
    <br >Mo

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Sapphire framework Link to this post

    Hey Mo

    One big issue I am having however, is that if you remeve the CMS, then there seems to be no way to control routing. Is this the case?

    I'm sure routing works without the CMS part. The Director class is part of the sapphire framework.. it should be as simple as adding custom Director rules to your _config.php?
    Maybe one of the core-devs can help here?

    If you give the Zend Framework a try, make sure to install FirePHP (http://www.firephp.org/) and setup the FirePHP Logger http://www.christophdorn.com/Blog/2008/09/02/firephp-and-zend-framework-16/
    It's totally awesome to have the php log messages appear in the firebug console. You can even send objects or arrays to the log and view it directly in the browser.

  • Kalileo
    Avatar
    Community Member
    127 Posts

    Re: Sapphire framework Link to this post

    While I love SS as CMS and there is nothing better available, the underlying MVC framework has alternatives. No, not Zend or Symfony, the most flexible and most mature and advanced (IMHO) is CakePHP. I used it a lot and only found SilverStripe because CakePHP has no comparable CMS, at least not yet. (Please don't misunderstand, this is not meant at all as comparing cakePHP with Sapphire, I'm not ready to comment on that)

    2576 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.