MVC) Model View Controller Also Known As MVC Model View Controller (MVC)

Total Page:16

File Type:pdf, Size:1020Kb

MVC) Model View Controller Also Known As MVC Model View Controller (MVC) Web Frameworks What they are. A web application framework (WAF) is a software framework that is designed to support the development of dynamic websites, web applications, web services and web resources. The framework aims to alleviate the overhead associated with common activities performed in web development. Common Features Database access libraries URL mapping HTML templating Web services Session management Form validation Caching Security Testing frameworks What ones are out there? https://en.wikipedia. org/wiki/Comparison_of_web_application_fram eworks http://www.bestwebframeworks.com/compare- web-frameworks/php/ Which one is the best? http://hotframeworks.com/ https://www.techempower.com/benchmarks/ How do I choose? ● What language will I be using? ● What platform (e.g. Windows, Linux) will my server be hosted on? ● How big is my project? ● What functionality do I need? ● Licensing? Documentation? Current activity? Some popular ones ● Ruby on Rails ● Python - Django ● C#, Windows - ASP.NET ● JavaScript - AngularJS (client-side), Node.js (server- side), jQuery (learning JavaScript anyways) ● Java - Spring (painful), been around a long time. ● Java - Groovy Grails ● Java - Play (similar to Ruby on Rails, MVC) Model View Controller also known as MVC Model View Controller (MVC) A pattern of software architecture for implementing user interfaces. Provides: ● Reusable and extendable code. (Don’t Repeat Yourself) ● Easier code maintenance. ● Separation of view logic from business logic. ● Simultaneous work between developers who are responsible for different components. Model View Controller (MVC) Originally developed for desktop computing, but has been become most popular in web programming. Its important to write maintainable and reusable code, which can be applied to commonly occurring problems in web application design. Model View Controller (MVC) MVC divides a given software application into three distinct, interconnected components. Wait for it… Model View Controller Model View Controller (MVC) Model Stores data that is retrieved by the controller and displayed in the view. If there is a change to the data, then the model is updated by the controller. Controller The glue between the Model and View. The decision maker. Adds event listeners to the view. Updates the model when the user manipulates the view. View A visual representation of the model. The view is made with HTML, CSS, JavaScript and often templates. Doesn’t know how to update the model. Model View Controller (MVC) Model View Controller (MVC) There are many different flavors of MVC frameworks for dynamic web development. Always new ones... Currently, some popular MVC frameworks are ● ASP.NET MVC (http://www.asp.net/mvc) ● AngularJS (https://angularjs.org/) ● Sencha (http://www.sencha.com/) ● Kendo UI (http://www.telerik.com/kendo-ui) ● Ember.js (http://emberjs.com/) ● JavaScriptMVC (http://www.javascriptmvc.com/) ASP.NET MVC http://aspnet.codeplex. com/SourceControl/latest#Samples/MVC/Basic Authentication/ReadMe.txt.
Recommended publications
  • Learning Javascript Design Patterns
    Learning JavaScript Design Patterns Addy Osmani Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo Learning JavaScript Design Patterns by Addy Osmani Copyright © 2012 Addy Osmani. All rights reserved. Revision History for the : 2012-05-01 Early release revision 1 See http://oreilly.com/catalog/errata.csp?isbn=9781449331818 for release details. ISBN: 978-1-449-33181-8 1335906805 Table of Contents Preface ..................................................................... ix 1. Introduction ........................................................... 1 2. What is a Pattern? ...................................................... 3 We already use patterns everyday 4 3. 'Pattern'-ity Testing, Proto-Patterns & The Rule Of Three ...................... 7 4. The Structure Of A Design Pattern ......................................... 9 5. Writing Design Patterns ................................................. 11 6. Anti-Patterns ......................................................... 13 7. Categories Of Design Pattern ............................................ 15 Creational Design Patterns 15 Structural Design Patterns 16 Behavioral Design Patterns 16 8. Design Pattern Categorization ........................................... 17 A brief note on classes 17 9. JavaScript Design Patterns .............................................. 21 The Creational Pattern 22 The Constructor Pattern 23 Basic Constructors 23 Constructors With Prototypes 24 The Singleton Pattern 24 The Module Pattern 27 iii Modules 27 Object Literals 27 The Module Pattern
    [Show full text]
  • Mobile HTML5: Implementing a Responsive Cross-Platform Application
    Aalto University School of Science Degree Programme of Computer Science and Engineering Kimmo Puputti Mobile HTML5: Implementing a Responsive Cross-Platform Application Master's Thesis Kirkkonummi, May 15, 2012 Supervisor: Professor Petri Vuorimaa, Aalto University Instructor: Risto Sarvas D.Sc.(Tech.) Aalto University School of Science ABSTRACT OF Degree Programme of Computer Science and Engineering MASTER'S THESIS Author: Kimmo Puputti Title: Mobile HTML5: Implementing a Responsive Cross-Platform Application Date: May 15, 2012 Pages: ix + 70 Professorship: Media Technology Code: T-111 Supervisor: Professor Petri Vuorimaa Instructor: Risto Sarvas D.Sc.(Tech.) In twenty years, the Web has become an integral part of our everyday lives. The rapid growth of the smartphone market has brought the Web from our home desks to anywhere we are, and enabled us to access this vast source of information at any time. However, the proliferation of mobile devices and platforms has raised new prob- lems for application development. The growing amount of different platforms and their distinct native technologies make it hard to develop applications that can be accessed with all these devices. The only combining factor in all these platforms is the browser, and it is be- coming the universal application platform. We cannot afford anymore to build applications for the silos and walled gardens of single platforms, and building cross-platform applications is essential in the modern mobile market. In this work, I introduce the HTML5 (HyperText Markup Language version 5) specification as well as several related specifications or specification drafts for modern web development. I also present several tools and libraries for mobile web development.
    [Show full text]
  • Software Architecture Document
    SOFTWARE ARCHITECTURE DOCUMENT Author: Gerard Mundo Bosch Content Owner: SVT Analytics REVISION HISTORY DOCUMENT NUMBER: RELEASE/REVISION: RELEASE/REVISION DATE: 1 v0.5 Monday, May 6 Page | 1 TABLE OF CONTENTS 1. Introduction .............................................................................................................................................. 3 1.1 Purpose ............................................................................................................................................... 3 1.1.1 Problem definition ....................................................................................................................... 3 1.1.2 Objectives ..................................................................................................................................... 4 1. 2 Scope .................................................................................................................................................. 4 1. 3 Glossary and acronym list .................................................................................................................. 5 1. 4 Stakeholders ....................................................................................................................................... 5 1.5 Non-functional requirements ............................................................................................................. 8 2. Architecture overview ..............................................................................................................................
    [Show full text]
  • Backbone.Js on Rails
    1 Build snappier, more interactive apps with cleaner code and better tests in less time Backbone.js on Rails thoughtbot Jason Morrison Chad Pytel Nick Quaranto Harold Giménez Joshua Clayton Gabe Berke-Williams Chad Mazzola May 24, 2013 Contents 1 Introduction 7 The shift to client-side web applications ................. 7 Goals for this book ............................ 9 Alternatives to Backbone ......................... 9 The example application ......................... 10 Framework and library choice in the example application .... 10 Conventions used in this book ...................... 11 2 Getting up to speed 12 Backbone online resources ....................... 12 JavaScript resources ........................... 13 3 Organization 14 Backbone and MVC ............................ 14 What goes where ............................. 15 Namespacing your application ...................... 17 Mixins ................................... 18 1 CONTENTS 2 4 Rails Integration 20 Organizing your Backbone code in a Rails app ............. 20 Rails 3.0 and prior ............................. 20 Jammit and a JST naming gotcha ................. 22 Rails 3.1 and above ............................ 23 An overview of the stack: connecting Rails and Backbone ....... 25 Setting up models .......................... 26 Setting up Rails controllers ..................... 27 Setting Up Views .......................... 30 Customizing your Rails-generated JSON ................ 32 ActiveRecord::Base.include_root_in_json ............. 34 Converting an existing page/view
    [Show full text]
  • Developing Backbone.Js Applications
    www.it-ebooks.info Developing Backbone.js Applications Addy Osmani Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo www.it-ebooks.info Developing Backbone.js Applications by Addy Osmani Revision History for the : 2012-04-19 Early release revision 1 See http://oreilly.com/catalog/errata.csp?isbn=9781449328252 for release details. ISBN: 978-1-449-32825-2 1335306849 www.it-ebooks.info Table of Contents Prelude .................................................................... vii 1. Introduction ........................................................... 1 Fundamentals 2 MVC, MVP & Backbone.js 2 MVC 2 Smalltalk-80 MVC 2 MVC As We Know It 3 Models 4 Views 5 Controllers 8 Controllers in Spine.js vs Backbone.js 8 What does MVC give us? 10 Delving deeper 10 Summary 11 MVP 11 Models, Views & Presenters 11 MVP or MVC? 12 MVC, MVP and Backbone.js 13 Fast facts 15 Backbone.js 15 2. The Basics ............................................................ 17 What is Backbone? 17 Why should you consider using it? 17 The Basics 17 Models 18 Views 21 Creating new views 21 What is el? 22 Collections 23 iii www.it-ebooks.info Underscore utility functions 25 Routers 25 Backbone.history 27 Namespacing 27 What is namespacing? 28 Additional Tips 31 Automated Backbone Scaffolding 31 Is there a limit to the number of routers I should be using? 32 Is Backbone too small for my application’s needs? 32 3. RESTful Applications .................................................... 33 Building RESTful applications with Backbone 33 Stack 1: Building A Backbone App With Node.js, Express, Mongoose and MongoDB 33 Reviewing the stack 33 Practical 34 Practical Setup 40 Building Backbone.js Apps With Ruby, Sinatra, MongoDB and Haml 42 Introduction 42 What Is Sinatra? 42 Getting Started With Sinatra 43 Templating And HAML 45 MongoDB Ruby Driver 47 Getting started 47 Practical 48 Installing The Prerequisites 48 Tutorial 50 Conclusions 57 4.
    [Show full text]
  • Django Web Framework
    Django Web Framework Zhaojie Zhang CSCI5828 Class Presentaon 03/20/2012 Outline • Web frameworks • Why python? Why Django? • Introduc=on to Django • An example of Django project • Summary of benefits and features of Django • Comparison of Django and Ruby on Rails • Addi=onal tools to facilitate Django Development • Applicaons made with Django • To learn more about Django • References Web Frameworks Languages Web frameworks • Php • Zend, Symfony, Phpdevshell… • Python • Django, web2py, Cherrypy, … • Java • Struts, Spring, Tapestry, GWT, … • Ruby • Ruby on rails,… • Perl • Catalyst, Mason, … • Javasript • JavaScriptMVC, … • … • … Why Python? • High-level language • Concise syntax and easy to learn • Large and growing developer community • Portable on almost all plaorms Why Django? • Python programming language • Open-source project • Large and growing community • Well-documented • Large collec=ons of apps • Good debugging feedbacks History of the Django Project • Django started as an internal project at the Lawrence Journal-world newspaper in 2003 and was created to meet the fast deadlines of journalism websites. • Django was released to the public by the developers in 2005. • The project was named aer the jazz Guitarist Django Reinhardt. • Now an open source web framework for building maintainable and reusable web applicaons. Introduc=on to Django • A high-level python web framework adhering to the DRY principle: Don’t repeat yourself. • MVC design paerns: code modules are divided into logic groups. • Automac Admin Interface. • Elegant URL
    [Show full text]
  • SPA Design and Architecture
    Understanding single-page web applications Emmit A. Scott, Jr. FOREWORD BY Burke Holland MANNING SPA Design and Architecture Licensed to Mark Watson <[email protected]> ii Licensed to Mark Watson <[email protected]> SPA Design and Architecture Understanding single-page web applications EMMIT A. SCOTT, JR. MANNING SHELTER ISLAND Licensed to Mark Watson <[email protected]> iv For online information and ordering of this and other Manning books, please visit www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact Special Sales Department Manning Publications Co. 20 Baldwin Road PO Box 761 Shelter Island, NY 11964 Email: [email protected] ©2016 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without elemental chlorine. Manning Publications Co.
    [Show full text]
  • Pixaxe: a Declarative, Client-Focused Web Application Framework
    Pixaxe: A Declarative, Client-Focused Web Application Framework Rob King Principal Researcher, TippingPoint DVLabs Abstract than most “server agnostic” frameworks), an extremely easy to use Model-View-Controller (MVC) design, and a This paper provides a brief introduction to and overview very bandwidth-frugal design that transmits a page only of the Pixaxe Web Application Framework (“Pixaxe”). once and then transmits only changes to interesting data. Pixaxe is a framework with several novel features, in- Pixaxe was deisgned to be very useful in developing cluding a transparent template system that runs entirely web interfaces for legacy applications, or in other situ- within the web browser, an emphasis on developing rich ations where the web interface is not the primary inter- internet applications as simple web pages, and pushing as face to a set of data. It was also designed to be very much logic and rendering overhead to the client as possi- efficient in the use of server resources, by limiting re- ble. This paper also introduces several underlying tech- quired bandwidth and performing as much computation nologies of Pixaxe, each of which can be used separately: and rendering on the client as possible. In fact, Pixaxe re- Jenner, a completely client-side template engine; Esel, a quires nothing more of a server than the ability to serve powerful expression and query language; and Kouprey, a static files. parser combinator library for ECMAScript. In feel, Pixaxe is closest to XForms [9] 1, in that it views web pages as declarative interfaces modifying lo- 1 Introduction cal models that can then be synchronized with servers without reloading the page.
    [Show full text]
  • Javascript Web Applications
    www.allitebooks.com www.allitebooks.com JavaScript Web Applications www.allitebooks.com www.allitebooks.com JavaScript Web Applications Alex MacCaw Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo www.allitebooks.com JavaScript Web Applications by Alex MacCaw Copyright © 2011 Alex MacCaw. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or [email protected]. Editor: Mary Treseler Indexer: Fred Brown Production Editor: Holly Bauer Cover Designer: Karen Montgomery Copyeditor: Marlowe Shaeffer Interior Designer: David Futato Proofreader: Stacie Arellano Illustrator: Robert Romano Printing History: August 2011: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. JavaScript Web Applications, the image of a Long-eared owl, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information con- tained herein. ISBN: 978-1-449-30351-8 [LSI] 1313086859 www.allitebooks.com Table of Contents Preface .
    [Show full text]
  • Licensing Information User Manual Release 8.2 Revision 1
    Oracle SD-WAN Edge Licensing Information User Manual Release 8.2 Revision 1 October 2019 Licensing Information User Manual Oracle SD-WAN Edge 8.2 Oracle SD-WAN Edge Licensing Information User Manual, Release 8.2 Copyright Information Copyright © 2019, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs.
    [Show full text]
  • A Simple MVC Framework for Widget Development
    A Simple MVC Framework for Widget Development Behnam Taraghi1, Martin Ebner1 1Graz University of Technology, Social Learning, Computer and Information Services, Graz, Austria [email protected] [email protected] Abstract. The great advantage of a Rich Internet Application (RIA) is the improved performance, since a great part of the processing can be done on the client-side rather than the server-side. For many web-based RIAs JavaScript (JS) is the most common programming language as it is popular as a script language for browsers. While server-side programming languages have the advantages of object oriented programming paradigm, JS bases on objects with a specific object literal notation. Using design architectures such as Model View Controller (MVC) in JS reduces the code complexity and allows semi- parallel application development. It causes an easier and much less time- consuming development on further extensions of RIAs. Web-based widgets are actually RIAs. In this paper a very simple design pattern for widget development is introduced that bases on MVC design architecture. The pattern has been applied during the development phase of widgets for the Personal Learning Environment (PLE) at Graz University of Technology (TU Graz) and is mostly appropriate for students and RIA developers who have beginner knowledge/experience in JS programming. Keywords: PLE, Personal Learning Environment, Widget, MVC, Rich Internet Application, RIA 1. Introduction Nowadays there are many Web 2.0 applications and information systems on the World Wide Web. Since the very first beginning of the so called ReadWriteWeb [1] and following the first attempts on e-Learning 2.0 [2], educational organizations in particular universities provide various services to the students online.
    [Show full text]
  • Curriculum Vitae
    Curriculum Vitae personalia voornaam Rudy achternaam Bruning geboortedatum 20 juni 1980 adres Tarweveld 7, 6641SJ te Beuningen mobiel 06-14663759 e-mail [email protected] rijbewijs B werkervaring 13 jaar profiel Met meer dan 13 jaar development ervaring heb ik me ontplooid tot een allround agile software engineer. Ik heb een basis met .NET C# en werk de laatste 4 jaar veel met methodieken, zoals Agile / XP en SCRUM. Ik werk graag op projectbasis in teamverband en draag daarin mijn verantwoordelijkheid. Binnen een automatiseringstraject streef ik er graag naar om duurzame oplossingen te vinden voor zowel de wensen van de klant, als bijvoorbeeld de onderhoudbaarheid/herbruikbaarheid van de software denkend aan de kosten voor later. opleidingen (diploma) 1999 – 2003 Hogere Informatica, bachelor of ICT, HAN te Arnhem 1997 – 1999 Havo, Montessori college te Nijmegen 1993 – 1997 Mavo, Montessori college te Nijmegen kennis en vaardigheden Methoden Agile / XP, SCRUM, Kanban .NET C# C# 3.5/4.0, ASP.NET, .NET web & application development TDD, nServiceBus, (fluent) nHibernate, .NET MVC 4, MS SQL, Oracle, UML, Razor, WCF, Entity Framework. Ant, Hibernate, jUnit Java Diversen JavascriptMVC, jQuery, Jasmine, NodeJS, ExpressJS, CouchDB, node-build, soda, selenium RC, Hudson, HTML5, CSS. Twitter Bootstrap (2 en 3), MongoDB, IoC, Redgate. overige Java, C, C++, Android Development, Continuous Integration, TFS, Continuous Development, SQL-lite, Delphi, Spring, Photoshop, Fireworks, Visual Studio 2005/2008/2010/2012, WebStorm, WatiN, PL-SQL, Resharper. Curriculum Vitae cursussen, conferenties 2014 nServiceBus, InfoSupport 4-daagse training en cursus over het gebruik en configuratie van NServiceBus. 2009 Cursus AYE; Phoenix, USA Cursus op het gebied van communicatie en persoonlijke effectiviteit.
    [Show full text]