Your SlideShare is downloading. ×
  • Like
  • Save
Mainframe, the fast PHP framework
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

Mainframe, the fast PHP framework

  • 2,672 views
Published

Introduction to MainframePHP, a fast and productive PHP framework based on CodeIgniter

Introduction to MainframePHP, a fast and productive PHP framework based on CodeIgniter

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

Views

Total Views
2,672
On SlideShare
0
From Embeds
0
Number of Embeds
6

Actions

Shares
Downloads
0
Comments
0
Likes
1

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. MainframePHPThe fast PHP frameworkVangelis Bibakis@ JoomlaDay Greece 2013
  • 2. About your speakerFounder: DemianLabs.comCTO: AdAxem.euCreator of: MainframePHP& many micro web apps@bibakisbibakisv@gmail.com
  • 3. Hey, thanks professor !
  • 4. What we‟ll talk about today1. Case studies2. Productivity3. Performance4. Learnability5. Themes6. Assets7. Plugins8. Libraries
  • 5. Yet… What is Mainframe ?• A PHP framework based on CodeIgniter• Adds essential functionality thatCodeIgniter is missing• Focused on web apps• Best open source tools included( jQuery, Bootstrap, html5 boilerplate & others)
  • 6. Yet… What is Mainframe ?In a few words…“Mainframe is to CodeIgniter,what Ubuntu is to Debian”Vangelis
  • 7. 1. Case studiesARTIFAX EVENT 4• 600.000 lines of code(so far)• The “photoshop” of event management• Large established client base• Huge feature set
  • 8. 1. Case studiesIf Event 4 was a Greek startupit would be bigger than…
  • 9. 1. Case studiesIf Event 4 was a Greek startupit would be bigger than…• CSS Igniter
  • 10. 1. Case studiesIf Event 4 was a Greek startupit would be bigger than…• CSS Igniter• Incrediblue
  • 11. 1. Case studiesIf Event 4 was a Greek startupit would be bigger than…• CSS Igniter• Incrediblue• Workable
  • 12. 1. Case studiesIf Event 4 was a Greek startupit would be bigger than…• CSS Igniter• Incrediblue• WorkableCombined…
  • 13. 1. Case studies• DeskHot.comBookmark manager, SaaS• MobileTest.meMicro web app, responsive design testing• ConvertPSD2HTML.comSlicing service, defunct (RIP)• RandomTextGenerator.comMicro web app, #1 in it‟s class
  • 14. 2. Productivity• Before we took over development of Event4,3 other companies failed to deliver
  • 15. 2. Productivity• Before we took over development of Event4,3 other companies failed to deliver• Large feature sets delivered weekly
  • 16. 2. Productivity• Before we took over development of Event4,3 other companies failed to deliver• Large feature sets delivered weekly• Constant improvement of UI, workflows
  • 17. 2. ProductivityHow Mainframe makes you productive ?
  • 18. 2. ProductivityHow Mainframe makes you productive ?• Expands upon the MVC lifestyle(everything in it‟s right place)
  • 19. 2. ProductivityHow Mainframe makes you productive ?• Expands upon the MVC lifestyle(everything in it‟s right place)• Keeps CodeIgniter‟s coding style
  • 20. 2. ProductivityHow Mainframe makes you productive ?• Expands upon the MVC lifestyle(everything in it‟s right place)• Keeps CodeIgniter‟s coding style• It won‟t say no if you want to get nasty
  • 21. 2. ProductivityHow Mainframe makes you productive ?• Expands upon the MVC lifestyle(everything in it‟s right place)• Keeps CodeIgniter‟s coding style• It won‟t say no if you want to get nasty• Absolutely no command line needed(web and nothing but the web)
  • 22. 3. Performance• 45.000 monthly unique visitors on ourmain server
  • 23. 3. Performance• 45.000 monthly unique visitors on ourmain server• On a small VPS with 384mb of RAM(that‟s less memory than your phone)
  • 24. 4. Learnability• Mainframe is built upon the “hackathoneffect”
  • 25. 4. Learnability• Mainframe is built upon the “hackathoneffect”• It‟s so similar to CodeIgniter thatinexperienced developers can‟t tell thedifference
  • 26. 5. ThemesTemplate library by Colin Williams
  • 27. 5. ThemesTemplate library by Colin Williams1. Setting the Default Template:$template[active_group] = default„;$template[default][template] = template.php;
  • 28. 5. ThemesTemplate library by Colin Williams1. Setting the Default Template:$template[active_group] = default„;$template[default][template] = template.php;2. Defining Regions$template[default][regions] = array(header„,content„,footer„);
  • 29. 5. ThemesTemplate library by Colin Williams1. Setting the Default Template:$template[active_group] = default„;$template[default][template] = template.php;2. Defining Regions$template[default][regions] = array(header„,content„,footer„);3. Defining Parsers$template[default][parser] = smarty_parser„;Template will call smarty_parser::parse()$template[default][parser] = frog_parser„;$template[default][parser_method] = frog„;Template will call frog_parser::frog();• … And 9 more steps
  • 30. 5. ThemesWhere in Mainframe you just do…$this->load->theme(„Simplicity‟);…in the controller‟s constructor
  • 31. 6. Assets3rd party assets libraries for CodeIgniterThings are a bit better hereThere are a few nice librariesBut….
  • 32. 6. Assets3rd party assets libraries for CodeIgniter• They are usually abandoned after a while• They don‟t support minifying/compression• They don‟t support server side LESS/SASS• They are not integrated into a themingsystem
  • 33. 6. AssetsMainframe supports• Integration with the theming system• Server side LESS• Server side minification ofJavaScript/CSS/LESS• Intelligent caching control• Asset ordering
  • 34. 6. AssetsSounds a lot but it‟s easy$this->load->js(„javascript.js‟);$this->load->css(„stylesheet.css‟);$this->load->less(„stylesheet.less‟);In either your theme or your views
  • 35. 6. AssetsOr if you are feeling bohemianjs(„javascript.js‟);css(„stylesheet.css‟);less(„stylesheet.less‟);
  • 36. 7. PluginsLet‟s have a look at the mostpopular system for adding support forModules / Plugins / HMVC / Whatever you want to call it“Modular Extensions – HMVC”byWiredesignzFirst let‟s look at the documentation…
  • 37. 7. PluginsIn MainframeJust place your files in/app/plugins/plugin_name/Using the exact same structure as in plain CodeIgniter/models/views/controllers/helpers
  • 38. 8. LibrariesLibraries in Mainframe have a special placein /libsThey are grouped by language like so:• Css• Js• Php• CodeIgniter• Common
  • 39. 8. LibrariesCodeIgniter is a library ?• Well… technically no.• But by treating it as one we have a verysimple upgrade procedure for the times anew CodeIgniter version is released.• Delete the old folder, paste the new one.You don‟t have to touch anything else.
  • 40. 8. Libraries• Mainframe supports multiple apps all runningfrom a single installation• For example you can havewww.deskhot.commobile.deskhot.comintranet.deskhot.com• “Common” contains all the code you wantshared by all these applications. For exampleyour custom image resize helper.
  • 41. Peace & simple living