Maintainable: Other than what you have mentioned, a maintainable system also means that doing major changes should not be much of a problem (obviously this depends on the size of the change itself). That is, if the client wants to make an overhaul of the entire UI layer, then, doing so would mean that you do not need to rewrite half of your business logic and data layers.
Scalable: Not really. An application scales well if it is able to accommodate an increasing number of users without any major impacts on its ability to perform. If your application handles requests under 10ms for 1000 users but takes 1000ms for 2000, then it might be that your application is not scaling well. Scalability is usually achieved through a clever design will allows clever usage of resources, such as database connections and other mechanisms such as caching, which can reduce the usage of heavy operations.
Modular: Not exactly. An application is modular if it is loosely coupled but tightly coheased. What this means is that modules are independent from each other however, they work well in unison. So, as per my previous example, if you build your application in a modular manner, doing changes in the UI layer, should not affect your business layer, and the same goes the other way round.
As per this statement:
Now how MVC makes the code modular. Probably becoz team can work independently on views, controller and models.
it is my opinion that MVC makes it easier to break the system into modules. That being said, I do not think that if a system does not use MVC then the system is not modular etc. You can encounter applications which where built with the MVC pattern but are a nightmare to maintain, and the same goes the other way round.
Answer from npinti on Stack OverflowHi,
What does it mean to write codes that scales?
What exactly does this mean in the coding world and can anyone provide some examples of “scalable code” vs “non scalable code”
Thank you
Videos
Scalability is the ability of a program to scale. For example, if you can do something on a small database (say less than 1000 records), a program that is highly scalable would work well on a small set as well as working well on a large set (say millions, or billions of records).
Like gap said, it would have a linear growth of resource requirements. Look up Big-O notation for more details about how programs can require more computation the larger the data input gets. Something parabolic like Big-O(x^2) is far less efficient with large x inputs than something linear like Big-O(x).
Scalability is the trait where a software solution can handle increased loads of work. This can be larger data-sets, higher request rates, combination of size and velocity etc.
When talking about systems scalability, we usually differentiate between
- "Scale up" - the ability to grow by using stronger hardware
- "Scale out"- the ability to grow by adding more hardware
A solution that can scale out can usually grow to lager loads in a more cost effective way. An important thing to know here is Amdahl's law that states that the ability to scale out is limited by the sequential part of the software
I often hear things like, "PHP is good because it's easy to learn, but Java is more scalable". What exactly is meant by this? I know it's referencing that the language does better under higher traffic, but what would make one language better at handling this than another? Thank you for any responses
If you want an academic viewpoint, read this paper. If you are thinking about Scala, read Odersky and friends’ overview where they discuss what makes Scala scalable. There’s also a related question.
In a nutshell, Scala has features such as operator overloading, user-defined classes, traits, and many others, that allow one to express many domain-specific problems in a very natural way.
There is no such thing as a scalable language. Every language to date fails in some regard.
Does the program support libraries written in that language?
Pascal exemplifies this problem. not scalable in this sense.Is the language consistent?
Visual Basic is not scalable in this sense. Visual Basic is an outlier in this sense in that it consistently exhibits an utter lack of consistency. Operating overloading in C++ and other languages is a nice feature, but also a misfeature when the overload is inconsistent with the base meaning (e.g.std::isteam::operator>>).Is the language stable?
A program written 20 years ago in Fortran or Lisp has a good chance of being compilable and runnable today. Python and scala are not scalable in this sense. Upgrade to the latest and greatest and you may well break code that was written last week.Is the language widely accessible?
The first computers were programmed at the bit level (ENIAC) or machine level (UNIVAC-1). Six women were capable of programming the ENIAC. Those six women have been recognized by multiple organizations for this incredible feat. A modern day large-scale complex of programs is written by people with varying levels of programming skill. A language that requires an advanced degree in computer science is not scalable. Lisp, for example, is a beautiful language that has pretty much languished in academia because it is not accessible to the masses.Does the language support strings?
Good luck writing a parser in Fortran.Does the language support numerical processing?
Good luck writing a scientific program in Cobol. Diehard Fortran programmers reject C (and C++, and Java, and ...) because in their minds nothing comes close to Fortran when it comes to scientific programming. For this reason, a lot of the scientific libraries provided by non-Fortran languages are simply wrappers around Fortran libraries rather than ports of the Fortran implementations to the target language.Is the language applicable to a wide scale of problems?
The above two questions are specializations of this broader question. The original general-purpose languages, Fortran, Lisp, and Cobol. were anything but general purpose.Does the language perform well?
Good luck writing a simulation of a galaxy in python or scala. The answer might come back when the universe ends. Performance doesn't matter, until it does matter. When it does matter, performance can be paramount. A language that shuns addressing performance issues is not scalable.Does the language invite bad programming techniques?
Perl invites programmers to write write-only code. FORTRAN (Fortran much less so) invited programmers to write spaghetti code. Modern languages invite programmers to hide the spaghetti with constructs such as exceptions and breaks, but it's still old-style spaghetti. There's also spaghetti inheritance in C++ and Smalltalk, spaghetti call trees in languages where a ten line function is viewed as being too long. And of course holey lasagna, leaky ravioli, and a host of other kinds of bad pasta code. These misfeatures argue against scalability.Is the language a good language for authoring legacy code?
Far too many large projects find they need to hire an ex-employee as a consultant because the original author is the only person who has even the slightest chance of understanding the code. A language that is good for authoring legacy systems is not a good choice as a scalable language.Is the language safe?
Large systems are inevitably written by people who somehow manage to find all of the flaws in the implementation language. Project managers of a large, complex system can choose from two classes of people to author the system: Computer scientists who are clueless of the problem domain or domain experts who are clueless about how to write code well. They can't use people who can live in both worlds because such people are few in number and would destroy the company's pay scale. A scalable language has to be safe with regard to the domain and with regard to computer science constructs. Such a language does not exist.