Programming Languages and Web Development
Basics of Programming Languages and Web Development
The central activity of software development is programming or writing actual code. This requires an in-depth understanding of one or more computer programming languages.
In web development, a certain number of specific programming languages are required, and several others are simply very popular. Each language carries with it its own peculiar uses, strengths, and weaknesses. Additionally, the tools available in each language go a long way to determining their overall suitability for a particular task.
Why Are There So Many Different Languages?
If you are just getting started with web development, you might find it overwhelming when you realize that you might have to learn more than one programming language — it is hard enough to learn one language! So, why are there so many different programming languages out there?
Different Types of Languages
The first reason for the multiplicity of programming languages is that very different types of languages are needed. Even if no two languages overlapped in terms of functionality (which isn't the case), it would probably take a half-dozen different languages to cover all the various language needs.
The three most important types of languages for web use are:
- Markup Languages, which are used to annotate data and content with semantic information about that content.
- Style Sheet Languages, which are used by rendering engines to determine how to display data and content.
- Programming Languages, which are used to instruct a computer to do certain things.
Programming languages are further divided into low-level languages and high-level languages. The latter are relatively human-readable — they tend to follow the structure and syntax of real languages.
Such languages need to be interpreted or compiled by the appropriate tools before the computer recognizes the commands provided.
Low-level languages (which generally refer to machine code or assembly languages) are those that can be read by the computer with little to no additional assistance.
In addition to being difficult for humans to read, low-level languages aren't typically portable between different types of systems. High-level languages usually are.
Do I Need More Than One Language?
As you can see, there isn't really a way for you to do everything you need to do without utilizing multiple languages. Gone are the days when you can throw a simple website on the internet without focusing attention on the way it looks or its interactive features.
Luckily, the high-level languages in use today are much friendlier to developers than even the high-level languages frequently used in the years past.
Different Focuses of a Programming Language
Each programming language has a certain focus, which affects how it is used and what types of use cases make it the best option.
Website and Application Development
For example, PHP is designed to be embedded into HTML documents. This makes it particularly useful for building websites and web applications.
C and its derivatives (C#, C++) provides access to low-level hardware manipulation, which makes it particularly useful for foundational software like operating systems and language compilers.
Specialist Purposes of a Language
There are also programming languages that are specifically geared for a number of different type of specialty domains. Some of these include command-and-control, artificial intelligence, data analysis, and graphics processing.
You can certainly use a language for a purpose other than the one for which it is intended, but there are certainly downsides to doing so. We cannot make a categorical statement on what the ramifications of such a choice are, but they may include a sub-optimal feature set, lowered levels of performance, and so on.
Popular Web Languages
Because of a combination of requirements, popularity, and historical accident, certain programming languages have become especially associated with web development, rather than with desktop applications.
Such programming languages fall into two broad categories:
- Client-Side languages: Files written in client-side languages are sent directly to web browsers, which interpret the files and display the content to the end-user of a website.
- Server-Side languages: Server-side languages are programming languages that are used to build web applications which run on the server (the computer that hosts the website, not the computer of the person visiting it).
The Importance of Differentiating Client-Side vs Server-Side
However, these are not hard-and-fast categories. While there was, at one point, a strict separation of concerns between the front- and back-ends of apps and websites, there is increasing overlap between the two.
For example, some things that were once considered exclusively the domain of the front-end are now done on the back-end, such as certain types of rendering. Nevertheless, these two categories are useful for general classification of languages.
If you are doing any type of client-side web or front-end development work, you will likely be using the following programming languages. These three options are essential.
Even if you do not become an expert in them, you will need to have some degree of proficiency when working in web development. If anything, these are commonly used in conjunction with server-side/back-end languages, not instead of such languages.
- HTML — Hypertext Markup Language
- CSS — Cascading Style Sheet
HTML — Hypertext Markup Language
Website pages and documents are written in HTML, which consists of base content combined with inter-linear tags that provide semantic information about the content they enclose.
CSS — Cascading Style Sheet
CSS provides a set of detailed instructions to the browser (or a printer) about how the content of an HTML document should be displayed. CSS includes details like font declarations, sizing, color, on-page placements, and layering precedence.
Components of a Functioning Outcome
You can think of these three languages acting together with the way different components of a housework together. HTML is like the foundation and the frame of the house.
Almost any programming language (C#, Objective-C, etc.) can be used to build server-side applications, but a handful of specific languages have come to be especially popular for doing so.
Some of them were designed for the web (PHP, ASP), while others began as general-purpose languages that have been extended with a set of standardized tools for doing web development.
Technically an application development platform/framework, ColdFusion utilizes the scripting language ColdFusion Markup Language (CFML), ColdFusion is designed to make it easier for developers to connect HTML web pages to databases.
Java is a general-purpose, object-oriented language used for desktop, web, and embedded applications on a wide variety of platforms. Has been used as a client-side scripting language, but this requires a browser plugin, so it is no longer common.
PHP — PHP hypertext preprocessor — is the most popular server-side scripting language in the world. PHP is behind the most popular content management systems like WordPress, Drupal, Joomla, and Mediawiki.
Python is a popular general-purpose, object-oriented programming language that is popular for shell scripting, and popular for other uses among the type of people who really get into shell scripting.
Ruby is a very popular, elegantly constructed, high-level programming language with an devoted user base. Can be used on its own as a general purpose language for desktop applications or shell-scripting.
For web use, it is usually used in the context of the Ruby on Rails application framework.
Other Notable Server-Side Languages
SSI — Server Side Includes — is a very simple server-side scripting language for including HTML document portions into other HTML documents.
VB.NET — Visual Basic .NET — A part of Microsoft's .NET family.
Perl is known as a general-purpose programming language, particularly popular with hip Comp Sci geeks.
- MongoDB, one of the leading NoSQL databases available
- Express.js, a Node.js-based web application framework
- Angular.js, a web application framework used for creating interactive and dynamic front-ends
We do want to note that the MEAN stack is not the only option available — there are other options that might be better choices for your project.
Other Web Languages
The web isn't just about websites anymore. As the internet increasingly encompasses devices, real-time gaming, virtual reality, and a whole host of other new technology paradigms, new languages are being created. These are being put into service to implement new ideas. Some that you might see include:
- TCL — Tool Command Language — Open source, powerful programming language often used for command-and-control applications.
- WAP/WML — Wireless Application Protocol & Wireless Markup Language - Commonly used for things like data transfer and presentation (the languages are deprecated, but you may still see it in use)
- VRML — Virtual Reality Modeling Language - Format for representing 30D items, such as vector graphics (has been superseded by other languages)
Should I Pick a Specific Language?
Generally speaking, you would try to avoid using such specific languages (otherwise known as domain-specific languages). The internet has certain de facto rules for which languages "should" be used and which languages should be avoided.
We do not think there is never a time where you would pick a specialized language — we just think that choosing commonly-supported languages means that you will:
- Have an easier time finding tools and services, such as web hosting, that work well with what you have built
- Have an easier time reaching a wide audience due to widespread support and acceptance of popular languages and technologies
How Does My Choice of Programming Language Affect My Web Hosting Choices?
If, however, you opt for a less-commonly used option, such as ColdFusion, you will have fewer options. Furthermore, the options that are available will typically cost more.
Go for Popular Options If Possible
It is up to you which you choose first (your web hosting provider or your programming language(s)), but it is important to make sure the two will play nice with each other.
There are a lot of programming languages out there, even for a subset of software engineering, such as web development. Different languages have different strengths and weaknesses, so the options that best fit your needs are dependant on what you are trying to do.
Framework Options and Hosting
What is a Framework?
A web application framework is a generic web-based software application which is extended and modified by developers to create a specific application.
The framework provides:
- Generic functionality
- Built-in solutions to a number of common programming problems
- Structure for organizing code
- A development philosophy or an architectural paradigm
Most software applications, including web-based applications, have a number of very similar features or functionalities. This is especially true of web applications, which utilize the following:
- URL routing
- Templating / views
- Database interaction
- Form controls
- DOM manipulation
- Asynchronous requests
- Input validation
- User management
- Session management
Dealing with Web Applications Within a Domain
This is, even more, the case when dealing with web applications within a certain domain. For example:
- All eCommerce applications have to deal with payment processing, security, product management, and pricing
- Every content management system (CMS) has to deal with authors, content editing, comments, categories, media uploading, and menus
In most business cases, there's very little sense in spending the time and money to code and develop all these functions over and over again.
What Makes a Good Framework?
A good application development framework solves most of these problems so that they don't have to be dealt with by the application coders/developers. This not only saves time but it also usually ensures that the code for these low-level foundational features are well-built and tested in production.
It is a better use of programming resources to focus on new features and business-specific functions.
Frameworks and Architecture
An application development framework is more than a series of boilerplate libraries or sets of code. It isn't just an assemblage of tools.
So Is a Framework an Application?
Rather, a framework is a generic form of an application, which is made specific by a development team. (This is somewhat analogous to an abstract class being subclassed.)
The result of this is that application frameworks necessarily impose an architectural paradigm and sometimes a development philosophy. Some developers consider this imposition a reason not to use a framework, but actually, it is precisely their most important benefit.
What Does a Framework Provide?
Providing an architectural structure eliminates the need to decide how the various parts of the application are going to work together.
It promotes a well-designed organization of code and a sensible separation of concerns. It saves coders from arbitrary decisions about where to place certain types of logic.
Most web application frameworks follow some version of the Model-View-Controller (MVC) architecture pattern.
The MVC pattern is one of the simplest and most fundamental architectural patterns around. It is particularly well-suited to the web, which is essentially a network of user-interface clients. Model-View-Controller is a way of organizing an application into three distinct areas of concern:
- Model: The data structure
- View: The formatted output to the user
- Controller: The connection between the model and the view, as well as the application logic
The model defines the data schema for your application. It usually takes the form of a series of classes which specify the main items of interest to the application, such as:
- Blog posts
In most web application frameworks, the model classes are used to generate the database structure. An underlying framework class (often called the active record pattern, of which object-relational mapping is a subset implementation) communicates with the database.
The model class and its underlying framework class provides a layer of abstraction, which allows many framework options to be database-agnostic.
The View is usually a set of template files that determine how specific models are displayed to the user.
There is usually at least one view per model, and in certain cases, there may be several views per model — for example, there might be a set of data that needs to be presented in three different ways.
In the conventional MVC paradigm, the Controller is simply the glue that holds the Model and View together. But in many real-world situations, especially those with strong command-and-control requirements (robotics, dispatch, traffic management), the controller can become a very large part of the application.
The Controller can often be broken down into two distinct parts (though this depends on the framework).
The Application Controller takes requests from the web server and calls the models and views needed to fill the request. In MVC parlance, this is the original meaning of controller.
There can often be individual controllers that deal with specific types of functionality, such as a forms controller, or an email controller.
Choosing a Development Framework
One of the problems in selecting a web application framework is that they tend to be fairly similar, especially at the level of textual descriptions. Most of them are MVC, most of them handle basic needs like session management, most of them promise to speed up development, most of them claim to improve developer happiness.
Are Many Frameworks the Same?
A big part of the reason for this is that success creates imitators. As the various framework developers have seen what the others are doing, they have each worked the best ideas into their own code.
There is a convergence of excellence which makes most popular frameworks both very good and very similar.
Should My Existing Programming Knowledge Determine My Choice?
The biggest determining factor when it comes to which framework you choose is language. If you already know how to write PHP, you should probably use a PHP framework. This makes sense, rather than try to learn a new language just for the sake of using a new framework.
(The big exception to that is, of course, Ruby on Rails, which has caused many people to start learning Ruby.)
Beyond that, your best bet is to actually look at some applications built using the frameworks you are considering.
Use Real Life Examples as Guidance
Has someone built something remarkably similar to what you want to build? Use the same framework. Does one framework just seem to make more sense to you than the others? Use that one.
Most frameworks provide remarkably similar features. So instead of trying to find the framework that is right, try looking for the one that is right for you.
Web Development Frameworks by Language
In the following sections, we will cover a variety of frameworks for some of the most popular web development languages.
In addition to helping you get started with choosing the option that is right for you, you will be able to see how different options are similar (or not) and how developers have chosen to implement features and functionality.
PHP is a server-side language commonly used for scripts, but it has gained popularity as a general, all-purpose language over the years. Some of the PHP frameworks available include CakePHP, CodeIgniter, Laravel, Symfony, Yii, and Zend.
CakePHP is a more modern framework that includes the scaffolding features for which Ruby on Rails is famous. Builds are quick, and you get many different tests and security features built into the framework.
If you are looking for a lightweight framework that is great in rapid app development situations, look no further than CodeIgniter. CodeIgniter is easy to use, comes with numerous libraries, and is affiliated with an active community, so you are sure to find plenty of resources for working with CodeIgniter.
If you are looking for a free and open source framework that will help you create collaborative software, then Horde might be the option for you.
In addition to providing you with components like email and calendars, Hoard functions the way you would expect a general, all-purpose web app framework to function. You will get the classes you need to handle:
- User preferences
- Compression for files
- Browser detection
- Connection tracking
- Mime handling
Laravel is one of the most popular PHP frameworks. Laravel is free, open source, and intended to facilitate rapid app development.
Laravel was originally designed to be a more advanced alternative to CodeIgniter. There is also a content management system that has been built on top of the Laravel framework (it is called October).
MVC Support by Laravel
Laravel supports the MVC architecture pattern, comes with built-in unit testing functionality, and includes many features right out of the box.
It has a modular packaging system/package manager for feature additions, multiple methods for communicating with relational databases, and utilities for aiding application deployment and maintenance.
Symfony is a performant, stable, and mature PHP framework. Though using Symphony comes with a steep learning curve, there is excellent documentation and support available.
Reusable Libraries and Components
Symfony emphasizes reusable PHP components and libraries since the overall goal is to speed up the creation, deployment, and maintenance of PHP web apps and websites. There is somewhat of an enterprise focus, and developers are tasked with full configuration control and decision making.
Symfony is heavily inspired by the Spring Framework, which is a framework available to users of the proprietary Java programming language.
Yii is an open source, high-performance framework designed for applications that need complex (yet quick-loading) web pages. Yii is meant to be easy to use, and it is one of the oldest PHP frameworks that is still actively maintained.
If you are looking for an enterprise framework, Zend might be the option for you.
It is not ideal for rapid app development, but you do get top-notch security features, high performance, and the ability to extend your platform as necessary. Its enterprise focus means there are lots of components like authentication, forms, and so on.
Zikula is so much more than just a web app framework. You can almost think of it as a combination content management system (CMS) and web application framework.
Zikula is an extension of Symfony (which we covered briefly above). The biggest draws of Zikula over Symfony are the increased features devoted to the development of dynamic features, a theming system, support for rapid prototyping, and its CMS-related features.
In a lot of cases, Zikula might be a bit much. However, if you are looking for a full-featured framework that you are unlikely to outgrow, Zikula would be a great option for you.
Ruby is a modern, easy-to-use, object-oriented programming language designed to make programmers happy. However, Ruby was used relatively infrequently prior to the success of the Ruby on Rails framework.
Ruby on Rails
Ruby on Rails (sometimes referred to as just "Rails") is the reason why Ruby exploded in popularity. In the early 2000s, David Heinemeier Hansson developed a custom web framework for use with Bootcamp's flagship product. Hansson then extracted the framework backing the product and released it as an open source project.
Ruby on Rails is a server-side framework using MVC and is what software developers call an "opinionated framework." Rails is built to encourage you to do things a certain way -- while this can stifle some creativity/freedom, Rails, in the end, is great for developing robust applications (even if they are not the most performant).
Named after musician Frank Sinatra, this framework is one of the major alternatives to Ruby on Rails if you are working with Ruby.
Sinatra differs from Rails in that it ships only with the basics -- while Rails is a monolith that handles pretty much everything, Sinatra has chosen the opposite route and given you only what you need to develop a web application.
If you are working with Java, which is commonly used in enterprise situations, one of your options is the Spring Framework. While Spring itself can be used by Java apps in general, you can take advantage of the extensions available to build web apps on top of Java Enterprise Edition (or Java EE).
Spring doesn't require you to follow any particular paradigm or programming model, but you can use the Spring MVC component if following the MVC pattern is important to you.
Python is a high-level, object-oriented, all-purpose programming language that has seen a surge in popularity recently (especially in the data science fields).
Python is not as commonly used for web development as other languages, but that doesn't mean you won't see Python web applications with some regularity.
Django boldly proclaims itself as the "web framework for perfectionists with deadlines."
It is no surprise that Django is one of the most popular Python web frameworks. In addition to being free and open source to all users of Python, Django offers what some people refer to as an "all-inclusive" experience -- you get everything you need, plus more.
The goal of Django is to make it easy for Python developers to create complex websites that are data-driven. The components you create can easily be reused (Django adheres almost dogmatically to the "don't repeat yourself" school of thought), and you can easily get your web apps spun up quickly.
Administrative Features and Implementation
Furthermore, you will get excellent administrative features, such as dynamically-generated CRUD (create, read, update, and delete) interfaces.
Django will not ask you to decide how you want certain things to be implemented if that's not something you want to do. Generally speaking, if you are working with a more straightforward project, Django is the Python web framework to go.
Flask is a great Python framework (technically speaking, Flask bills itself as a "micro web framework") if you are seeking something that is simple to use, yet flexible. Flask is considered to be a micro framework because it does not:
- Require specific tools or libraries
- Include components whose functions are provided by third-party libraries
To add application features, you would need to use Flask extensions (luckily, there are a wide variety of extensions and most tend to be updated more frequently than the Flask core itself).
Flask allows you to make the decisions as to how you want certain aspects of your web application to behave.
Angular.js is a front-end web application framework put out by Google and maintained by Google and a community of open source contributors. Its goal is to simplify the development lifecycle of SPAs (specifically during the development and testing phases), and it utilizes MCV, as well as the model-view-ViewModel (MVVW).
Angular.js was originally launched to address issues raised by the development of single-page applications, which are web apps or websites that rewrites itself dynamically based on its interaction with the user, rather than that reloading the page in its entirety with files from the originating server.
Such web apps/web pages are seen to behave more like a desktop application.
Express.js is not, strictly speaking, a web application framework like many others on this list are. Express.js is more like a server framework for web applications, and you will frequently find it used as part of the MEAN stack, which includes:
Express.js is inspired by the simplified Ruby framework, Sinatra. Express.js as a whole is a very simple project, but users can easily add what they need using plugins.
Furthermore, apps utilizing Node.js are very fast compared to apps built with PHP or ASP.NET. PHP or ASP.NET apps handle requests sequentially, so waiting times greatly affect the performance of the app. Node.js, however, handles thing asynchronously and eliminates the waiting period present with traditional apps.
Node.js is extremely popular, and its community is large. There are thousands of open source libraries available, as well as two large mailing lists, IRC channels, and many developer-oriented conferences.
Its strength is to allow developers to create pages that can be continuously updated with data and changed, all without requiring a page refresh (something that is typically less optimal, since users do not like interruptions).
Microsoft is one of the biggest players in the technology industry, and the company has certainly contributed to the web app framework world.
ASP.NET is an open source, server-side framework that allows you to produce dynamic websites, web applications, and web services. It is a successor to Microsoft's ASP and a part of the .NET Framework.
ASP.NET itself has been succeeded by ASP.NET Core, though you will still see the former in use with some regularity. Note that ASP.NET Core is not Windows-specific -- it will run using the .NET Framework on Windows, as well as the cross-platform .NET Core.
ASP.NET Core features things like:
- Continuous compilation
- Modularity, using NuGet packages
- Optimizations for cloud implementations
It is also host-agnostic, light-weight, and community-focused.
You are unlikely to see Microsoft's Silverlight being used for new apps, but there are certainly instances of it being used in legacy apps. Silverlight, at one point, was a great option for those serving up media-rich apps.
However, if you are working in the Windows ecosystem, you may come across the usage of Silverlight more often than you would otherwise.
Frameworks Utilizing Non-Model-View-Controller (MVC) Architecture Patterns
Most of the frameworks we have mentioned above follow the Model-View-Controller (MVC) architecture pattern, but there are certainly alternatives, including MVVM and MVP.
Together, MCV, MVVM, and MVP are the three most commonly used architecture patterns in the field of web development.
We briefly mentioned Model–View–ViewModel (MVVM) in the Angular.js section above.
In MVVM, we have the ViewModel instead of the Controller. The ViewModel is responsible for things like:
- Functions that help maintain the state of the View
- Displaying methods
- Manipulating the Model
- Triggering View events
What is MVVM Good For?
Generally speaking, MVVM is especially good for single page applications. It is not a complete framework but typically used as part of a framework.
Some MVVM options include:
- MCCM Light
- Caliburn Micro
There is also the Model-View-Presenter (MVP) framework. MVP is very similar to MVC, but with the Controller replaced with a Presenter.
The Presenter is used to handle all user interface-related events on behalf of the View. The Presenter:
- Receives user input via the View
- Processes the user data through the Model (which passes the results back to the View)
The View and Presenter are Separate
Unlike the View and Controller layers in MVC, the View and the Presenter are completely separate and communicate with each other through an interface.
Some MVP framework options include:
The choices you make with regards to the language and web applications framework you use will affect your web hosting needs. We firmly believe that there is a web host for every type of user, so figure out what your needs are first, then seek the web host that will help you accomplish your goals.
Read on to find the hosting plans that support the languages and frameworks you are using.
Hosting Frequently Asked Questions
How many programming languages are there?
There are hundreds of different programming languages and new ones are emerging every day. Some programming languages are even created as jokes, although sometimes those jokes become serious.
Programming languages generally belong to language families, having taken aspects of a "parent" language or influence from multiple languages. In such a way, you might look at the history of programming languages as an evolving ecosystem.
This history is deep, starting with Fortran and BASIC in the 1950 and 1960's, which influenced most of the languages to ever exist. "C" was created in the 70's which is one of the most influential languages, resulting in C++ as one of the most influential object-oriented languages.
What are the most popular programming languages?
The most popular programming language is "C" it is the root of almost all object oriented languages, runs the fastest, and for the most part is required for software development of operating systems.
Following that is JAVA, which is a very general purpose language which can run on any computer without the need for recompilation by using bytecode designed to run on a Java virtual machine (JVM), making it extremely popular for web applications, with reported use of over 9 million developers.
What is a programming paradigm?
A programming paradigm is a style of constructing the elements and structures of a language which describe how a language works or what it is used for. The most distinguished paradigms are imperative, declarative, functional, object-oriented, procedural, logic and symbolic.
A programming language can have more than one of those concepts, but generally focuses on a just a few at once. These paradigms have different ways of handling the "state" of a program, or controlling certain portions of data as declared values. Functional programming is useful for mathematical expressions and deals with using the power of recursion highly effectively.
Perhaps the most prolific paradigm though is object-oriented programming (OOP) which allows for the creation of "objects" as structural blueprints. Generally those called "classes," which create unique instances of an object, each of which contain data (called fields) and special procedures (called methods). These objects, once constructed, can communicate with other objects and interact with the fields, or invoke the method in another object.
How does a compiler work? Do I need to use a compiler?
For most programming, you don't need to know how a compiler works, just how to use one to debug code. A short synopsis of how a compiler works though, is that a computer has a certain "finite" number of "states" and that once put into motion, the system becomes known as an automata which operate with the states together as what is called a "finite state machine."
While these terms sound exotic and difficult, understanding them will help understand how regular expressions work, and thus why programming languages often have very strict rules about syntax. Very often, a missing parenthesis or semi-colon can break software completely, automata-based compilers or script interpreters breaking is the reason why the code won't work.
What's the difference between a programming language and a scripting language?
For programming languages which do compile (and even some that don't) using an IDE can make software authoring happen a lot faster.
When writing programs from a text editor or command line, using a lot of "print" statements is necessary to debug issues. Within an IDE however, debug tools will print errors for you in many cases, and with the use of "intellisense" you can very often browse the methods of a class without needing to type out the whole name. Also, an IDE will use syntax coloring based on the language, highlighting different parts of the code with different colors, making it easier to read.
An IDE is mostly useful for server side code or desktop applications, for web development, text editors and browser tools are often faster and easier to work from.
What does "Client-side" versus "Server-side" mean? Why is it important?
This code can be either be compiled or scripted depending on which technologies are used. These applications often receive input from application users, perform logical operations, and then send output operations back. Understanding how a client and a server work together is the first step in knowing how to build a web application.
Which languages are best for web application development?
There aren't many real limits to what programming languages can be used for the server-code.
Don't let popularity be a deciding factor though if you are trying to optimize performance, but popularity can be useful for beginners looking for tutorials. There is no "best" language, otherwise there would only be one programming language.