Simple visualizations/drawings in ASP.NET - asp.net

I want to generate simple drawings in my asp.net website based on some data I deal with in this application (I want to represent structure of Neural Networks). I know about existing System.Drawing namespace but Im curious if there are solutions more appropriate for asp.net.
It would be great if such visualization could be interactive (e.g. mouseover on some element displays extra infromation) but this is not necessay at the momment.
And idea or hints?

Silverlight is probably a good way to generate client-side visualizations, you can reuse most of the managed code knowledge you already have and there are several samples and controls that can help.
No solution using just System.Drawing on the server-side will allow you to have client-side interactivity (potentially if you use maps, or ajax in conjunction you could), but at that point it might make more sense to use a Rich Framework, that is unless you are an expert in javascript.

Related

Charts and Tabs ASP.NET

I am currently working on a project that is dealing with charts and tabs within an ASP.NET page. I am assigned to create a chart that will be generated from an array and a menu like system using tabs to select different options for the chart.
I have no idea how to implement this, I am using VS Web Developer 2010. I am new to ASP.NET framework and how to implement charts and tabs with this information. Basically it will be a form that the user will submit options and it will calculate a forecast of payments based on the options selected.
Please help, not sure where to even begin with ASP.NET. I have seen some things regarding AJAX controls but for some reason the controls are not loaded into VS.
For charts you can use asp.net chart control
I don't understand the part of the menu, but I think you can use the tabcontrol in the containers section of the toolbox
I'd highly recommend looking at Highcharts. It's a JavaScript library for rendering charts. It will create charts on the client-side so I'm not sure whether it meets your requirements (there are other products that support server-side generation of charts but I'm less familiar with these).
I'm not sure what you mean by using tabs for selecting different options, but Highcharts does have a lot of different rendering models and looks really good.
Take a look at their demo gallery and documentation for more information.
If you are reluctant to use client side charting solutions, try Highcharts.Net. It is a C# wrapper written around the Highcharts JS library. So you write all your code using Classes and objects in C#, and the library translates that into JS.
The added bonus is that you get to use ASP .Net's state management for data persistence. The project also has samples that can be downloaded here.
If you are using MVC, you could try out DotNet.Highcharts along with samples.

A XAML based View Engine for ASP.NET MVC

As ASP.NET MVC has a pluggable view engine architecture, and XAML is an object descriptive mark-up that, given the right processor/ parser, can generate an appropriate UI...are there plans/ efforts to create a view engine that can turn XAML into HTML?
Personally, I think this would help to re-enforce the efforts the WPF/ Silverlight people have gone to in providing a means of seperating the view from the model/ business logic between designers and developers (via Visual Studio and Expression Blend)...
Seems like a logical step to me, but not knowing XAML as well as I should, I'm wondering if feasable, or even relevant.
SIMILAR QUESTION: ASP.NET MVC & Expression XAML - How do I integrate?
The MVC pattern is in no way limited to HTML representations and although the ASP.NET MVC implementation of that pattern is designed for HTML view engines there's nothing to stop you turning that interfacing into JSON or similar and using a WPF, Silverlight or even WinForms client to access it. Once you get to that point it's more like a rich client accessing a web service but without WCF (although I'm sure that also could be used).
As for actually having a view engine that outputs XAML and then converts to HTML, that is, I believe, virtually impossible. XAML describes capabilities that HTML simply does not have and although I'm sure you could replicate much of that through the use of JQuery and similar libraries I'd have to ask why? Much easier to think in HTML and JQuery then generate a UI that makes the best use of that appropriate technology rather than trying to shoehorn a rich client technology into HTML.

ASP.NET Web UI - Code Generation, Dyanamic Data, Custom Controls?

So the bottom line is that we are working on a large web based project in ASP.NET webforms that is extremely heavy on data editing operations and we are not getting the code reuse that we want out of the presentation layer. We are currently generating a good portion of our DAL and that works great. However, the strategies for standardizing, improving UI development time, and code reuse for the presentation layer are less clear. I have been researching DyanamicData, potential code generation, and writing our own custom controls, but i dont see an obvious place to focus our efforts. Any strong feelings on these directions?
Thanks,
Matt
I have been doing ASP.NET development for several years... and I have yet to see any sort of tool that takes the hassle out of UI work in the same way that code-generation tools can make short work of the DAL. Personally, I don't even use the Visual Studio designer view. Every app is different... and has different UI requirements.
I do have a general rule for doing webforms though... (but it also applies to programming in general, and you probably already use something similar) If I need to do a UI task twice... I cut and paste the code. If I need to do it a third time, it goes into a UserControl.
Are you new to ASP.NET? If so, know that UserControls are your friend... it is the go-to method for presentation layer re-use in ASP.NET. CustomControls are a trickier beast.

Collaboration platform for developers and designers

Recently our newest web designer asked me why we use ASP.NET for our website. Reading through his question to the real one, I started thinking about it myself. Why are we using ASP.NET for web development?
The problem we find so far is colaboration between the design team and developers. Typically our designers create some snazzy cool look crayon laced web pages, then show them off for approval in all their glory. Once approved, the developers rip the HTML out and shove it in to ASP master and detail pages, and huzzah! out comes pretty website.
Since Dreamweaver doesn't play nice with Visual Studio, this is the same process for even small tweaks and changes. I would prefer to just write the backend and let the designers draw the pretty pictures and fancy CSS. Our current websites have plenty of reason to use ASP on nearly every page, so I can't do half in HTML, the other half in ASP.
I have no aversion to doing something else, another language, CMS platform, some other random buzzword, etc...
What are your experiences with this design situation? Are we doing it the hard way? Should we consider alternate platforms and languages? Are there any good, proven ways to allow designers to work on ASP (while still using Dreamweaver)?
Start learning Asp.net MVC as soon as possible. Designers will love you for that. :) And you'll be up to date with new development technologies that will also make your solutions much more robust and less complicated.
But otherwise. Designers should be able to read XHTML fluently. Learning asp.net semantics shouldn't be too hard. Then give then Visual Studio where they can manipulate content. As long as they know how asp.net web forms work things should be fine. They'll probably be able to do majority of things using just CSS. I know I can. Sometimes I do have to check resulting HTML, but it works.
Aside from Wicket (a java web framework), I don't know of any framework or language that would allow designers to continue to work on the design once developers have started to add logic to it.
I would suggest two things though:
Use a MVC framework - ASP.NET MVC, Ruby on Rails, Django, etc since this allows for far more separation of presentation and logic
Keep your presentation layer as stupid as possible and use helpers as much as possible or even better, put the logic in the domain objects. The view should only show or get data with absolutely no logic for processing data, this will keep the pages much more designer friendly.
I find your question very interesting because no matter what kind of technology the project uses the interfaces between the different roles will always cause some friction. I am not sure if there is a technological solution to this communication issue because the designer and developer speak literally different languages.
Depending on the skillset of your designers and developers an additional layer might help you out. I do not know how ASPX works but i am sure there will equivalents to the concepts of other technologies.
In case you have mainly static content which can be expressed in XML than you could provide the backend which delivers the content in XML with a defined Schema and your designers could describe the transformation in XHTML and CSS via XSLT. Given that your designer are capable using XHTML and CSS the addtional effort to learn XML and XSLT is not that huge. I find this solution much powerful than template languages which try to emulate the richness of the serverside scripting language in their own limited constructs. In case you have dynamic elements on the clientside like DHTML, AJAX or you name it you could define your own xml tags which are transformed to richer client side objects after the designer did their work. I guess the designer will understand the usage of these special tags and you provide the proper translation into client side objects.
I used this approach with some coworkes based on PHP. PHP was only the driver for the transformation. The content was assembled into xml with special tags which were transformed into XHTML and CSS via XSLT. Once the objects and the transformation for the different objects is defined you build up a library which can help to shorten the developement cycle of new pages of you webapplication. The benefit of the extra work is, that you designer can change the layout of the page without ever touching you server side code.
Maybe this helps.
Consider using either Expression Web or SharePoint Designer. The latter is now free.
I know you specify dreamweaver, but have you looked at Blend? It plays very nice with Visual Studio and is quite a nice app. to work with.

