Class Diagram from mxml - flex file - apache-flex

So i am building an application on flex for a client and he asked me if i can provide him with a class diagram. I was wondering if there is a simple way to do it with a program (like visio or something) as done in java. Thanx

Grant Skinner's gModeler might be of interest.
Cited from the gModeler site:
gModeler is a free online UML diagramming and documentation tool,
targetted at developers working with ECMA 262 languages such as
FlashMX's Actionscript, and Javascript. In addition to it's
diagramming capabilities, it exports HTML documentation, FlashMX XML
documentation (for the Action Panel and Reference Panel) and stub code
(class code).

Related

Web application with pearltree like interface

The pearltree site has an interesting interface. I would be interested in such an interface as a library (Java, Python, HTML5?) for an online editor.
The project uses Flex and states in this old blog post that HTML5 performs worse.
I am asking this question in the context of another question on math.stackexchange.com
You might want to try D3 JS http://d3js.org/
Here is an example using D3 and nodes, http://mbostock.github.io/d3/talk/20111116/force-collapsible.html

Is Adobe Flex all XML-based?

I am trying to develop an Android application and I heard that for someone with less-than-superior java skills, AIR/Flex might be a good place to start.
I am noticing that all I see in Flash Builder is MXML-based. Is this how all of the code in Flex written? Via XML?
It depends what you mean by "XML". MXML can contain chunks of ActionScript code both in blocks between <script> tags and right in line in attributes to controls tags, such as
<s:button click="someObject.DoSomething()">
This ActionScript embedded in MXML file is the pattern largely presented in the Flex in a Week series noted by #www-flextras-com.
But you can also have full, dedicated ActionScript files, both directly associated with .mxml objects and all by themselves. This "Code-Behind" design pattern is very much like the XAML design + C# code-behind combination in Windows Presentation Foundation applications.
An good introduction with a viewable example of strict code-behind in Flex :
Article
Browseable source code
Flex is a declarative, tag-based way of writing rich applications. Under the hood it is all ActionScript, though, so it is very easy to marry ActionScript code into a Flex application (as you often must do).
When I have coded with Flex, I use it as a declarative language. I use the tags to build out Views and data-driven containers. Then I write ActionScript classes to do all the imperative control logic. The relationship is similar to the one between JSP and Java, or (sort of) HTML and JavaScript.
In a nutshell though, yes, you can write whole Flex applications with its XML-like syntax and resort to ActionScript just to glue bits and pieces together, write small handler functions, etc.
This guy is a Flex genius and wrote a great book on it: http://dougmccune.com/blog/
HTH!
Flex is a mix of MXML and ActionScript. MXML is indeed XML based; but ActionScript is an ECMA compliant language. Conceptually similar to JavaScript.
I suggest you start by reading through the Flex docs to give you some background. The Flex in a Week tutorials come strongly recommended.

what does that in ActionScript 3

Hi Does any one tell me what is [Event(name="change", type="flash.events.Event")] this?
I'm using ActionScript 3.0 in Adobe Flash IDE.
In Flash Builder, the metadata is used for ASDocs and code hinting. It means that the component/class which has that data may dispatch an event named "Change" which has class type of "flash.events.Event".
It could be considered a developer helper. It isn't required, but it makes things a bit easier for other developers using your class.
More info on Metadata.
I couldn't find any metadata tag documentation on Flash Pro or AS3. But, here is a blog post that covers some stuff.

What is the benefit of using Flex?

