158

MVC is a software architecture - the structure of the system - that separates domain/application/business (whatever you prefer) logic from the rest of the user interface. It does this by separating the application into three parts: the model, the view, and the controller. The model manages fundamental behaviors and data of the application. It can respond to ...


138

Analogy I explained MVC to my Dad like this: MVC (Model, View, Controller) is a pattern for organising code in an application to improve maintainability. Imagine a photographer with his camera in a studio. A customer asks him to take a photo of a box. The box is the model, the photographer is the controller and the camera is the view. Because the box ...


87

MVC is mostly a buzzword. It used to be considered a pattern, but its original 1979 definition has been dumbed-down, passed-on, misinterpreted, taken out-of-original-context. It's been ill-redefined to the point it starts resembling a religion, and while this certainly helps its cargo cultists defending it, its name doesn't associate anymore with a solid ...


80

I don't think anyone can explain it better than Martin Fowler does, further down the article you linked to. For this new breed of containers the inversion is about how they lookup a plugin implementation. In my naive example the lister looked up the finder implementation by directly instantiating it. This stops the finder from being a plugin. The approach ...


78

UPDATE: I've revised this answer. A number of good points were raised in the comments that deserved calling out. If my class implements an interface then can I say that I'm following inheritance? It is not entirely clear what you mean by "following inheritance". Let's ask a slightly different question? What is inheritance? When members of one type X ...


68

Let's say you have some sort of "repository" class, and that repository is responsible for handing data to you from a data source. The repository could establish a connection to the data source by itself. But what if it allowed you to pass in a connection to the data source through the repository's constructor? By allowing the caller to provide the ...


50

You're basically correct about P and NP, but not about NP-hard and NP-complete. For starters, here are the super-concise definitions of the four complexity classes in question: P is the class of decision problems which can be solved in polynomial time by a deterministic Turing machine. NP is the class of decision problems which can be solved in polynomial ...


42

There isn't one; it's a buzzword. The delineator though is that your data is beyond the capabilities of traditional systems. The data is too large to store on the largest disk, the queries take tons too long without special optimization, the network or disk can't support the incoming traffic flow, a plain old dataview isn't going to handle visualization for ...


39

The best way to define it is to go to the original writings of Trygve Reenskaug, who invented it: http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html This paper, in particular, is generally considered the definitional text: http://heim.ifi.uio.no/~trygver/1979/mvc-2/1979-12-MVC.pdf MODELS Models represent knowledge. A model could be a single ...


39

The term is not performance related, at least not anywhere I have seen it used. It is specifically about code that is not maintained well and becomes... dirty... rotten. It is about code whose design has not been updated as changes were made and is difficult to read and understand.


33

Both describe the consistency of an application's behavior, but "robustness" describes an application's response to its input, while "fault-tolerance" describes an application's response to its environment. An app is robust when it can work consistently with inconsistent data. For example: a maps application is robust when it can parse addresses in various ...


32

Here's the "regular" control flow programs usually followed: Run commands sequentially You maintain control over the control flow of the program Inversion of Control "inverts" that control flow, meaning it flips it on its head: Your program doesn't control the flow anymore. Rather than calling commands as you see fit, you wait for someone else to call you....


26

Inheritance means writing a new subclass for a superclass. Writing a new class against an interface is implementing that interface. (And writing a new interface based on an old one is extending that interface.) The only correct term that applies to all three possibilities is subtyping. Not every subtype is a subclass.


24

I write embedded software for telecommunications equipment. My problem domain is ethernet, voice, and video protocols. In other words, all the stuff that has nothing to do with the language I'm programming in, but that I still must understand in order to write the software. If you're making a website for selling photography services, the problem domain is ...


21

In the context of testing tools you mentioned, such as PHPUnit and Fitnesse, this term definitely refers to the notion of test fixture: something used to consistently test some item, device, or piece of software... Software Test fixture refers to the fixed state used as a baseline for running tests in software testing. The purpose of a test ...


