Flex API vs Flex Viewer API

487
2
01-17-2012 02:45 PM
MattGiles
New Contributor
Hello,
I am new to flex api / flex viewer api. I was wondering if someone could explain the potential disadvantages of using the flex viewer api vs flex api.

I have been told that the flex viewer api is configurable, but not customizable (like apps made with flex api)..however i have also read that you can expand the source code provided with the viewer api..very confusing

Also, can flex viewer widgets that are found on arcgis flex api website be used without the viewer??..

Any feedback to clarify would be great!
Cheers.
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Burns,

    The disadvantages of using the Flex Viewer is that to  truely give it a look and feel that is not the standard boilerplate Flex  Viewer look you have to be a GOOD developer to tear apart the code. That  being said that disadvantage is pretty small. The Flex Viewer is a  custom semi MVC framework and not a true MVC pattern. Now that is  assuming that you even know what a MVC pattern is and you want to  develop using one of the popular MVC patterns. Taking the Flex API  samples and using them in the Flex Viewer is not any kind of simple copy  and paste for those copy and paste ninjas.

I have been told that the flex viewer api is configurable, but not customizable (like apps made with flex api)..
  That is completely false. Those that make that statement are the ones  that don't want to take the time to understand the ins and outs of the  Viewer. That being said, customizing the viewer does require a good  working knowledge of it's code if you want to do anything besides a  custom widget.

can flex viewer widgets that are found on arcgis flex api website be used without the viewer??
Honestly, Yes but not without a 50% or more re-write of the code to remove the dependance on the viewers framework.

If  you are a casual developer that does not plan on investing a lot of  time and learning of the Flex API than the flex Viewer is a great  product for you. If you are already a novice Flex Developer and plan to  do a lot more learning (such as MVC patterns) or need almost complete  control over your developed application and have a lot of time to invest  in writing all the code yourself than the Flex API is your obvious  choice.

If you are looking for a lot of pre-developed  capabilities to include widgets and code examples that are not just the  ones developed by the Flex API team in the form of API Samples and  people that are willing to share their code source than the Viewer is  the better choice. Of course other will have their opinion, but I have  to speak from my several years of experience helping beginners and  sharing code on both the old forums and these new ones for both the API  and the Viewer.
0 Kudos
CarmenDurham
Occasional Contributor II
Hello,

I will add my input from a person who has been helped numerous times by the Flex related forum (especially R. Scheitlin).

We started with the FlexViewer (over 2 yrs ago - wow time flies) and have a Situational Awareness App and a Cemetery Viewer based on it. They are still being used.  We highly altered the source code to meet our needs.  We had no Flex programming experience although we did have experience with various programming languages (but are experts by no means).  The FlexViewer and its related source code really helped us to understand Flex.  It also allowed us to have a basic web app up and running much faster than we thought possible. 

The thing is that the samples on resources.arcgis.com for the Flex API are more meant for use for coding without the FlexViewer.  Which caused some confusion in the beginning before we realized what was going on.

After a while, I wanted to create some simpler Flex apps without using FlexViewer so that we could really customize how it looks.  Robert is right, it isn't like you can just move a widget from the FlexViewer to a non-FlexViewer app and it will work.  But, you can still use the FlexViewer source code for reference to see how some code works.  We now have a few web apps that are not FlexViewer based.

I would highly suggest starting with the FlexViewer and then decide if you want to move on to creating a non-FlexViewer app.  By the way, my code would not pass any critiques by pro-web developers.  🙂

Carmen
0 Kudos