Skip to main content

DataSources and Behaviors

  • Chapter
Beginning CakePHP
  • 445 Accesses

Abstract

Cake’s core set of resources strictly adhere to the MVC paradigm, meaning that all output is configured by the view, all data handling is managed by the model, and all business logic is handled by the controller. At this point, however, you’re aware of how much the model, view, and controller work together to run as an application. The view doesn’t act alone without the controller providing needed variables, the controller doesn’t process its logic without the help of the model, and so on. The degree to which these resources work together depends on the unique processes employed by the application. Because the MVC elements work together (more or less simultaneously), you could possibly manipulate one element to perform the work of another. For instance, the model could create output strings to be passed to the view, like HTML tags and formfields. This might work in the short run, but if you were to distribute this application later, it would prove difficult for other Cake developers to work with. Keeping Cake applications portable requires sticking to the MVC structure as much as possible.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 42.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints and permissions

Copyright information

© 2008 David Golding

About this chapter

Cite this chapter

(2008). DataSources and Behaviors. In: Beginning CakePHP. Apress. https://doi.org/10.1007/978-1-4302-0978-2_14

Download citation

Publish with us

Policies and ethics