Click here to Skip to main content
15,886,572 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My project is using SVG and there is a plan to move out of SVG and replace the existing functionality with suitable replacement.


My current SVG apps does following things,


1. Exposes the object(SVG shapes) relations or dependency in screen.

When there are two dependent shapes (say rect1 and rect2), we draw a line from rect1 to react2 to say that they are dependent.


2. Triggers javascript functions when we fire certain events (click or mouse over) on shapes.



Is there any alternatives to replace the SVG and simply the drawing process?

I am thinking to store the shapes information in database and auto generate the shapes in UI.



Thanks in advance.
Posted
Updated 19-Sep-11 4:14am
v2
Comments
Sergey Alexandrovich Kryukov 19-Sep-11 11:35am    
Why? What are the problems?
--SA

1 solution

I never knew anything better than SVG; as to use of it in the Web, it is simply indispensable. That's why embedded SVG was included in HTML5 standard (http://en.wikipedia.org/wiki/HTML5[^], http://dev.w3.org/html5/spec/spec.html[^], http://dev.w3.org/html5/markup/[^]), so it can be used without any browser plug-ins. It already works in all major browser I know except… IE :-(.

However, SVG can always be embedded with the <object> or the <embed> tag. For further detail, see http://www.w3schools.com/svg/svg_inhtml.asp[^].

Also, SVG can be created by JavaScript, but don't think this is the only was to do it.

If you have any problems with SVG, consider using 3-rd party Inkscape, http://en.wikipedia.org/wiki/Inkscape[^], http://www.inkscape.org/[^]. It is totally based on SVG and uses all its advanced feature.

Best thing is: it exports to XAML, so you can use the drawings in your WPF and Silverlight applications. However, XAML is not universally accepted on the Web beyond Silverlight; browsers require plug-ins. Also, XAML features are a subset of SVG features, so only a subset of all possible SVG drawings could be rendered with XAML.

So, I suspect, if you go away from SVG you will not simplify anything but will commit a crime against your business. However, if you really know something better, please let me know. I would be too excited to learn about this thing. Even if you simply know some flaw about SVG or its use in HTML, let me know as well. Chances are, I'll find the solution. So far, I managed to solve all the problems. I'm using SVG in HTML right now, by the way.

Good luck,
—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900