Model view controller pattern

Assignment Help PHP Web Programming
Reference no: EM133304

QUESTION 1

(a) A design pattern can be classified by its scope, which specifies whether the pattern applies primarily to classes or objects. Differentiate between class patterns and object patterns.

(b) Explain each of the following Object Oriented Design Principles. In each case give an example of a design pattern that can be used to apply the principle.

a. Program to an ‘interface' not to an Implementation

b. Classes should be opened for extension but closed for modification (Open Close Principle)

c. Principle of Least Knowledge - Talk only to your immediate friends

(c) Developers should be encouraged to learn and use design patterns. Elucidate why.

QUESTION 2

(a) A class instance can be created using new operator. Why should we use creational design prototypes to create objects?

(b) The factory method is one of the mostly used and one of the more robust design patterns. Discuss on the factory pattern's motivation, intent, associated benefits and drawbacks. Also provide a UML diagram to illustrate a typical implementation.

(c) The Abstract Factory pattern is often makes use of Dependency Inversion principle. Explain the term Dependency Inversion.

QUESTION 3

(a) XYZ news agency is a company which gathers news and publishes them to different subscribers. You have been asked to create an application that will allow the agency to inform right away, when event occurs, its subscribers about the occurrence. The subscribers can receive the news in different ways: Emails, SMS, etc. The solution need to be extensively enough to support new types of subscribers (maybe new communication technologies will appear). Identify the most appropriate GOF design pattern for the above task. Using a UML class diagram illustrate an implementation of a possible solution for the above problem.

(b) Differentiate between the Strategy and State design patterns.

(c) The Adapters can be implemented either as Object adapters or class adapters. Briefly describe each of these adapters.

QUESTION 4

(a) Active Record is one of the two data source architectural patterns covered during the course. Describe this pattern, explaining how it works and when to use it.

(b) PHP Frameworks such as CodeIgniter and Zend are all based on the Model View Controller (MVC) pattern. Very often such frameworks make use of the Front Controllers. Using a diagram explain the purpose of Front Controllers.

(c) Briefly describe three reuse anti-patterns and their refactored solution.

Reference no: EM133304

Questions Cloud

What should be the required initial investment : What should be the required initial investment at the starting of the first year if the fund earns 11%?
Recognize the impact of this stock transaction : What journal entry could Albuquerque make to recognize the impact of this stock transaction?
Compute janice morgans 2011 federal income tax payable : Compute Janice Morgan's 2011 Federal income tax payable. If you use tax forms for your computations, you will need Forms 1040 and 4562 and Schedules A, B, C, and SE. Suggested software: H&R BLOCK At Home.
What consolidation entry could be needed for these bonds : What consolidation entry could be needed for these bonds on December 31, 2012?
Model view controller pattern : PHP Frameworks, class patterns and object patterns, Object Oriented Design Principles, Program to an ‘interface' not to an Implementation, Open Close Principle, Principle of Least Knowledge, creational design prototypes, Dependency Inversion principl..
Create a cash budget for the months of july : Create a cash budget for the months of July through September 2012. Show required schedules for the calculation of receivables and payables.
Describe why the fair value of a companys assets : Describe why the fair value of a company's assets is used in the preparation of combined financial statement
Partial income statement account balances : Prepare an amortization schedule for the Note Receivable using the subsequent columns
Prepare an amortization schedule : Prepare an amortization schedule for the Note Receivable using the subsequent columns

Reviews

Write a Review

PHP Web Programming Questions & Answers

  Show the accessibility and usability of website

The webpage must have several menus about country Azerbaijan such as "About Azerbaijan" "History" "Geography" "Landscape" and "Accessibility" menu.

  Sample website project

This website consists of three sections: a narrative, a storyboard, and a business Website.

  Develop a dynamic website open university

Develop a dynamic website Open University

  Random integral numbers based on normal distribution

Prepare a system to generate random integral numbers based on normal distribution. Study Data Generator's structure and extend number generation type to activate normal distribution.

  Create a very simple order system as a web application

Create a very simple Order System as a web application.

  Create a web site for an apple farm

Create a web site for an apple farm. Create an HTML5 form allowing visitors to create an account with the site. Account details are to be stored in your MySQL database. Information should be stored in a secure way.

  Implement a web application

Implement a web application called CS320Starter, which is similar to the crowd funding platform Kickstarter where people raise funds for their projects.

  Web application development

Create a simple Web Application that collects gradings under a number of criteria, and then calculates an aggregate mark

  Online banking application

Designing and developing a web applications The company you are working has secured a contract with a local banking group to develop an ONLINE BANKING APPLICATION using PHP and MySQL.

  Shopping cart program for web applications class

Shopping Cart program for web applications class. Allows user to browse while keeping track of the items in which they will purchase at the end on the order page link and this will give a final price for all items.

  Which of the following jsp expressions is valid

A JSP expression can contain any Java expression that evaluates to a String object, Java object, primitive type, primitive type or Java object

  Prepare an ajax enabled web form

Prepare an AJAX enabled web form utilising a ListView control that will allow logged-in staff to list, edit, delete, insert magazine details for magazines from a selected magazine category.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd