Symfony vs. Integrating products when to use a framework



Similar documents
Symfony2 and Drupal. Why to talk about Symfony2 framework?

Everything you ever wanted to know about Drupal 8*

Open Source Content Management System for content development: a comparative study

All the materials and/or graphics included in the IceThemetheme folders MUST be used ONLY with It TheCityTheme from IceTheme.com.

Vincent Gabriel. Summary. Experience. Senior Software Developer at Landmark Network

Drupal CMS for marketing sites

Content Management Systems: Drupal Vs Jahia

Bubble Code Review for Magento

Choosing a Content Management System (CMS)

Top Navigation menu - Tabs. User Guide 1. &

Magento 1.3: PHP Developer's Guide

Content Manager User Guide Information Technology Web Services

Absolute Beginner s Guide to Drupal

eyeos Web System User Manual

Faichi Solutions. The Changing Face of Drupal with Drupal 8

Adobe Flex / Zend for Content Management

Things Made Easy: One Click CMS Integration with Solr & Drupal

skype ID: store.belvg US phone number:

Localizing dynamic websites created from open source content management systems

Abdullah Radwan. Target Job. Work Experience (9 Years)

Shop by Manufacturer Custom Module for Magento

SMSNotify Extension. User Documentation. Automated SMS sender and customer relationship tool. SMSNotify User Documentation 1

Instant Chime for IBM Sametime Installation Guide for Apache Tomcat and Microsoft SQL

Open Source Content Management System JOOMLA

Lesson 7 - Website Administration

Web Development. How the Web Works 3/3/2015. Clients / Server

Joomla/Mambo Community Builder

Version USER GUIDE

Volkov Vyacheslav. Summary. Saransk, , Mordovia, Russian Federation Moscow, Russian Federation +7(925) , +7(917)

Official Amazon Checkout Extension for Magento Commerce. Documentation

Site Store Pro. INSTALLATION GUIDE WPCartPro Wordpress Plugin Version

MyanPay API Integration with Magento CMS

What s really under the hood? How I learned to stop worrying and love Magento

The Open Source CMS. Open Source Java & XML

JBoss Portal 2.4. Quickstart User Guide

Content Management Software Drupal : Open Source Software to create library website

Magento module Documentation

Content Management Systems: Drupal Vs Jahia

9 Tried and Tested Tips to Increase the Power of your Magento Store

DROPFILES SUPPORT. Main advantages:

PHP on IBM i: What s New with Zend Server 5 for IBM i

Build it with Drupal 8

KEYSTONE JS FOR DRUPAL DEVELOPERS

Drupal Performance Tuning

Guide PHPro Exclude Category From Minimum Amount Module

ultimo theme Update Guide Copyright Infortis All rights reserved

Table of Content. 1. Mofluid Installation. 2. Mofluid Uninstallation. a. Magento Connect b. Manual Installation

Website User Guide.

User s manual. Magento extension. BCP - Better Configurable Products

skype ID: store.belvg US phone number:

A Close Look at Drupal 7

FireBLAST Marketing Solution v2

MASTER DRUPAL 7 MODULE DEVELOPMENT

Cloud Powered Mobile Apps with Azure

I. Delivery Flash CMS template package II. Flash CMS template installation III. Control Panel setup... 5

UW- Madison Department of Chemistry Intro to Drupal for Chemistry Site Editors

Hacking the WordpressEcosystem

ProjectPier v Getting Started Guide

Installation, Configuration, and Usage

Auditing Drupal sites for performance, content and optimal configuration

Document Freedom Workshop DFW 2012: CMS, Moodle and Web Publishing

MAGENTO Migration Tools

INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP

IBM Endpoint Manager Version 9.2. Patch Management for SUSE Linux Enterprise User's Guide

5 Mistakes to Avoid on Your Drupal Website

Elgg 1.8 Social Networking

Document OwnCloud Collaboration Server (DOCS) User Manual. How to Access Document Storage