20

The generic definition of "data structure" is anything that can hold your data in a structured way, so yes this would include composite types and primitive types in addition to abstract data types. For example, a string is a data structure as it can hold a sequence of characters in a structured way. However, the term also has another meaning to programmers. ...


20

Server-side runs on the server. Client-side runs on the client. Back-end is crunching data. Front-end is displaying it. Look at this web page. Pulling all the comments from the database is server-side, back-end work. Laying that data out in a template is front-end, server-side work. The AJAX voting widgets and the fancy text input box are front-end, ...


19

A rule R is left-recursive if, in order to find out whether R matches, you first have to find out whether R matches. This happens when R appears, directly or indirectly, as the first term in some production of itself. Imagine a toy version of the grammar for mathematical expressions, with only addition and multiplication to avoid distraction: Expression ::=...


18

Lets face it. "Software rot" is not a well-defined technical concept. It is more of a pejorative description of what happens when software is poorly maintained. The Wikipedia page represents one view, but there are clearly alternative views. And you could say that the different views reflect the different priorities and concerns of the person holding the ...


18

For me, a string literal is a language construct, an hardcoded string is a string whose value is fixed in a program (you may discuss if it needs to be fixed at compile time or could be somewhat determined by some runtime consideration). An hardcoded string is often a string literal but could come from other sources (say concatenation of character literals ...


15

Mathematically, enumerable means "can be placed into a one to one correspondence with the natural numbers". Most representations in computing are enumerable because they are made of strings of bits, and strings of bits can be taken to denote numbers in the binary system. Some data representations are not considered enumerable, though. For instance a ...


15

When you're writing C++, don't write it as if it were Python or D or Java. Those are fundamentally different languages with different idioms. When we are talking about inline functions in C++, we have to distinguish two related but distinct concepts: inline functions in a header. Function definitions within a class declaration are implicitly inline. ...


14

Because agile isn’t a framework. It’s a mindset. Individuals and interactions over processes and tools - don’t tell your devs to follow some script. People should talk to each other, not be cogs in some machine. Working software over comprehensive documentation - software matters, not the promise of software. Demos and examples work better than user guides ...


13

According to Wikipedia: Parallel computing is a form of computation in which many calculations are carried out simultaneously, operating on the principle that large problems can often be divided into smaller ones, which are then solved concurrently ("in parallel"). That is, parallelism always implies concurrency. Also, are multi-threaded programs ...


13

It is about who controls instantiation of dependencies. Traditionally, when a class/method needs to use another class (dependency), it is instantiated by the class/method directly. It controls its dependencies. With Inversion of Control (IoC), the caller passed in the dependency, hence it instantiates the dependency. The caller controls the dependencies. ...


13

Firstly, antibugging isn't a commonly used term, a few people use it, but it won't be generally recognized. For those people that do use it, they mean practices to avoid writing bugs in the first place rather than removing bugs after they are found.


11

MVC is a design pattern used to isolate business logic from presentation. It differs from a lot of other design patterns by the fact that it usually isn't implemented succinctly, but is the base of a framework. While an application implementing a Strategy pattern is just a small detail about it, saying that a web app uses the MVC design pattern is very ...


11

I just pulled out my copy of JavaScript: The Definitive Guide, flipped to chapter 6, and quickly read over the section 6.5 Enumeratng Properties. Now, I should add that I'm not a particularly strong math person either, so hopefully this makes sense: Specifically, "enumerable" means that there is some sort of ordering scheme taking place, so that you can ...


11

Comma is a separator between parameters in the parameter list. Comma is part of the parameter lists. Optional parameters are usually specified inside square brackets in documentation like so: [, int $case = CASE_LOWER]. Comma is added to specify that if you were to use the second optional parameter, you must have a comma separator as well. The fact that ...


Only top voted, non community-wiki answers of a minimum length are eligible