Web Applications

I wrote web applications since 2000. The first was a control panel for a web site. Then I wrote web applications for small cultural associations, then a big web application for billing and invoicing of power companies, then a web application for administration and billing of a company phone and then ... many more.

How to plan your web application

When you start a new project based on a web application you have to define a lot of things and, if you are not a technician, could be hard to decide. You can meet dozens of people and each of them will say a different thing.
So, what you need to know?

Which programming language?

java ruby php python perl asp

The same web application can be written with many different programming languages: PHP, Python, Ruby, Perl, Asp.net, Java and today even Javascript with Node.js and similar.
Each programming language has pros and cons (this is the reason because they are so many).
So, how to choose? You can simply follow the trend: the last (probably) will be the best, but many trends are over soon.

We can analyze what the programming language will affect:

  • Development time: a more structured language (like Asp.net or Java) will require more time. Scripting languages grant a faster development time.
  • Development costs: more time it means more money and Programming Languages not Open Source (like Asp.net) usually cost more because the developer have to pay licenses and because they need a closed source platform to run.
  • Maintenance costs: if you choose a rarely used programming language like Erlang you will pay more the Erlang developer.

Personally I chose PHP, I tried Java, C# and Ruby. But with none of them I can do things I can't do with PHP in less time and with less money.

Which Framework?

The best way to write a web application today is to use a Framework. You can imagine a Framework like a set of tools which help the developer to build your application quickly and in a more robust way.
Using a framework we will have more coherence between different parts of the code and the whole application (probably) will have uniformity of behavior. More on Wikipedia.

For you this means :

  • a better User eXperience
  • simpler and cheaper development and maintenance

Obviously there are a lot of MVC Frameworks, where MVC (Model-View-Controller) is a particular organization of the code: the Controller handles the call by the browser, and with the Model handles the required data and, finally, the View is used to present them to the user. A correct use of this schema keeps the code organized and maintains low the complexity even with very big projects.

php frameworks

Some example Ruby on RailsZend Framework 2, Symfony, Yii, Laravel, Kohana, CachePHP, Fuel PHP, Code Igniter and many more. Differences are a matter of taste, more or less, all frameworks can do the same things.
So, again, how to choose? I think it's true what someone said "the best framework is what I know better". So it is not a matter of Frameworks but a matter of Developers.

I worked with Zend Framework 2, Laravel, Kohana and Code Igniter and I played a bit with Yii. I worked alone, in small teams and in very large teams. The result of my experience is the following:

  • The learning curve: there are Frameworks hard to learn (like Zend Framework) and easier frameworks (like Code Igniter), in a large team not all developers will have the same experience so if you think you need a large team is better to use a easier Framework.
  • Development time: a more complex Framework will require more time.
  • Development costs: a developer of a more complex Framework probably will ask more money.
  • Maintenance costs: like above.

If you are a developer I would share with you other thoughts about frameworks:

  • Unnecessary complexity: for me the biggest flaw is that I don't need unnecessary complexity. If I wanted to use Java I would not choose a scripting language.
    For example SQL is a wonderful language, you need to know few simple rules and you can do what you want. Why I should learn a lot of function to use an ORM, with an unavoidable overhead, when if I need a very complex query I have to use SQL? And there are many other similar things.
  • Too many freedom: you know, if you give an option then someone will choose it. In a large team if you give the option to do the same thing in ten different ways, you will have ten different implementations in your code. This is not good. For example my queries are only in the model and each table has a dedicated model. I don't like to search a query in a lot of places: inside controllers or, even worst, inside views, side by side with Javascript and HTML.
  • Only an engine: yea the Frameworks are wonderful tools but they are only engines and I need to build a car, quickly.

For those reasons I wrote my own framework, X4WebApp, I took all good things I saw in other frameworks and I put all together, an MVC framework lightweight, powerful and versatile. Over there I built a Content Management System, X3CMS, the result of more than ten years of experience.
Now to write a complex web application I count my work in weeks instead of months. Fast, clean and, most important, happy.


Web 2.0 and Responsive design

Today you can't imagine a web application without Javascript, AJAX is everywhere. So you can't avoid to use a Javascript library. And you shouldn't think at a new web application with a design NOT responsive.

To get a responsive design the better choice is to use a CSS Frameworks. Yes even here you have to choose a Framework. Even here there are a lot of Frameworks: Bootstrap, Foundation, Pure, YUI, GroundworkCSS 2 and many, many more.

About Javascript, almost everyone will tell you: jQuery is right for you.
Yes, jQuery is a powerful library, probably the best today. But not the only. Others famous libraries are: Ext.js (require a commercial License), Mootools, UnderscoreJS, Zepto, YUI and many more.
If your developer is comfortable with another, and you trust him, fill free to follow a different path.

Before taking the final decision I suggest you to choose which CSS Framework you will use. Many frameworks work better with a particular library (usually jQuery) and others provide an own Javascript library (like YUI).

The importance of the cook

After a long page we arrived at the time to draw conclusions.
We can imagine our application like as delicious dish: we need a good recipe, the best ingredients and ... a Chef, which with expertise and taste put it all togheter and will serve you not simple food but an experience.

What is a web application?

A web application is a software that you can use through your browser. All good things on internet are web applications: Facebook, Google, twitter, Flickr, Gmail, your online bank account, your blog, your Content Management System. All those are web applications.

webapp icons

Should I use a web app?

Without web applications Internet would be like a newspaper, you could browse it but it wouldn't be interactive.

Web applications make your life easy: think at an online store, at an online newspaper, at your web mail account. You can do a lot of complex things everywhere. Your only need is Internet.

If you want to know more, please try on Wikipedia (another web application)!

When I need a web app?

When you need to handle, store and share data then you need a web application.
A web application is a software: if it runs, it does a lot of complex and boring tasks for you.

How to create a web app?

Usually is a long process, all starts with an interesting idea. Then there are different phases:

  1. Analysis: a pool of expert analyzes all aspects of the idea and defines a set of features that the web application will require.
  2. Project planning: in this moment the project manager will define which tools to use and how to reach the goal.
    Could be necessary to develop a quick prototype for different reasons:
    • To check if the choices done in the analysis phase are correct.
    • To indentify the best way to get a specific result.
    • To look for lenders for the project
  3. Development: it's the time of the development team, one or more developers will write materially the code of the application.
  4. Test: during and after each development session we can have test sessions, to check if the application do exactly what the plan expects.
  5. Deployment: the development is done, all tests are passed we can go online.
  6. Maintenance: usually even after the deployment we have to fix unexpected bugs or do small adjustments.

Anyway rarely the life of a web application ends with the deployment. Often the analysis are based on assumptions and suppositions so after few months the process restarts to correct the roll.

Many people can be involved in the process. The simplest case is only one person, do you know Craiglist? But complex applications (like Facebook) will require different skills and more specialized figures:
Marketing manager, Project manager, Web designers, UX experts, DB architects, Software engineers, Web developers and, if required, people with expertise in the specific field. For example to develop a medical software you will need at least a medical expert.