Skip to Content
使用 WordPress 构建网络应用程序,第 2 版
book

使用 WordPress 构建网络应用程序,第 2 版

by Brian Messenlehner, Jason Coleman
May 2025
Intermediate to advanced
546 pages
6h 39m
Chinese
O'Reilly Media, Inc.
Content preview from 使用 WordPress 构建网络应用程序,第 2 版

第16章 由 WordPress 支持的移动应用程序

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

由 WordPress 支持在 iOS 和 Android 上运行的移动应用程序?当然,为什么不呢?您可以通过多种方式利用 WordPress 的功能为本地和混合移动应用程序提供动力。

在深入了解如何构建由 WordPress 支持的移动应用程序之前,我们先来了解一下构建由 WordPress 支持的应用程序的可能用例。虽然天空是无限的,但请考虑内容驱动型应用程序。我们还将介绍构建混合移动应用程序的一些注意事项。

移动应用程序使用案例

好了,我们有了可以显示网络应用内容的移动应用程序,那么它的交互性到底有多强呢?由 WordPress 支持的混合移动应用程序可以实现您想要的交互性!您可以在混合移动应用程序中使用 WordPress 做任何事情:

  • 您可以让应用程序用户通过 Facebook、Twitter 或其他允许单点登录 (SSO) 的社交网络登录您的应用程序。

  • 也许您的网络应用程序是一个由 WooCommerce 支持的在线商店:您的移动应用程序允许您的客户直接从应用程序中浏览和购买产品。也许您的应用程序可以让多个商家在您的 Network+ 上开店:通过您的应用程序,他们可以直接从设备上实时管理库存和上传产品照片。

  • 也许您使用 BuddyPress 建立了一个交友网站:为您的交友服务制作一个品牌移动应用程序可以帮助您提高会员数量,如果您的交友服务受到欢迎的话。借助相机等原生设备功能,您的社交网络会员可以直接拍摄并上传自拍照到他们的个人资料中。

  • 也许您建立了一个房地产网站,并希望代理商能够在名为 "Homes "的 CPT 中为他们试图出售的房产创建新帖子。通过网络应用程序,用户可以拍摄照片,并在照片上标注经纬度,这样房源信息就会出现在谷歌地图上。

  • 您可以为建筑承包商、管道工、园艺师、电工、医生、牙医、律师、会计师或任何其他类型的实体服务型企业制作一个移动应用程序,轻松帮助他们跟踪工作、访问客户详情、上传工作前后的照片或视频、通过 GPS 跟踪工作地点、与同事协作等。

  • 也许您已经在某个由 WordPress 驱动的现有系统上投入了时间和金钱,而您希望通过应用程序商店中的应用程序来使用这些系统。

您可以创建无限可能的应用程序,尤其是在混合移动应用程序中融入更多本地功能。如果需要,您可以建立 100% 的本地移动应用程序,但仍可让它们访问在线 WordPress 应用程序,这样您的内容和用户群在所有平台上都是一样的。

本地和混合移动应用程序

在完整的本地应用程序或混合移动应用程序中使用 WordPress REST API 是与 WordPress 集成并优化应用程序性能的首选方法。如果您已经是原生应用程序开发人员或有志成为开发人员,这可能是您的首选方法。如果您是网络开发人员,并且无意学习 Objective-C、Swift、Kotlin 和/或 Java,那么混合移动应用程序就是您想要的,您来对地方了。

注意事项

根据具体的项目需求、您或您开发团队的技能,混合移动应用程序不一定是最佳选择。

什么是本地移动应用程序?

本地移动应用程序 是一种智能手机和/或平板电脑应用程序,使用特定的编程语言为特定的操作系统开发:

  • 目标 C = iOS

  • Java = Android

以下是构建原生移动应用程序的一些优势:

性能

原生应用程序是利用核心语言、库和应用程序接口为特定平台创建和优化的,因此速度非常快,反应灵敏。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

WordPress 2: Visual QuickStart Guide

WordPress 2: Visual QuickStart Guide

Maria Langer, Miraz Jordan
Web Marketing all-in-one for Dummies®

Web Marketing all-in-one for Dummies®

Ian Lurie, Elizabeth Marsten, Michael Becker, John Arnold, Marty Dickinson
How to Develop a Great Digital Strategy

How to Develop a Great Digital Strategy

Jeanne W. Ross, Cynthia M. Beath, Ina M. Sebastian

Publisher Resources

ISBN: 9798341659339