Since Flex generates Actionscript.
Why not use Actionscript at all ?!
sorry, i'm just curious .
I agree with the points made about Flex being for developers and Flash being for designers, but that doesn't really cover what is going on in detail.
There are three main ways to produce a Flash application (SWF):
1) Using the Flash application - the timeline approach, mainly aimed at designers.
2) Writing pure ActionScript directly and compiling (either through an IDE such as FlashBuilder or from the command line), aimed at programmers with creative flare or designers who don't mind getting their hands dirty.
3) Writing 'Flex' - usually using an IDE such as FlashBuilder, but yes you can compile your Flex application on the command line. Flex is MXML (an XML markup) and ActionScript. As stated, Flex is aimed at software developers, typically those who have less focus on the 'creative' side (delegating this responsibility elsewhere, e.g. a visual designer).
There's a big difference between #2 and #3 though.
ActionScript is great for programmers who want to do highly interactive and graphical Flash application, for instance, some interactive demo or a game perhaps. To create a Flash app via ActionScript you would create an ActionScript file, add the meta data to indicate it is an application and the compiler will generate an appropriate and usually very small SWF file. There are some components available at the pure ActionScript level, but these are very lightweight compared to Flex and most of the work is done by manipulating Sprite objects.
Flex does a lot more. It gives the developer a rich suite of skinnable components with which to build applications, a component lifecycle, effects and data bindings to name a few things. I would say that Flex is more for rich applications for some business domain, typically in the format of a form based application, though you can do some very sexy things with it and can pull in resources created elsewhere (e.g. existing Flash resources).
A Flex application has a top level 'Application' object which is an MXML file containing a hierarchy of components. At compile/build time this MXML file is converted to ActionScript (lots of it! there is a compiler flag which keeps the generated ActionScript, see the docs for more info) which is ultimately compiled in to a SWF that can run in Flash Player.
For instance, you would add Labels, TextInputs, Buttons and so on to a Panel and add the Panel to the application. The user interacts with these components, and then the Flash app processes the input in some way and updates the view. Data binding allows you to mark an object as 'bindable' and then have Flex automatically update some other property when the bindable property changes.
Flex applications tend to generate larger SWFs, but that is because they are carrying the 'baggage' of the Flex SDK, though this can be mitigated using runtime shared libraries (a bit like DLLs for Flash, but is an advanced topic) or Modules, which are SWFs that will only run inside of a Flex application and not standalone. But the idea is that the application is loaded in to the client and is responsive without having to perform page-requests as in a traditional web application. The perception of loading time is improved by breaking your application up in to modules or using runtime shared libraries as mentioned above.
To be honest, I'm not doing Flex justice with my description, but hopefully I have made the differences much clearer.
Flex does not generate ActionScript. Flex compiles ActionScript.
At any rate, Flex is Flash programming aimed at developers (who don't necessarily like having timline-based vector editor as the main development environment).
Also, since Flex is a console application, you can include its functionality in shell scripts etc etc.
I think a rhetorical question best answers this:
Why not use raw machine code for all projects?
In more detail, the Flex Framework is indeed written in pure actionscript. It offers substantially more than actionscript alone, and like most frameworks, addresses a need for higher level programming constructs that are not offered by the language that they are written in.
Adobe Flex and Adobe Flash differs in only one thing:
According to Adobe: "Adobe Flash is for designers, Adobe Flex is for developers. Flex is released for developers who do not feel comfortable with timeline stuff. "
Adobe Flash is a powerful tool; however,
as more programmers became involved in
building Rich Internet Applications,
it quickly became clear that they were
not comfortable using drawing tools,
timeline and other visual panels to
create forms and other elements that
are common to the business
application.
Adobe Flex was created to solve this
problem for programmers.
See this video: http://www.adobe.com/devnet/flex/videotraining/xml/vid01.html
If you feel comfortable with timelines (i am not) then there is no difference at all. You can use Adobe Flash.
The Flex framework allows developers to write applications more rapidly than writing pure ActionScript. Flex is written in MXML, which is a 'convenience language' and has a lot of pre-built components for writing business applications.
However if your goal is for creative purposes only, Flash would be a better tool for the job. But if you're asking between AS3 and Flex, I presume you're not tweening things in a timeline, as you would in Flash.
If you start using Flex, you will find that you must know ActionScript to give your app functionality that's not provided out of the box. Also, knowing ActionScript will be beneficial to both Flex and Flash worlds (and you can also write pure AS3 apps as well, but very few folks do that in my experience).

qt/wxwidgets third party components?

I'm used to working in a Delphi and C# environment which seem to have a rich set of third party components available. I'm currently wanting to do cross-platform programming in C++ using either qt or wxwidgets. Is there a large market for third party components? I was looking at sourceforge and that doesn't seem to show much that is useful (how the hell do you find out what components or features are in a project without downloading the source?). I'm thinking carousel/coverflow components, rich datagrids (like the sort DevExpress provide). Or is this, write your own territory?
There are a number of good quality third party Qt libraries, though I don't know of a centralized resource for finding them.
A few places to start looking:
http://www.ics.com/products/qt/addons
ICS provides the
QicsTable, a high performance
model-view-delegate table library,
and resells various libraries by
KDAB. (These are all available as a
free download.)
http://www.qtcentre.org/contest-first-edition/finalists
QtCentre has an annual
programming contest which awards
interesting Qt-based tools and
libraries. This year's contest is
still being judged, but the
finalists from last year can be seen
at the above link. Check out the
Custom Widget and Helper Library
categories.
There is a third-party component for Qt - advanced data grid - Qtitan DataGrid.
In it there are almost all necessary possibilities.
Ultra-fast processing of large data sets
Use of QStyle for rendering objects ensures that the grid blends into the UI design of any application
Two modes of vertical scrolling
Customizable colors of rows and columns
Two integrated table views
Column banding and grouping
Automatic width and height adjustment
Fixed columns
Flexible sorting
Column summaries
Integrated high-performance caching mechanism
Advanced paint engine for faster rendering of UI elements
Cross-platform support
API for external editors
Screenshots about this Grid
http://www.devmachines.com/qtitan_screenshots.php
For a crossplatform GUI development, Qt is the tool you should be looking for. I have used both. Here is what I feel about Qt
Building rich GUI is a piece of cake if you use Qt. It has a loads of GUI capabilities, starting with its Graphics View, OpenGL support, stylesheets that supports css. A mature painting system, Richtext formatting, Integration with Webkit, and I am sure I am missing a lot more here...
Qt has its own build system, qmake which creates platform dependent Makefiles, so no Makefile hassles. Moreover you get a single pro-file which is much easier to manage. For wxWidgets, you will need to create different Makefiles for the various compilers you intent to use.
Other advantages of using Qt over wxWidgets are - the Api is very easy to learn with its intuitive api, superb documentation and tons and tons of examples. This helps you get yourself productive pretty soon and thus getting your product early to marker. BTW Qt is a RAD tool. Moreover, there is a huge user base, and there are forums like QtCentre.org to help you with your questions.
If you are planning to buy commercial license, you get support directly from Qt Software (trolltech).
You would obviously be using Qt's Model View pattern, allowing you to separate your business logic from the presentation tier. I would suggest that you write to "support at trolltech dot com" or "sales at trolltech dot com" to get more information. You can explain your requirements and they would be able to explain how Qt fits your needs.
You could also download the opensource version and have look at the demos.
Coverflow: http://labs.trolltech.com/blogs/2007/11/02/pictureflow-on-windows-mobile/ , http://ariya.blogspot.com/2008/03/introducing-photoflow.html
As I said, if its Rich gui you are planning to develop, use Qt.
In addition to the ones by ICS and at QtCentre the Qt-apps website has some open source widgets/components for Qt.
For wxWidgets you have wxCode which has quite a few things although not all the existing third party components (including a few very useful ones) are available from there.
Good quality components for Qt can be found here - http://www.devmachines.com/
At the moment there are Microsoft Ribbon Control for Qt, DataGrid for Qt, Charting for Qt.
All components are commercial and should be used in Qt Commercial or Qt LGPL.

Resources