Software Engineering For Web Applications : Technology - Determine the software stack for building your application
Introduction
You have thought of what you want to build, and you have a few mockups. Now it's time to start thinking about which technology stack you will use to build your web application.
The technology stack refers to the choice of programming language, web framework, web server, and database. We can also include the operating system as part of the technology stack, however, nowadays most software are interoperable. Microsoft products are an exception. Project Mono does provide an environment to run .NET on Linux, but I am not sure how stable it is. If you are using .NET, then you are probably better off using Windows as your operating system. However, the converse is not true. If you want to use Windows as the operating system, the entire range of technology stacks is still available to you for choosing.
When organizations need to choose a technology stack, they base their choice on factors like productivity, scalability, maintainability, availability of talent, the ecosystem and community, licensing costs and limitations. As a student you may or may not have a similar criteria. Perhaps you are here because you want to learn developing in a particular technology stack. In that case, your choice is already made. Alternately, this may be the first time you are making a web application. In this case we suggest that you pick a platform that will help you understand the nuances of technology surrounding the web and fundamental concepts of web programming. Regardless of other pros and cons, there are certain platforms that will push you of the road, and yet some that will make you jump through hoops, and a few that will work with you and help you as you move along.
You can use any of these for development. As far as deployment goes, Linux might be a practical choice because you do not have to deal with licensing fees. However, deployment is a complicated topic, and it's also possible to deploy to an environment such as Heroku, which totally abstracts out the operating system from you. We will discuss deployment in a later section. For now, feel free to use whatever development environment you feel comfortable using.
Choosing a programming Language:
Here is where the real fun begins. We are in a time where we are literally spoiled for choice when it comes to choosing a programming language. It is awesome that we can choose a langugae that suits our needs, but at the same time for a new comer it can be quite daunting to consider so many choices. At a broad level the most common programming languages are (is no particular order)
- PHP
- Python
- Ruby
- Java
- .NET
There are many more choices such as Javascript (yes you can use Javascript on the server also), Clojure, Haskell, LISP, Scala, Erlang, and many more.
If you read articles on the Internet, you will soon realise that programmers are an opinioted lot, and the proponents of each of these platforms have good reasons for using them, just like the detractors have equally good reasons for not using them. Don't worry, given enough time, you too will become just as opinioted, like the rest of us. For now, let us examine the most popular language choices
PHP: PHP is an extremely easy language to learn and start working with. Many people start their programming career with PHP. Using PHP you can create small web applications very fast.However, for now, ease of the language and speed of development are not the only criteria. You should understand programming and basic principles of what is considered good code. What is considered secure code, and what is considered clean code. PHP will probably make it difficult for you to appreciate these things. Read This thread from Quora to get a more informed picture. Unless you have a specific reason for using PHP, we would recommend that you reserve your choice for now.
Python: Python is a great language. It is very simple to learn, has a very mature community around it, and has a strong sense of what should be considered good and bad code. Python and the community will constantly nudge you to think in terms of best practices, and idiomatic coding. Yet as a language it is simple and does not get in the way. It has an excellent ecosystem of libraries and frameworks. Here is a nice thread which explains why Quora uses Python. Here is another thread which explains why Python is better than Ruby.
Ruby: It is said that Ruby programmers are the happiest programmers. At least that's what Ruby programmers claim. Ruby is also a very clean language with a great community. Tons of startups use Ruby (with Rails, which is a web framework). Ruby is also a great language for learning. Here is a thread which discusses the benefits of Ruby over Python.
Java: Java was a great alternative to C++, and is still a good, solid language for enterprise development. Here is a thread that discusses the advantages of Java for enterprise development. Even thoug Java is a good and solid language, it's code is very verbose, and the learning curve to get started with Java and it's frameworks is atrocious. If your aim is to learn web programming, we feel that as a language Java will get in your way more than a language ought to. This will reduce your ability to learn about web programming, because you will spend a good deal of time wrestling the language itself, and jumping through hoops that Java loves to put in your road. If you want to do your project in Java because you want to put it on your resume for better employability, then go ahead and use Java by all means. But if you want to use this course to understand the nuances of web programming, then we would suggest that you avooid Java for now.
.NET: .NET is also a good language, but it will tie you in with the Microsoft stack. Honsestly, we prefer open stacks here, but .NET is a good and solid stack which is widely used in the industry. It is a perfectly valid choice to use .NET, if you so choose to.
Spend some time thinking about the pros and cons of each of these languages, then toss a coin and pick the best language. Don't worry, that's how large software shops also make their choices :-) Just kidding :-) Our favorite is Python, or Ruby. But with a slight tilt towards Python, because it has a very strong focus on what is known as Pythonic coding, and a sense of having one and only one obvious way of doing things. If you want us to decide for you, then allow us to suggest Python. We strongly feel that it is one of the best languages to learn programming. If you have already made your choice based on your set of criteria, then by all means use the language you feel is best for you.
Choosing a web framework:
After choosing the programming language, you are now ready to choose the web framework. Each language has at least a few choices for web frameworks, each with pros and cons.
If you have chosen to use PHP, there are plenty of choices for selecting a web framework. Here are two (1 , 2) threads that discuss PHP frameworks. From what we have heard, CodeIgnighter is a great framework, and should get you started well.
If you have chosen Python, you may want to read this article which compares six Python web frameworks. If you ask us for our opiniom, we feel Flask is a great framework, and will serve you well. It is very simple and can be learned in a day or two. Django is also a very good choice, but we feel that it adds a little learning overhead, and also abstracts a few things away from the developer. This slightly detracts from it's value as a framework to select for a college project. There is one exception to our suggestion though. If you are planning to take the project you develop here and put it into deployment, then we suggest you use Django.
If you have decided to work with Ruby, we suggest you look into Sinatra or Rails. It is a simple micro framework, and we recommend it for the same resons, we recommended Flask for Python. Just like the advise given above, if you are planning to build on this project, and deploy it, then we recommend you use Rails.
If you have chosen Java, then let us first warn you, that it has the largest amount og choices for a web framework. However, statistics suggest that about 50% of Java web applications use Spring. Spring is what we also recommend.
If .NET rocks your boat, then we suggest you work with ASP.NET, or one of the frameworks (ASP.NET MVC) built on top of it.
Choosing the database:
Just like in programming languages and web frameworks, there are a good number of choices when it comes to selecting the database. MySql and PostGreSql are the most popular choices for RDBMS. MongoDB is often chosen by those who want to work with a NoSql database.
For now, I will suggest that you get started with the simples thing that will work:


