concrete5 from developer perspective

25
concrete5 from developer perspective concrete5 café - 28.10.2014 Antti Hukkanen / CEO, Mainio Tech Oy www.mainiotech.fi

Upload: mainio

Post on 15-Jul-2015

927 views

Category:

Software


0 download

TRANSCRIPT

concrete5 from developer

perspectiveconcrete5 café - 28.10.2014

Antti Hukkanen / CEO, Mainio Tech Oy

www.mainiotech.fi

Topics

1. Mainio Tech (About us)

2. concrete5 in General (for non-

concrete5’ers)

3. Comparison (vs. Drupal, vs. WordPress)

4. concrete5.7 (The future of concrete5)

Mainio Tech

• Founded 2011

• Small office of a couple of developers in Lauttasaari, Helsinki

• Focus on technology

• All website projects with concrete5

• Personally actively using concrete5 since2010 (v5.4.0.5)

concrete5 in General

Page Types / Page Templates (5.7)

• Every site consists of different pages with differentstructure

• Page types/templates generalize this into pre-made ”templates” that give the structure to a page

Areas & Blocks

• Each page type in concrete5 consists of editable areas

• Blocks are like ”lego blocks” that can beplaced into any areaof any page

Blocks• Blocks map the real life

concepts into reusable”content builder” elementsthat can be placed in areas

• Allows the developer to create any kind of editingUI for specific type of content

Attributes• Attributes generalize the ”fields” concept for

any type of object– Internal objects that take advantage of attributes:

Page, File and User

• Allows the on-the-fly creation of new attributesfor any object that utilizes this architecture. Can be defined through the UI.

– E.g. ”we need our users to tell us their names” or”we need the ability to tag all our files”

• Attributes are typed into specific types, e.g. text, boolean, date/time, select, file, etc.

– Developers can create own attribute types that canbe attached into any object that use the architecture

Single Pages

• Single purpose pages with view layer and controller

– E.g. registration, login, dashboard pages, etc.

• ”Using concrete5 as a framework”

• Mainly used to build dashboard functionality

• Not great for multilingual sites

– Page types are better for ML sites, they also providethe same kind of architecture (view-controller)

Packages• Everything can be ”packaged” in concrete5

– Blocks

– Page Types

– Page Templates (5.7)

– Single Pages

– Themes

• Packages are used to make general purposefunctionality available for multiple sites (compareto Drupal modules, WordPress plugins)

Some Technical Points

• MVC– Blocks (view-controller)

– Page Types (view-controller)

– Single Pages (view-controller)

• Overrides architecture allows overriding anypart/file of the core

• Database abstraction layer (ADODB in 5.6, Doctrine 2 in 5.7->)

+ Lots more…• Functionality that helps in building online communities

– Originally lots of the framework behind concrete5 was developed for this purpose

• Stacks for reusable content

• Flexible permissions structure

• Workflows (enterprise use)

• Jobs architecture for (recurring) automated tasks

• Caching layer

• + Wide range of add-ons– Not as many as with Drupal or WordPress (which is not necessarily a bad thing)

– Many add-ons are paid but very reasonably priced ($15-100) and the commerciallicense allows full code modification for the project where they are used, one licenseper project

Comparison

concrete5 vs WordPress• WordPress = ”Printing Press”

• concrete5 = ”Word Processor”

• Solving the problem from different perspectives– WP: CMS bolted on top of blogging platform

– C5: Built from bottom up to be a bridge betweendevelopers and site owners

• concrete5 is more flexible in terms of the contentstructure of a page and also in terms of being a developer framework

Concepts: concrete5 vs WordPress

concrete5 WordPress

Attributes N/A

Blocks Widgets (although they servea different purpose)

Packages Plugins (and Themes)

Page Types Templates

Stacks Sidebars

Themes Themes

concrete5 vs Drupal• Drupal = ”Developer toolbox with CMS functionality”

• concrete5 = ”User friendly CMS with developer framework”

• Setup process is much more ”lean” and you can get a site up and running much quicker in concrete

– Drupal: ”For a basic site, you need module A, B, C, D and E, and also need to know how they allwork together”

– concrete5: Install and start building

• Easier to teach– concrete5 works truly through an in-context editing interface. In Drupal, the user experience is

much more confusing to a newbie (as of my own experience, prior to drupal8). Probably the overallexperience is still better in c5 when comparing concrete5.7 vs drupal8, although drupal8 introducesinline editing.

• MVC– Has much of do with preferences but many developers prefer MVC

– It usually keeps the codebase much cleaner, more understandable and more easily approachable(my personal opinion)

Concepts: concrete5 vs Drupal

concrete5 Drupal

Attributes Fields, Taxonomies

Blocks Blocks

Packages Modules

Page Types Content Types

Stacks Panels

Themes Themes

Where to use concrete5?• Short answer:

– Content and design driven web projects

– Online communities

– Or basically anywhere, there is not a reason why concrete5 would not fitsome problem scope but we ourselves would rather tailor complex webapplication on top of a framework (more flexibility)

• Longer answer:– concrete5 shines in design-centric sites that require lots of different

types of content

– When making pixel perfect sites that are easy to edit for the end user

– When you want to deliver solutions that the end user is able to use

concrete5.7

New functionality in 5.7

• Full in-context editing

• New image editor

• Conversations (for building forums,

commenting, etc.)

• Groups can now be hierarchical

Different in concrete5.7

• Page Types and Page Templates

• ”Tools” no longer exist

– Use custom routes and custom controllers insead

• Directory structure

• General structuring of the code

– Most backend stuff now lie in the /src directory, except for the controllers

Developer updates in concrete5.7• New era of PHP finally reaches concrete5

– Composer

– Namespacing

– Code styling: PSR-2 & PSR-4 + generally better code guidelines (e.g. for writing JS and CSS)

– Autoloading (PSR-0)

• Symphony framework components replace some of the old homebrewcomponents

– Routing layer

– Events layer

– Request, Session & Cookie libraries (Symphony HttpFoundation)

• Doctrine ORM for DB abstraction– Not currently very widely used, even in the core

Other new developer stuff in 5.7

• Built-in assets system (CSS/JS minificationand combining, dependecy management)

• Authentication layer for building 3rd party authentications

• New taxonomy: Topics

– E.g. categorization of Blog Entries or Projects(examples in the default 5.7 installation)