题目内容

Which, if any, of the following statements are TRUE regarding JSON objects in Rails apps?

A JSON object's properties must exactly match the corresponding ActiveRecord model
B. In an association such as Movie has-many Reviews, the owned objects must be returned in 1 or more separate
C. JSON object JSON objects can only be consumed by a JavaScript-capable client
D. None of the above are true

查看答案
更多问题

Rails' ActiveRecord module defines an AbstractAdapter for connecting to databases. Subclasses of AbstractAdapterexist for each database type and can be added for new databases; when the app starts, the correct one is instantiated based on config/database.yml. Which SOLID principles is NOT illustrated by this example?

A. Open/Closed principle
B. Dependency Injection
C. Demeter principle
D. Liskov substitution

Which statement regarding design patterns is FALSE?

A. P-D processes have an explicit design phase that is a natural fit to the use of design patterns and thus will have a good SW architecture
B. P&D drawback: initial architecture & design patterns may change as code written and system evolves
C. Agile developers may plan for SW architectures and design patterns they expect to need based on previous, similar projects
D. None are false; All are true

Which of the following would be reasonable uses of the Composite pattern in RottenPotatoes?a. Movies can be organized into Playlistsb. Moviegoers can be organized into groups

A. a. only
B. b. only
C. Both a. and b.
D. Neither a. nor b.

Which design pattern is used to invalidate a cached page after the underlying data has changed?

Adapter
B. Decorator
C. Strategy Observer
D. Observer

答案查题题库