Feeding .NET MVC Views the jQuery UI way

I've seen a few blog posts and tutorials overviewing mixing in jQuery and the UI elements for Views in a .NET MVC web app. But usually targeted at developers with a comprehensive grasp of the full dev cycle and variations of back/middle tier technologies.
As the front end developer I'm pitching a jQuery-only UI to the back-end dev - he cautions against a non-webforms interface for sake of the code maturity pov.
I'm trying to hit back with "well...it's your pattern ...isn't it elemental to MVC? No logic in the view? I'm reading that to be 'server-side stuff'. You just serialize the properties i'm asking for, or better...let me easily discover what you _can send me...i'll be able to implement the UI via jQuery UI."
So how valid is my position?
Can jQuery's grid be expected to handle at least the bottom 85% of .net's native control (low-to-moderate capacities # of rows)?
How about in-line editing? ...from the grid?
Would working exclusively in Web Services simplify his life at all? and if so, wouldn't that be logical way to build a .net-to-jQuery relationship? - ajax liaisoning twixt server (.net WS methods) and client?
mny thx
--steve...
Don't fight the platform. That way lies pain and suffering.
The MVC view objects are vastly different than asp.net webforms with server controls--you get straight up html. You get jquery and ajax basically for free, with (almost) magic server side ajax call processing.
They are designed to do what you ask. Writing your own jquery ui is reinventing the wheel.
Not only would it be a ton of extra work for no gain. You would be the only developer around trying to do that, and when you needed help, few could offer advice.
If this is an admin interface, and the client has agreed that users must have javascript enabled then I think using javascript to build widgets on the page is a better option than using the asp.net server controls. If however this is a public facing website I would argue that a pure html and css approach is much better, and then use javascript to progressively enhance the page!
Now I dont ever advocate using asp.net server controls, because they spit out poor markup and they are overly complicated to use. Instead I have been using jQuery to do the grunt work and dom querying and traversing. I also dont advocate using jQuery UI because they are missing some very essential widgets, for example no datatable, no treeview etc. I know that there are lots of plugins for jQuery but they are not componentised and therefore each plugin needs to reinvent the wheel to achieve everything it needs. Once you have included all your plugin libraries and css you often end up with a very large page footprint. Also each plugin often has a different home page and documentation that may or may not be up to scratch.
I think that the best UI library is YUI, and you can easily combine it with jQuery. Because each widget is made up from core components the overall weight of download is smaller. Also you have all the documentation in one place with 100's of working examples. Also it means working with the same set of javascript patterns across the board, so with each widget you learn more and more about the library. Hopefully jQuery UI will catch up, but personally I am looking forward to YUI 3 which for me might mean dropping jQuery altogether...
jQuery is a very mature library. It is used by thousands of people across the internet, and I dont think I have ever encountered a bug. YUI is dogfooded by YAHOO so it too is battle hardened.
One thing I did not mention to you is that I am using the default webforms view engine with asp.net mvc. I think it is still the best option as you get intellisense and also Resharper refactoring even searches your views, and the static solution anaylsis can find code errors in your views.
For building my markup I have been using MvcContrib Fluent Html but you could also checkout this article that advocated the DRY principal very well.

Resources