lotus framework
DESCRIPTION
MVC framework over WordPressTRANSCRIPT
MVC Framework over WordPress
Todi Adiyatmo Wijoyo for WordCamp Indonesia 2013
Introduction Name
Todi Adiyatmo Wijoyo Role
Developer Company
Tonjoo.com Twitter
@todiadiyatmo
Disclaimer
This is a very technical presentation
WordPress Very popular CMS
Used by TONS of Website Easy to learn
Newcomers can learn how to use WordPress quickly
Deploying WordPress is fast Many theme to choose from Various plugin to extend functionality Can be developed pararel by using plugin Reducing development cost significantly
Strong community support
Deploy Strategy – “The WordPress way”
Select Theme
Plugin
Modify
Classic WordPress Question..
How to add complex functionality ?? Ex : Add complex front end
Theme Hacking - Diggity
Theme Hacking – Diggity ( User Follow)
Development Strategy – “The WordPress way”
Limitation : “Inject” new functionality to themes or plugin
is painful, we must dig into the source code Not so “Time Efficient” ~ Against WP Philosophy
This lead to difficulty in developing complex application
Other Limitation Loss of parallel development
Front end Dev and Back End Dev cannot work on the same theme on the same time
Non standard-code Lost of custom page template Different routing scheme Different file placement scheme
MVC Framework Model – View – Controller Pattern Generally accepted style to build complex
(web) application Used by most framework
Most developer learn how to code in MVC during their collage time
MVC Framework - disadvantages Not easy to learn
Take a lot of time to master one framework Plugin does not extend functionality as WordPress
(not click and go) Developing web with minimum developer is
not so fast Getting skilful developer is hard !
MVC
Comparison – WordPress and MVCFeatures WordPress MVC Framework
Easy to learn Yes Relative
Plugin and theme (1) Yes Mostly no
Fast deployment (2) Yes No
Develop complex application
Hard The General accepted way
1. Some Framework do have plugin2. Fast development with MVC framework means Senior
developer which equal extra cost
Open Source MVC Framework for WordPress
Solution : Running MVC Framework over WordPress
Lotus Framework Philosophy Easy to learn
Adopting Codeigniter Syntax Integration
Easy to deploy – Come with plugin Seamless integration into theme Using “native” WordPress code
Some serious documentation Current solution is not so well documented We want to make clear documentation
Well tested Already run on 3 project
Lotus Framework - Architecture
Index Archive Single Page Hooked Page
Your chosen theme, any theme
WordPress
Benefit of Using Lotus Framework Parallel development
Front end dev on theme, Backend developer on the LF
MVC Convention Every action done in correct part of apps
Database action done on model UI done on View Routing done on Controller
Easier development Develop complex web application with lower
senior programmer
Simple case study
Develop a custom front end for a multi-site WordPress network
Case Study Scenario
Indonesia Kreatif
5 Websites , Single User Dashboard Custom Business process
User role Fast Development
NEWSDIREKTO
RI EVENT
SHOWCASE
PORTAL
Development Strategy WordPress
(+) Theme and Plugin ( - ) Way… tooo… dificult.. The user role, the
dashboard, the integration Framework
( + ) Easy to develop custom web apps with custom user role
( - ) Just not enough time ( - ) High cost, how many senior programmer you
would hire ? :p
Other bizarre strategy Build Front end with WordPress Use framework to “inject data directly to the
database”
WordPress Database
With the help of Lotus Framework Front end dev working on theme
5 Site -> 5 Theme Use any theme and plugin you want Do as usual, it just other ordinary day developing
WordPress theme
Back end developer Working on custom front end user dashboard Use native WordPress code to :
Login Register Post new article
Native Code - Login
wp_signon( $credentials, $secure_cookie ) http://codex.WordPress.org/Function_Reference/wp_signon
Post List
Native Code – Edit / Post new Article
wp_insert_post()
Quick Demo
Other Case Study - RSVP
Lotus Framework Contributor
Code Tester Documentation Guy
Follow us at @tonjoo Public Release : End of 2013
Question Session