I'm very new to web development (learning for about 2 months) but I keep wondering when an application is better suited for the web or desktop. For instance, would a hospital tend to use a desktop or web app to keep track of all it's patients records. Also would large businesses such as insurance companies use web or desktop apps for storing and accessing all of their customers information? Thank you.
Generally speaking I find the biggest advantage for a native app is that it can be much faster and is good at interfacing with hardware. The biggest drawback is that they usually need to be custom built for specific operating systems. For example a native app may need both a windows and mac version built which drastically increases development time.
This is where the advantages of the web app come into play. Because the app is on the web it is usually is compatible across many platforms making it the cheapest and fastest development option. You will however sacrifice speed and may have difficulty with hardware compatibility.
In addition, it depends on who you are developing software for. For example, if you are deploying a service or some sort of distributed system, web apps are typically the way to go. But, if you are creating a very niche tool for individuals to use, such as Photoshop, or Microsoft Word, it may be better to develop platform specific versions and squeeze the most out of a system and its resources.
Here is another question that does a good job at explaining the differences.