Zend con what-i-learned-about-mobile-first


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Zend con what-i-learned-about-mobile-first

  1. 1. What I Learned about Mobile-First by Not Going Mobile-First Clark Everetts Zend Technologies, Inc
  2. 2. 2 What are We Going to Talk About, Anyway? •Background – Transitioning from Freelancer to full-time Zender – Reducing Client Base (Target: 0) – Interesting History ● “What you want can't be done” ● Left Me! (whew...) ● Came Back?! ● Baaaad Timing – Mobile-development: no better time than the present • Talk is NOT a detailed tutorial – Run-through of the desktop site – Mobile application progress report – To-Dos – My thoughts and few suggestions
  3. 3. 3 Who am I? •Clark Everetts – Professional Services Consultant for Zend Technologies – Onsite and Remote Consulting – Linux, IBM iSeries, Windows ● Software Architecture Audits and Code Reviews ● Performance Audits ● Continuous Delivery Assessments – Online / Onsite Training in PHP, ZF, Studio, Server, Certification, etc. – SmartStarts: Training and Onsite Guided Development •Past Life: Independent Consultant (2002 - 2012) – Web Sites and Web Applications – Contract Instructor for Zend •Past, Past Life: Contractor for US Army and NASA (1990 - 2002) – Interceptor Ground Control Software; Green Screen Db Applications – Space Station: Real-time, Embedded Software; Science Platforms, Life Support
  4. 4. 4 Who are You? ● Your role: Manager, developer, stakeholder/decision-maker? ● Size: Small to large companies; small to large dev teams ● Have you built one or more applications? ● Building one now? How far along are you? ● What challenges did you face / are you facing? ● What tools did you use? ● What did you do before you started?
  5. 5. 5 •Florist-FloristDirectory.com – Verified database of independent florists in U.S. – Referral Network for order fulfillment for sending flowers – Owner is 73-year young lady •Business Model – 15,000+ free listings with basic info – “Standard” listings with more info – “Deluxe” listings with even more info •Public-facing site for searches, Admin Screens for processing applications and making changes Background : The Desktop Web Site
  6. 6. 6 Let's take a look ... The Desktop Web Site: Live
  7. 7. 7 Quick Detour: First Install of Apigility Skeleton $ composer create-project -sdev --repository-url="https://packages.zendframework.com/" zfcampus/zf-apigility-skeleton ./apigility-skeleton Installing zfcampus/zf-apigility-skeleton (dev-master 1932c09119de36edb9eb986c2f9f921e54dc4238) - Installing zfcampus/zf-apigility-skeleton (dev-master master) Cloning master Created project in ./apigility-skeleton Loading composer repositories with package information Installing dependencies (including require-dev) PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 32 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Rule.php on line 62 PHP Stack trace: …. I need to investigate.
  8. 8. 8 Apigility: First Install of Skeleton Composer.phar contains: // ... $memoryLimit = trim(ini_get('memory_limit')); // Increase memory_limit if it is lower than 512M if ($memoryLimit != -1 && $memoryInBytes($memoryLimit) < 512 * 1024 * 1024) { @ini_set('memory_limit', '512M'); } unset($memoryInBytes, $memoryLimit); // ... Figure this out later. Back to presentation...
  9. 9. 9 •Create CCM Project in Studio (with built-in example code) – Server Project (florists-ccm) – Mobile Project (m.florists-ccm) •Deploy Application to Zend Server •Test the Example Project – Test a RESTful Method Route – Web Mobile Emulator •Decisions •To-dos, thoughts, suggestions Cloud-Connected Mobile: Process Overview
  10. 10. 10 Cloud-Connected Mobile: Test Web Svc Method Server-side gateway.xml
  11. 11. 11 Cloud-Connected Mobile: Test Mobile Interface Mobile Project name or index.html file
  12. 12. 12 •Looked at web site code – Incorporate ZF1 web site code into ZF2 CCM backend? – Write REST controllers in ZF1 app and change mobile front-end to point to them? •Controllers: Admin, Search, User, Index, Error •Models – Db_Table: Florists, User, Roles – Db_Table_Row: for Florists Db_Table – Entitity: User – Authentication Service •Unit Tests Scope out the Territory
  13. 13. 13 •Improper MVC - Separation of Concerns •Hardcoded Dependencies •Models tightly coupled to database •Unit Tests – Too few, poor coverage – One not even under version control •The sound you hear is a mobile application development effort screeching to a halt, as a refactoring effort begins. •Let's look at the code now... Noticed Some Problems
  14. 14. 14 •Conduct an audit of your code •Refactor to better coding practices – Proper MVC separation – Service Layer to Support API – More Unit Tests with real code coverage •Migrate Application to ZF2 •Now is the time to look at Apigility – Apigility “0.0.1” was Zend Server Gateway To-Dos, Thoughts, and Suggestions
  15. 15. Thank You! Please give constructive feedback at https://joind.in/9076 Email: clark.e@zend.com https://github.com/clarkphp Twitter: @clarkphp