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

C
Clark EverettsProfessional Services (Software) Consultant and Trainer at Perforce Software, Inc.
What I Learned about
Mobile-First by Not Going
Mobile-First
Clark Everetts
Zend Technologies, Inc
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
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
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
•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
Let's take a look ...
The Desktop Web Site: Live
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
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
•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
Cloud-Connected Mobile: Test Web Svc Method
Server-side gateway.xml
11
Cloud-Connected Mobile: Test Mobile Interface
Mobile Project name
or index.html file
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
•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
•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
Thank You!
Please give constructive feedback at
https://joind.in/9076
Email: clark.e@zend.com
https://github.com/clarkphp
Twitter: @clarkphp
1 of 15

More Related Content

What's hot(20)

Extending ZF & Extending With ZFExtending ZF & Extending With ZF
Extending ZF & Extending With ZF
Ralph Schindler1.2K views
Developing better PHP projectsDeveloping better PHP projects
Developing better PHP projects
Mohammad Emran Hasan9.3K views
Why Plone Will DieWhy Plone Will Die
Why Plone Will Die
Andreas Jung6.5K views
Web Performance First AidWeb Performance First Aid
Web Performance First Aid
Alan Seiden1.8K views
Enterprise PHPEnterprise PHP
Enterprise PHP
Mohammad Emran Hasan1.9K views
Becoming A Php NinjaBecoming A Php Ninja
Becoming A Php Ninja
Mohammad Emran Hasan4K views
Migration tales from java ee 5 to 7Migration tales from java ee 5 to 7
Migration tales from java ee 5 to 7
Roberto Cortez15.3K views
Intro To Puppet.KeyIntro To Puppet.Key
Intro To Puppet.Key
Work1.2K views
Top 10 dev ops tools (1)Top 10 dev ops tools (1)
Top 10 dev ops tools (1)
yalini9774 views
Testing Alfresco extensionsTesting Alfresco extensions
Testing Alfresco extensions
ITD Systems942 views
Take your CFML Legacy Apps to ModernizationTake your CFML Legacy Apps to Modernization
Take your CFML Legacy Apps to Modernization
Ortus Solutions, Corp1.6K views
Maven - Taming the BeastMaven - Taming the Beast
Maven - Taming the Beast
Roberto Cortez5.2K views
Joe DamatoJoe Damato
Joe Damato
Ontico957 views

Recently uploaded(20)

ChatGPT and AI for Web DevelopersChatGPT and AI for Web Developers
ChatGPT and AI for Web Developers
Maximiliano Firtman161 views
CXL at OCPCXL at OCP
CXL at OCP
CXL Forum203 views
Liqid: Composable CXL PreviewLiqid: Composable CXL Preview
Liqid: Composable CXL Preview
CXL Forum120 views

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

  • 1. What I Learned about Mobile-First by Not Going Mobile-First Clark Everetts Zend Technologies, Inc
  • 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 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 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 •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 Let's take a look ... The Desktop Web Site: Live
  • 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 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 •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 Cloud-Connected Mobile: Test Web Svc Method Server-side gateway.xml
  • 11. 11 Cloud-Connected Mobile: Test Mobile Interface Mobile Project name or index.html file
  • 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 •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 •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. Thank You! Please give constructive feedback at https://joind.in/9076 Email: clark.e@zend.com https://github.com/clarkphp Twitter: @clarkphp