Raphaël and D3.JS - Better Browser Compatibility - raphael

Is it possible to use D3 and Raphael together so that visualizations are produced by D3 (using D3's API to produce svg output) and correctly visualized in IE by Raphael ?
I appreciate any example/sample code.

Yes you can.
We've improved r2d3 from a compatibility project to an IE fallback for D3. This was achieved by having D3 wrap Raphael elements which we extended with methods such as setAttribute. This enables D3 to work with Raphael elements like they were DOM nodes. The project still needs some work to iron out issues with things like groups, but I encourage you to check it out to see if it meets your needs.
https://github.com/mhemesath/r2d3

Short answer: No
But you can use the IE-compatible features of D3 to some extend.
Have a look at Jeff Pflueger's discussion. And his conclusion (includes some code).
Here is another discussion, and a good summary from Mike Hemesath. He uses d3 "to do the heavy lifting of handling the scales, generating path data for areas and lines and formatting dates", and he uses Raphael for the rendering.
He is also maintaining a compatibility project for that, named r2d3.

Related

MFC C++ : How to customise List?

For each item in my ListCtrl I would like to have :
an image
a title
a description
For your opinion, it will be easier to do that with .NET ? If yes have you got some examples ?
Ps: with Adobe Flex, I used the ItemRenderer notion to customise easily a list.
Thank you so much guys !
A ListCtrl in supports an image (a small one -- an icon, really), and an arbitrary number of text columns for each item.
The most obvious problem is going to be if you want to display your images full-size. In icon view you get 32x32 pixel icons. In the other modes, you get 16x16 pixel icons.
If that's sufficient, then making things work should be fairly easy. As to whether it'll be easier with .NET -- I'd call it an open question. At least in my opinion, it's likely to depend on which you're more familiar with. If you've used MFC before, then using a list control won't be particularly difficult. On the other hand, if you've used .NET before (and not MFC -- at least recently) there's almost no question that it'll be easier with .NET instead.
If you have no familiarity with either, using .NET will most likely be easier, but not by a huge margin.

Enterprise architect - Compare baseline changes

I would like to know, what tool or extension to use to compare changes between two baselines in Enterprise architect (EA).
Default tool what EA provides, does not work with HTML tags at all.
If text in changed element is larger, it starts to be very difficult to compare differences.
thanks
I'm not aware of any third-party baseline diff tool, and neither the GUI nor the API provide the option of plugging in a separate tool to do comparisons.
This would be a useful enhancement, so I suggest you post it to Sparx as a feature suggestion.

How do you manage the ui-layout of an Ember.js app?

I am looking for options to manage the ui-layout of an ember application I am currently working on.
The application has to be very flexible (configurable) when it comes to the ui-layout - so having layout-containers with regions like "top", "left", "center", "right" and "bottom" which can be nested whould be a good fit (thats how most layout-managers manage layout).
I found a few solutions, but am somehow undecided:
yui2-layout-manager (Demo)
Seems a bit old/clunky, successor, yui3-layoutmanager, is in "planning" stage since months (years?)
jquery-ui-layout (Demo)
Looks a bit bloated. Codebase is not public: As it seems the project-owner does not want it to be too public(?) (from what i read in the google-group, someone asked why its not on github...)
dojotoolkit (Demo)
Seems quit a bit "obtrusive"
All in all no solution feels "good" to me and I wonder if I should better write the layout-managing-logic myself. What do you think?
Check those two addons:
https://github.com/ghempton/ember-layout
https://github.com/ghempton/ember-routemanager
Also check the demo http://ghempton.github.com/ember-layout-example/
Edit: I think this project: https://github.com/flamejs/flame.js is extremely close to what you want.
JQuery ui-layout is a problem with Ember, because ui-layout requires a ui-layout-center element at layout time, but Ember {{outlet}}'s typically defer the presence of these.
You may have a look at Twitter's Bootstrap. It has a layout classes set.
http://twitter.github.com/bootstrap/scaffolding.html
I finally found it: http://www.bramstein.com/projects/jlayout
"[..] The jLayout JavaScript library provides layout algorithms for laying out components. A component is an abstraction; it can be implemented in many ways, for example as items in a HTML5 Canvas drawing or as HTML elements. The jLayout library allows you to focus on drawing the individual components instead of on how to arrange them on your screen. [..]"

Bidirectional M2M Transformations using Eclipse EMF

I would like to do bidirectional Model2Model transformations. Both models are EMF / eCore based. Actually I would prefer that one model is an editable view on the other.
What are my options?
Which tools and tranformation languages are avaiable and what are their restrictions?
M2M are the hardest. Industries strength tools are rare, lots of academia stuff. If you're dead set on a M2M language, look into ATL which should also support ecore. Otherwise you can look at Xtend, which was made for model to text but you can abuse it and it should be more comftable than plain java. If your into research look at Scala based transformations here
http://metrikforge.informatik.hu-berlin.de/attachments/download/193/george_wider_scheidgen_ICMT_2012.pdf
There are more transformation tools than you can imagine for EMF, its kind of crazy...
For metamodel to metamodel transformation where the models are not very similar:
ATL is probably the most popular and most "baked"
Epsilon project has the Epsilon Transformation Language.
If the metamodels are very similar and you only need to tweak some things then there are tools targeted that type of migration/updating:
ATL now has a refining mode
Epsilon has Flock
Edapt looks very interesting as well because it does the metamodel/model changes together. It lets you work on a tree view and comes with a set prebuilt set of rules.
Henshin which lets you operate on a diagram view of the model
EMF Refactor is a more code-level approach, that can also use Henshin rules somehow.
You can always directly manipulate the metamodel and model using the EMF Java APIs as well.
I'll add, if you are doing any real EMF work you will need to get and read EMF: Eclipse Modeling Framework. It's available in Safari also. I highly recommend Safari, for $39 a month you get almost every development ebook you could ever use.
If you insist on doing bidirectional M2M transformations, (so-called Bxs), then know that there is an active researcher's community updating that wiki : http://bx-community.wikidot.com.
If you visit it, you will find that they list a bunch of tool suitable for Bx transformations http://bx-community.wikidot.com/relatedtools.
I used ECHO in the past which provides an implementation of QVT-R based on the KodKod constraints solver.
It's definitely worth giving it a try.
Since you specifically asked for bi-directional model transformations, I must say that you have no options. To make it claer, adding to the answer you got form Ed Willink, none of the existing M2M transformation languages (AFAIK) supports bi-directional model transformations.
Work on a QVTr and QVTc execution engine is starting to look promising if you are still interested in this: QVTd Project.

UML - How to manage big class diagrams?

For my project report, i need to show the class diagram of the software i've built which counts around 20 classes! The problem, is that when i render the class diagram in jpeg file(either using StarUML or ArgoUMl or whatever..) we can't see the details correctly (very big picture because of the large number of classes). Well, how to manage this situation correctly? Since the report is gonna be printed on A4 pages ?
Thanks !
With 20 classes I would expect at least 3 subsystems, (modules, layers), possibly more
Make package diagram showing the relation between those, one class diagram for each subsystem.
Add class diagrams for special things you want to show. Print each on A4.
If you can't split the diagram easily into modules, I'd consider that a design smell.
Its fun to print large diagrams on huge pieces of paper (like 500 tables on A0 ;-) but it really isn't of much use.
Producing a class diagram containing 20 classes is totally useless- what does it actually show? When using class diagrams I've never created a diagram that has more than about 5-8 classes on it.
The question to ask yourself is "what useful information am I trying to show with this diagram?". Don't produce a class diagram for the sake of it!
Breaking it down to demonstrate a particular design pattern, subsystem or component is what I find class diagrams useful for.
an other way is to not show all members but only the main ones, this reduce the size of the classes then the size of the diagram. Of course this suppose you use a tool allowing to choose which operations/attributs/relations must be visible, but this drawing setting is classical
may be you tool also have drawing setting to hide some part of the operation to reduce the width, for instance to show or not the parameters, or their direction, their type etc
Bouml (http://bouml.free.fr) has all this drawing options, and as it was said has PNG and SVG exports
best regards and happy modeling
Bruno
There are a few things you can do:
Bigger paper
Don't display method signatures
Don't display private methods
Partition your problem into more packages
Fewer classes per diagram
This is one of the problems with trying to treat UML like engineering drawings: Once you get it off a whiteboard, it's a poor language for communication. It doesn't read so well.
Generally a good way to deal with this is to create different diagrams for different modules or areas of functionality for your software. Alternately you could print the single image on multiple pages and show how to assemble them to form the full image.
I think it's the inherent problem that you're trying to show so many things in one diagram. Your question is just like "how can I put 100 words in a sentence without the reader getting tired of it?"
You can probably refactor it with FacadePattern. Basically it's just breaking down stuffs into modules. For e.g. Timesheet, PayCheck, BonusRecord can be ground into ManagementSystem. Product, Order can be grouped into OperationSystem, etc.
Use BOUML. The ArgoUML and StarUML are classics which everybody mention when it comes to question "is there any free UML software?". It's funny that being a historic software does not make the software unknown and unused. In case of Argo and Star the historic coefficient makes them known and used.
BOUML can export to SVG. This will solve your problems.I described the tool here
Thanks to SVG you will be able to quickly switch between birds eye view and detail view. I do this with Firefox. It's rapidly fast.
PS. I just noticed that you want to print the report. The SVG is then probably not what you want :\
Split your classes in several diagrams! When creating a UML model, you can have model elements such as classes displayed (no not) in several diagrams. A diagram is just a view of your UML model so that you can highlight modules in your specific diagrams.