Trainer name is P. Ranjan Raja. He is honour of and he has 8 years of experience in real time programming.

Content Management System - Drupal. Vikrant Sawant (vikrant.sawant@lc.ca.gov) Legislative Data Center, California

Drupal 8. Core and API Changes Shabir Ahmad MS Software Engg. NUST Principal Software Engineser PHP/Drupal

Is Drupal secure? A high-level perspective on web vulnerabilities, Drupal s solutions, and how to maintain site security

OmniUpdate Training. (Beginners) University Web Team. Contact Information: Content Management System (CMS): OmniUpdate (OU Campus):

Cloud Powered Mobile Apps with Microsoft Azure

Version 4.0 MageB2B Pricesystem ReadMe AIRBYTES GmbH

More details >>> HERE <<<

Communiqué 4. Standardized Global Content Management. Designed for World s Leading Enterprises. Industry Leading Products & Platform

Drupal 8 The site builder's release

Create e-commerce website Opencart. Prepared by : Reth Chantharoth Facebook : rtharoth@yahoo.

ultimo theme Update Guide Copyright Infortis All rights reserved

SAHARA DIGITAL8 RESPONSIVE MAGENTO THEME

Oracle Application Express MS Access on Steroids

Drupal 6 to Drupal 7 Migration Worksheet

USM Web Content Management System

PES. TWiki at CERN Service Evolution. Platform & Engineering Services. Terje Andersen, Peter Jones for IT-PES-IS Jan 2014

