I just started learning ASP.NET and HTML5, and looking for experts inputs.
I’m exploring the possibility of reusing a .NET C# library (data model) that was previously used in a WPF project (a graphical editor) now being ported to HTML5. At the core, the data model library uses the ObservableCollection and ObservableDictionary class extensively, and relies on CollectionChanged and PropertyChanged events to update the views.
So far I’ve found two ways to access methods on the data model library from Javascript, but still can’t figure out how to deal with the events which are essential to the application.
- Using PageMethods in ASP.NET AJAX
- Convert the .NET library to COM and load activeX object with Javascript
Thanks,
DM
As far as I know there is no easy way to directly relate javascript with any kind of propertychanged handlers, because the page has no lifespan. It is created, sent to the browser and disposed of. Any dynamic work will either need to be done on the DOM (using Javascript) or requested from new pages (either javascript / ajax for seemless approach, or “reloading” the page).
You should take a look at Silverlight if they must have a web based version of this application, as it allows much more than just HTML/Javascript.