Trailhead学习:解锁Lightning Experience Development

【Trailhead学习】开发者2考试解锁之路:”Lightning组件框架专家”(Lightning Component Framework Specialist Superbadge)之Lightning Experience Development 。

在之前的学习中,我们相继解锁了 Apex Specialist, Data Integration Specialist,现在开始解锁”Lightning组件框架专家”(Lightning Component Framework Specialist Superbadge), 相关链接如下:https://trailhead.salesforce.com/en/content/learn/superbadges/superbadge_lcf

同时,这里,附上开发者2考试路线图,链接如下:https://trailhead.salesforce.com/content/learn/superbadges/superbadge_aap

下面我们讲述新的模块,Lightning Experience Development,这里会学习到新的UX对于Apex,Visualforce,API等的影响。相关链接如下https://trailhead.salesforce.com/content/learn/modules/lex_dev_overview

User Interface Development Considerations

这一节 (User Interface Development Considerations),章节链接如下https://trailhead.salesforce.com/content/learn/modules/lex_dev_overview/lex_dev_overview_future

题目1. Which of the following statements is true about creating apps with Visualforce:

A)Visualforce is designed primarily for page-centric web apps.

B)Visualforce renders the page on the server.

C)Visualforce will be fully supported by Salesforce for years to come.

D)All of the above.

解析: Visualforce 至今都被Salesforce广泛支持。所以选择D。

题目2 Which of the following statements is NOT true about creating apps with Lightning components:

A) Lightning components are designed primarily for app-centric web apps.

B) Lightning components can be used everywhere Visualforce can be used.

C) Lightning components render the page on the client.

D) All of the above.

解析:关于利用Lightning components新建app不正确的是B,任何地方使用Lightning components,都可以用Visualforce,显然不对。

题目3 Which of the following is a poor use of Lightning Components:

A) Developing an app for Salesforce1.

B) Developing a highly interactive app with an innovative user interface.

C) Developing widgets for use in Lightning App Builder.

D) None of the above. All of these are good use cases for Lightning Components.

解析:哪一些是使用Lightning Components不好的例子,答案是D,没有不好的例子。如开发Salesforce1,或Lightning App Builder里面的widgets,都需要用到Lightning Components。

搞定!

image

Use Visualforce in Lightning Experience

下面一节讲的是在Lightning中使用Visualforce(Use Visualforce in Lightning Experience),相关链接如下:https://trailhead.salesforce.com/content/learn/modules/lex_dev_overview/lex_dev_overview_visualforce

就两道题目,很简单

题目一:Which of the following features of Visualforce do NOT work in Lightning Experience:

A) Creating custom apps and tabs.

B) Overriding standard actions with Visualforce pages.

C) Using window.location in JavaScript code.

D) Remote Objects.

解析:Lightning Experience 是一个全新的世界,由于无法直接访问’window ‘全局对象,所以答案是C。例如,Visualforce 覆盖标准操作在 Lightning Experience 和Salesforce Classic会有点不同,同时开发人员可以在Salesforce Classic、Lightning Experience 和移动设置不同的覆盖行为。具体而言,开发人员可以为Salesforce Classic中的大多数标准和所有自定义对象覆盖如下六种标准操作:

  • 对象选项卡(Object tab)

  • 对象列表(Object list)

  • 数据视图Record view)

  • 数据编辑(Record edit)

  • 新建数据(Record create)

  • 删除数据(Record delete)

在Lightning Experience中,前面两项被合并到一个页面:object home。

题目二 :Which of the following is NOT true about the user interface and visual design in Lightning Experience:

A) PDFs render with the Lightning Experience visual design.

B) You can’t hide the Lightning Experience main navigation header or sidebar.

C) The < apex:inputField > tag renders with the Salesforce Classic appearance.

D) The standard Visualforce header and sidebar are hidden.

解析: 我们可以在Salesforce Classic,通过Visualforce pages生成PDF,根据官方说法,截止发稿时,还无法利用 Lightning Experience设计渲染PDF页面,所以答案是A。

成功拿到100分。

image

Use Lightning Components in Lightning Experience

相关链接:https://trailhead.salesforce.com/content/learn/modules/lex_dev_overview/lex_dev_overview_lightning_components

题目一:Which of the following statements about Lightning Components and Lightning Experience is true?

A) Lightning Experience is something you use directly, Lightning Components are something you build apps with.

B) Lightning Experience is (mostly) built with Lightning Components.

C) Lightning Experience uses an app-centric development model using Lightning Components.

D) All of the above.

解析:答案是D,Lightning Components 很多时候是用于Lightning Experience。

题目二:Which of the following is true of Lightning Components:

A) Lightning Components can only be used in the Lightning Experience and not the Salesforce1 mobile app.

B) Lightning Components can be used in Visualforce pages.

C) Lightning Components are only optimized for the desktop experience.

D)All of the above.

解析: Lightning Components 可以用于Visualforce pages,通过’$Lightning.use’可以实现。所以答案是B。

Salesforce Partners, Packaging, and AppExchange

下一章讲到Salesforce Partners, Packaging, and AppExchange,相关链接为:https://trailhead.salesforce.com/content/learn/modules/lex_dev_overview/lex_dev_overview_isv

题目一:Which of the following ISV features are available in Lightning Experience?

A) Channel Order App.

B) Trialforce.

C) Usage Metrics Visualization app.

D) Package creation.

E) None of the above are available.

解析:package manager是可以在Lightning Experience里面使用的 D。这里值得注意的是,对于ISV,如下模块是支持Classic和Lightning Experience。

  • Environment Hub
  • License Management App (LMA)
  • Checkout Management App (CMA)
    然而如下模块就不支持,仅仅支持Classic:
  • Trialforce
  • Channel Order App (COA)
  • Usage Metrics Visualization App

題目二:As an ISV, which of the following is true about AppExchange:

A) Your apps undergo a review for Lightning Experience readiness.

B) Your apps are available to all customers, whether they have enabled Lightning Experience or not.

C) The ‘Lightning Ready’ certification lets AppExchange visitors know your app is verified for Lightning Experience.

D) All of the above.

解析:作为ISV,你的APP是对所有用户,无论对方是不是使用Lightning,所以答案是D,以上所有。

在这里附上ISVforce Guide:https://developer.salesforce.com/docs/atlas.en-us.216.0.packagingGuide.meta/packagingGuide/packaging_intro.htm

搞定!

image

Understand Changes to Other Development Tools

下面一节讲述Understand Changes to Other Development Tools,相关链接为:https://trailhead.salesforce.com/content/learn/modules/lex_dev_overview/lex_dev_overview_other

题目一:Which of the following is true of Apex in the new Lightning Experience:

A) You have to update the API version for all your Apex classes in order for them to work in Lightning Experience.

B) Apex is not supported in the new Lightning Experience.

C) Your Apex code and queries continue to function as before.

D) All of the above

解析:Apex是支持Lightning Experience,而Lightning Experience是不需要更新所有Apex 类的版本。所以本题答案为C。

题目二:What should you look for when reviewing your installed packages before using them with Lightning Experience?

A) A ‘Lightning Ready’ sash for the package on AppExchange.

B) An error message saying the package isn’t ‘Lightning Ready’.

C) A ‘Lightning Ready’ check mark on the Installed Packages page.

D) Errors in the JavaScript console when using the package.

解析:如果你的组织是使用Lightning Experience。而当管理员在选择安装app时候,需要看这个app在AppExchange里面是否被标注为’Lightning Ready’ sash,所以本题答案为A。

就这样,整个’Lightning Experience Development’模块被我们解锁了~

image