Code Monkey home page Code Monkey logo

obwa's Introduction

Office Building Web Architecture (OBWA)

This article is still in draft, so not all ideas, concepts, naming conventions and etc. have been fully fleshed out and will be changing/evolving/improving.

This document aims to describe a (hopefully) new architecture, along with a set of rules for implementation, that will provide more separations of concerns (layers) that will be well defined. This architecture and rule set will try to make implementations stay more true to the classical definition of Object Oriented (OO) programming and should help steer towards “best practices”, like SOLID.

Diagram:

(Todo)

Definitions and Comparison to MVC:

  • Front Door: This is the entry point into your application. In PHP this would be the index.php that located in a publicly accessible folder and it would load in the non-publicly accessible code (Lobby).
  • Lobby: This is where things get initialized for use by the application. HTTP request, cookies, configuration, dependency injection, routing and such.
  • Office Directory: This object would be the request router.
  • Public / Front Office (Ex: IndexPublicOffice / IndexFrontOffice): This would be that class that would be analog for “Controller”.
  • Front / Request Desk: Name for public methods, which would be the analog for “Action” in a “Controller”.
  • Private / Back Office / Department (Ex: ?): Not “accessible” by the public. Typically does auxiliary work.
  • Utility Closet: This would be for utility classes, like a class that works with strings.
  • Data / Records Office (Ex: ?): A virtual grouping of the data departments, which are departments that deal with data, such as database related requests.
  • Data Inquiry / Query Department (Ex: PostsDataInquery, PostsDataQuery): This class will have methods which only a single query will be performed. No logic should be performed on the data received. Logic performed on the data provided to the query should be limited, such as casting values to proper types, but avoid things like ‘strrev’ (PHP function to reverse a string). Logic that is performed by receiving entity (like MySQL) via the query request (query string) is OK.
  • Data Reports Department (Ex: PostsDataReport): This class will be used to perform logic on the data sent to or received from the Data Inquiry Department. Also you can perform multiple Data Inquiry Department calls here in a single method, but it recommend not getting to carried away with that freedom.
  • Presentation Department / Office: (Virtual grouping?) This would the analog to “View”.
  • Type Set Desk / Printing Press: (Can we split this into two things?) Takes data in, fills in the templates, returns filled template.

Implementation Rules, Guidelines and Considerations:

obwa's People

Contributors

ellisgl avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.