SplendorNet. Pvt. Ltd. www. www. www. Riding The Future. Portfolio. You could say, we do it all... (and you'd be right.)

FormAPI, AJAX and Node.js

Livezilla How to Install on Shared Hosting By: Jon Manning

HOW TO CREATE THEME IN MAGENTO 2

ekomimeetsmage Manual for version 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0

Prestashop Ship2MyId Module. Configuration Process

Content Management System

CS3051: Digital Content Management

SuiteCRM for Developers

X-POS GUIDE. v3.4 INSTALLATION SmartOSC and X-POS

Iceberg Commerce Video Gallery Extension 2.0 For Magento Version 1.3, 1.4, 1.5, 1,6

Transcription:

Symfony vs. Integrating products when to use a framework Xavier Lacot Clever Age

Who I am Symfony developer since end 2005 Several contributions (plugins, docs, patches, etc.) Manager of the PHP Business Unit of Clever Age Clever Age - http://clever-age.com/ Based in Paris, Bordeaux and Lyon, ~70 people Technical architecture expertise Development, Consulting / training / etc. 2

Contents A (web) developer's life? The choice of a technical architecture A practical sight on CMS and framework's code Howto... Integrate Symfony within other products A CMS with Symfony in less than one day Publication time : clevermedialibrary 3

A (web) developer's life http://www.flickr.com/photos/nathonline/918128338 4

A developer's life Web projects cover a large panel Content management Social networks Customer Relation Management Communication Collaborative File sharing Specific applications In almost every web project, a developer will loose some hair 5

A developer's life Wide range of difficulty 5 days of html integration for a small «webpage» 1000+ development days using a framework for a social/2.0 platform Often, the right solution does not exist! 6

A developer's life The developer has the choice between a lot of tools Frameworks Integrated (open source) products The bad : Integrated (closed-source) products The worse : closed-source frameworks 7

A practical sight on products and framework's code What do I mean with «products»? CMS, forums, CRM tools, blogs, photo gallery, etc. Not designed as development platforms, but as usable tools Usually only available as packages archives (zip, tar.gz) Not based on a framework 8

A practical sight on products and framework's code...and with «frameworks»? Not «functionalities-oriented» Created as a development platform DIY do it yourself 9

for instance, Symfony Symfony, a «full options» framework cli mvc ajax crud cache events routing +600 plugins performance documentation admin generator internationalization unit and functional tests ORMs (Propel or Doctrine) 10

The choice of a technical architecture 11

The choice of a technical architecture Several considerations Complexity of the project (workload, features, scalability) Development methodology Is there a lot of personnalisation? Adding functions Removing functions Do plugins/extensions exist, that cover the requirements? 12

Integrating products Integrating products is a good idea It may save time, money, and pressure It may help building a better application At least the client will get the product's feature set Don't always re-invent the wheel! Perfect solutions for common needs the hell is that client rarely have common needs! 13

Integrating products Possible options : Change some code : Change code + submit ticket : lot more work (contributions needs to be clean) Not sure it is accepted Create extensions when possible issues with future upgrades These products are not designed for developing! Drop the product and code yourself Clearly define the project 14

«CMS are good to make simple websites that are mainly meant to be looked at, while frameworks are good to make complex websites that are meant to be interacted with» 15

The choice of a technical architecture 16

The choice of a technical architecture Magento Commerce is a sort of success story Based on Zend Framework Overhealmed OS Commerce in 2 years 17

The choice of a technical architecture Gold rules Think simple not a overload of useless functions Backend must be easy to use WYSIWYG editor Adapted widgets Follow standards never hack up Documentation! Open the development : search contributors Release often 18

The choice of a technical architecture The equation is simple : Time to hack vs. Time to build What do you prefer in your life? 19

A practical sight on products and framework's code 20

A practical sight on products and framework's code The quality largely varies Security A common design pattern (MVC?) Portability (database, etc.) ORM Developer tools / Technical documentation Performance API Object-oriented Standards compliance 21

For instance : Drupal architecture request Drupal core hook() Modules hooks Theme engine Theme engine (*.tpl.php) response 22

For instance : some Drupal facts Forms validation w00t if (!empty($form_values['departing']) && ( $departing < $date )) { form_set_error('departing', t('the departing date isn\'t valid.')); } We love documentation... function node_form_submit($form_id, $form_values) { global $user;... and also SQL queries! db_query('delete FROM {node} WHERE nid = %d', $node->nid); db_query('delete FROM {node_revisions} WHERE nid = %d', $node->nid); ~70 000 lines of PHP code, ~75 files only... 23

A practical sight on products and framework's code Overall criticism : Poorly (well, not) OO No MVC, Modules are a mess No native developer tool, core code is not commented No ORM. The «database layer» main usage is to map «drupal_query()» to db specific functions Forms management is archaiq Writing modules might turn into a nightmare 5000 lines+ of code in a single file, etc. From a purely technical point of view : #FAIL 24

A practical sight on products and framework's code Positive points: It works out of the box If there are very few customizations to do, then it is the prfect solution (no development at all) There is a huge community Lots of contributions /!\ mot of them are unusable!!! The «client effect» always works 25

So how to take profit out of both? 26

How to integrate Symfony with other products Consider the following context Very large company Non-technical people High content management requirements A big part of the site is a custom development We do not have a lot of days...a common situation 27

How to integrate Symfony with other products Facts: Not possible to develop everything Using the CMS as the development tool won't help => let's integrate Symfony! Several ways: Include-based integration Several Apache mountpoints XMPP-based communication 28

How to integrate Symfony with other products Module A Symfony Module B... cms module databases Drupal install 29

How to integrate Symfony with other products routing.yml, last rule : drupal: url: /:uri param: { module: cms, action: drupal } requirements: { uri: ^(.)*$ } Cms module / executedrupal() : public function executedrupal(sfwebrequest $request) { ob_start('drupal'); include(sfconfig::get('sf_root_dir').'/lib/drupal/index.php'); $this->return = ob_get_flush(); } 30

How to integrate Symfony with other products Second solution, XMPP calls for db synchronisation (huge work, but w00t): Drupal install XMPP server (Openfire) Symfony Uses pubsub as data format 31

The one-development-day Symfony CMS 32

A minimal CMS What is a minimal CMS? Backend Users management, Possibility to create pages at certain urls Posibiliy to put content in these pages Media management Frontend Ability to display informations 33

A minimal CMS Backend components sfdoctrineguardplugin clevermedialibraryplugin some tables for the model: content: id: displayed_author: title: body: created_at: created_by: publication_status: published_at: published_by: updated_at: updated_by: meta_description: meta_keywords: varchar(150) varchar(255) longvarchar timestamp { type: integer, foreigntable: sf_guard_user, foreignreference: id } varchar(20) timestamp { type: integer, foreigntable: sf_guard_user, foreignreference: id } timestamp { type: integer, foreigntable: sf_guard_user, foreignreference: id } longvarchar longvarchar 34

A minimal CMS : frontend highlights «catch-all» routing rule in routing.yml # for html pages cms: url: /:uri.html param: { module: cms, action: view } requirements: { uri: ^(.)*$ } # for all other defined url cms_garbage: url: /:uri param: { module: cms, action: view } requirements: { uri: ^(.)*$ } 35

Publication time : clevermedialibraryplugin 36

Objectifs An enterprise solution for managing media Supports a large number of file formats Images, videos Documents etc. Storage abstraction Media management API Metadata support Search (tags + index), credentials Performance 37

Formats de fichiers supportés Images, whatever the type (jpg, gif, png, etc.) Several adapters are available: Imagemagick tools GD PDF documents Office documents OpenOffice MS Office Uses PUNO (PHP OpenOffice UNO bridge) not stable Videos Ffmpeg / imagemagick 38

Schema GD adapters Adapter ImageMagick handler PUNO... Adapter Image handler PDF handler Office... handler handlers Model classes clevermedia File storage abstraction - cleverfilesystemplugin 39

File storage abstraction cleverfilesystemplugin (1/3) Adapters set Disk FTP S3 contributions are welcome! The API is classical Statistics: exists / getsize / isdir / isfile Directories operations: mkdir / listdir / File operations: write / unlink / rename / read / copy 40

File storage abstraction cleverfilesystemplugin (2/3) File system creation $fs = cleverfilesystem::getinstance(array( 'type' => 'disk', 'root' => '/path/to/root', 'cache_dir' => '/tmp' )); // filesystem operations $content = $fs->listdir(''); $content = $fs->listdir('path/to/directory'); 41

File storage abstraction cleverfilesystemplugin (3/3) $fs = cleverfilesystem::getinstance('ftp_michel'); app: cleverfilesystemplugin: filesystems: ftp_michel: cache_dir: /tmp type: ftp host: localhost username: michel password: p4ssw0rd Port: 21 root: ftpserv ftp://michel:p4ssw0rd@localhost:21/ftpserv/ 42

API usage // retrieve a folder $parent = ccmediafolderpeer::retrievebypath('meetings/cologne'); // Create a folder $folder = new ccmediafolder(); $fields = array( 'name' => 'Symfony Day Cologne', 'created_by' => $this->getuser()->getuserid(), 'updated_by' => $this->getuser()->getuserid() 'parent' => $parent ); $folder->update($fields); $folder->save(); 43

API usage // retrieve a folder $parent = ccmediafolderpeer::retrievebypath('meetings/cologne'); // Create a file $image = new ccmedia(); $fields = array( 'cc_media_folder' => $folder, 'source' => 'http://lacot.org/image.png', 'filename' => 'new_filename.png', 'updated_by' => $this->getuser()->getuserid(), 'created_by' => $this->getuser()->getuserid() ); $image->update($fields); $image->save(); 44

tasks 45

Questions Xavier Lacot <xavier@lacot.org> http://lacot.org/ 46

Contact us Clever Age : Agencies : Phone : 37, boulevard des Capucines 75002 Paris, France Lyon, Bordeaux +33 1 53 34 66 10 Web : http://www.clever-age.com/ Commercial contact : commercial@clever-age.com Technical contact : technique@clever-age.com 47