Your SlideShare is downloading. ×
  • Like
Silverstripe 2.4-highlights-gpmd
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Silverstripe 2.4-highlights-gpmd

  • 1,692 views
Published

 

Published in Self Improvement
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,692
On SlideShare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
18
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Created by: Jamie Neil,Technical Director, GPMD Ltd SilverStripe 2.4 Highlights
  • 2. Contents
  • 11. Installer
    • Simplified
    • 12. Choice of databases
      • Requires correct module is pre-installed
    • Sets default language
    • 13. Cached install page problem seems to be fixed
  • 14. SiteConfig
    • Site wide user configuration
      • Interface located in root of Site Content tree
    • Accessible in templates as $SiteConfig.Value
      • e.g. $SiteConfig.Title
    • Defaults:
      • Title – Used as site name
      • 15. Tagline – The site strapline
      • 16. Theme – allows theme to be selected by user
    • Extendible through DataObjectDecorator
  • 17. Extending SiteConfig SiteConfigDecorator.php: class SiteConfigDecorator extends DataObjectDecorator { function extraStatics() { return array ( 'db' => array ( 'Copyright' => 'Varchar(255)' )); } function updateCMSFields(& $fields ) { $fields ->addFieldToTab( "Root.Main" , new TextField( "Copyright" , _t( 'SiteConfig.COPYRIGHT' , "Copyright" ))); } } _config.php: DataObject::add_extension( 'SiteConfig' , 'SiteConfigDecorator' );
  • 18. Nested URLs
    • Makes site URLs match SiteTree
    • 19. Useful for sites with large numbers of pages or complex hierarchies
      • e.g. /locations/london/contact-us
    • Setup added to _config.php by installer
      • SiteTree::enable_nested_urls();
      • 20. May be disabled if old style flat URLs preferred
    • Many thanks to Andrew Short
  • 21. Security
    • Delete Members!
      • Previously only removed from groups
      • 22. Interface located in root of Security Groups tree
    • Use Roles to bundle permissions
      • Useful for more complex security requirements
      • 23. Roles can only be assigned to Groups
    • Bulk import Members and Groups
      • CSV format
  • 24. Files & Images
    • Manual asset discovery
      • “Look for new files” button
      • 25. No longer triggered automatically on clicking tab
    • Unused files removed (at last!)
      • Never really worked properly
      • 26. Caused serious memory problems with big folders
    • Install DataObjectManager for more options...
  • 27. DataObjectManager (DOM)
    • Extension to ComplexTableField
      • Now updated for 2.4
        • http://carlinowebdesign.svn.beanstalkapp.com/modules/trunk/
      • Adds column sorting, live search/page sizing, custom filtering, and drag/drop ordering
      • 28. Can be nested if required
    • File and Image DOM classes add further features
      • Thumbnails, image labels and file type/size filtering
    • Features should really be part of core CMS
  • 29. Shortcodes
    • Fields can now use BBCode style Shortcodes
      • [shortcode]
      • 30. [shortcode arg="example" /]
      • 31. [shortcode]enclosed content[/shortcode]
    • Used by SiteTree to handle internal links
      • e.g. A link to a page with an ID of 42 would use
      • 32. [sitetree_link id=42]
      • 33. Means that changes to url segments or even position in sitetree won't break links
  • 34. Registering Shortcodes Page.php: class Page extends SiteTree { public static function test_shortcode_handler( $args ) { if ( isset ( $args [ 'string' ])) { return strrev( $args [ 'string' ]); } } } _config.php: ShortcodeParser::get( 'default' )->register( 'page_test' , array ( 'Page' , 'test_shortcode_handler' ));
  • 35. Alternative Databases
    • No longer restricted to MySQL
      • Still the default though
    • Modules available for:
      • Microsoft SQL Server 2008
      • 36. PostgreSQL >= 8.3
      • 37. SQLite3
  • 38. Performance
    • Site Content tree optimisations
      • Makes admin UI usable with larger trees
    • Files & Images memory usage cut
      • No problems with large numbers of assets
    • Support for Microsoft WinCache
      • PHP bytecode cache
    • Partial template caching
      • In addition to static publisher
  • 39. Partial Caching
    • Allows caching of parts of a template
      • More flexible than static publishing
    • Cache until TTL expires (default 10 mins)
    <% cached %>$DataTable<% end_cached %>
    • Each cache block has a cache key
      • Comma separated list of tokens
      • 40. Contents are recalculated if key changes
    • Key includes template name and SHA1 hash
      • So cache is refreshed when templates are edited
  • 41. Partial Caching Examples
    • Cache until page is changed
    <% cached LastEdited %>Lots of page content<% end_cached %>
    • Login box
    <% cached 'loginblock', CurrentMember.ID %>
    • Nesting
    <% cached LastEdited %> Lots of cachable content <% cached Member.ID %>Hello $Member.Name<% end_cached %> <% end_cached %>
  • 42. More Partial Caching
    • Aggregates
    <% cached 'categorylist', Aggregate(Category).Max(LastEdited) %>
    • Conditionals
    <% cached if Busy %> <% cached unless CurrentUser %>
    • Cannot be used inside If and Control blocks
      • RelationshipAggregates may be used instead
    <% cached RelationshipAggregate(Children).Max(LastEdited) %>
  • 43. i18n
    • Translatable now stable after 2.3 issues
      • i18n::set_locale('en_GB');
      • 44. Translatable::set_default_locale('en_GB');
      • 45. Object::add_extension('SiteTree', 'Translatable');
    • Each language has a different site tree
      • But they still share same URL space
      • 46. Adding root language pages can help
        • e.g. /en/ and /fr/
  • 47. Others
    • JSParty replaced with thirdparty folders
      • jQuery 1.4 + jQuery UI 1.8
      • 48. Zend (Date, Log, Currency, Cache)
    • Broken Links Report
    • 49. Dependent Pages
    • 50. ModelAdmin stable
    • 51. Lots of bugs fixed!
  • 52. Contact GPMD Ltd http://www.gpmd.co.uk [email_address] Tel: 020 7183 1072