Today I want to write a post on using two very popular products from Esri – ArcGIS Viewer for Flex and ArcGIS Viewer for Silverlight. Both of these products are configurable applications that make it possible for non-developers create own web GIS applications and make them available for the intranet/Internet use by using a web server.
I found myself several times in situations deciding which viewer – Flex or Silverlight – I should use for a specific project work. Functionality wise they are almost identical and core features are designed to be similar. However, there is so much more to consider, so I thought to compare them in detail – hope this will save some time for some of you.
Functionality and extending the core
Apache Flex per se, formerly known as Adobe Flex, is an older technology meaning that it has been around for a longer period of time than Microsoft Silverlight (which was introduced in 2007). ArcGIS Viewer for Flex is available for use for a significantly longer period of time. This naturally means that there are more valuable resources/samples available for Flex viewer than for Silverlight viewer. Comparing ArcGIS.com search results on Flex viewer widgets (widgets in Flex viewer / add-ins in Silverlight viewer = additional functionality that does not come with the core, but can be plugged in into a web application) and on Silverlight viewer add-ins can prove this.
So, if you need to create a web application based on one of these viewers, but there are some tools missing – do a quick search on ArcGIS.com or Google for Flex widgets. There is a good chance someone has already developed and uploaded such a widget. This is how I ended up choosing Flex viewer – the tool I need is already available for use and I don’t have to develop the tool from scratch. Moreover, sometimes I can perform some minor modifications in the source code (if provided) by using some of the IDEs to meet my business needs. I can see that more add-ins and functionality is coming for Silverlight viewer as well, but so far Flex has way more to offer in terms of additional widgets.
Talking about IDE, Flex web applications can be developed by using any IDE that supports Flex, for instance, Eclipse (free) and Adobe Flash Builder (for purchase, ca 1,000USD in Sweden). I have not tried using Eclipse for developing with Flex since I am more comfortable with Adobe Flash Builder. Silverlight applications can be developed with any .NET programming language but I’ve been using only Microsoft Visual Studio (ca 1,000USD in Sweden).
I am more comfortable with Windows development based on a .NET language, e.g. C#, rather than with Flex development (which some find easy to learn if you have background in Java). If you are not developer in the first place, the learning curve for C# and Flex will be nearly the same. It depends a bit on what IDE is available at your disposal or maybe if you have relevant human resources that may be at help when needed. Maybe there is a big department at your organization with numerous C# developers? Then it won’t be unwise to consider using ArcGIS Viewer for Silverlight since you will be able to tweak it or extend the viewer with the help of colleagues.
Developing a Flex viewer widget, however, is much easier than developing an add-in for Silverlight viewer. To develop a Flex widget, you use ArcGIS API for Flex (so you use the same framework for extending the viewer and developing own applications from scratch). With the Silverlight viewer, you need to use a separate framework – ArcGIS Extensibility SDK for Silverlight, which looks a bit more complex to me comparing to ArcGIS API for Silverlight because it follows the Model View ViewModel (MVVM) pattern which I am not comfortable with.
So, what all of this means for you? If you are not a developer and you are happy with the core functionality provided by viewers yet need just a couple more simple tools, consider searching the ArcGIS.com and Esri Forums for Flex widgets first. There are plenty of resources available already over there and you have high chances to find what you are looking for. If this is not the case, you might consider using Flex viewer for developing a widget missing or maybe tweak an existing widget available with the source code. Remember, that Adobe Flash Builder is available for 60-days trial and this might be enough for developing a tool you need. Silverlight viewer unfortunately does not provide as easy interface for developing add-ins as Flex viewer does for now.
ArcGIS Viewer for Silverlight has a couple of neat tools that are not available with Flex out-of-the-box. With the Silverlight viewer, you can let end users modify the symbology of the operational layers in the deployed web applications without modifying the original application configuration stored on the web server. This might be useful if you don’t want to publish multiple services with different symbology tailored for different users, but instead want let your users specify how layers should look in this particular application session. The use cases might be printing the web map to a .pdf file with the custom symbology.
Another functionality that is available for ArcGIS Viewer for Flex only via a custom widget is creating heat maps on-the-fly by end users.
Keep in mind that ArcGIS Viewer for Flex can be obtained along with its source code available from github. ArcGIS Viewer for Silverlight does not come with the source code and Esri does not have plans for now to make the code public, so there are definitely way more options for Flex viewer customization.