I am writing an app which is to be intranet based .I am trying to use silverlight with Ado.net Just like I write my aspx pages. BUt I have not found how to connect datatable generated from my class directly to my silverlight interfaces.
ANy tut that can help me with this.
Silverlight cannot connect to a database directly, it only supports webservice access. Here are two links to get you started:
http://wildermuth.com/2009/09/29/Choosing_a_Data_Access_Layer_for_Silverlight_3
http://www.c-sharpcorner.com/uploadfile/nipuntomar/dataaccesssilverlightenabledwcfservice07152008013110am/dataaccesssilverlightenabledwcfservice.aspx
Or just google "silverlight data access" and you will get plenty of hits.
If you insist on using DataTables, you may take a look at the BindableDataGrid project which includes these.
I however strongly recommend against. A better approach for dynamic data would perhaps be to use some kind of DynamicEntity class.
Related
I have been researching this problem for some time and have seen few references (like this).
I know the Viewer is a Swing component, but I would like to achieve something like integrating/having a container in which to preview reports.
I have not seen any such component default provided by Angular. Has anyone attempted something similar or is it better to create own web components (Polymer-wise perhaps).
Thanks in advance.
Probably this is not really possible, due to reasons above.
Just now saw a related idea/approach: just exporting a report as html and providing to an html rendering container, like angular's ng-bind-html (something like this answer).
For now, just another "two cents" in, though.
I can't say about viewer but yeah it's possibility of visualize.js for your requirement.
With Visualize.js, anyone building a Web application can more easily include powerful analytics as an integrated experience. Developers can embed highly interactive visualizations and reports with more control and power than previously available using iFrames, charting libraries, or using other BI vendor solutions. Visualize.js leverages the REST APIs of the Jaspersoft analytic server for built-in services such as data connectivity, repository access, in-memory analytics, and visualization design. Visualize.js offers on-premises or cloud deployment options and low-cost subscription or utility pricing.
I have Datamodel where I have used a DataSet as my data container.
I have a UI that is created in Silverlight.
I know that in SL 2 we cannot use Dataset. Can we use Dataset in Silverlight 4?
As far as I know, Dataset's aren't directly supported in Silverlight 4. Entity model allows for much more easier form of managing changes and it comes in in-build CRUD operations. Entities works flawlessly with silverlight controls.
Fortunately, there are many workarounds available in the internet for Datasets thought. Here's one of them.
Silverlight does not manage local databases/connections, so DataSet does not exist in Silverlight (including Silverlight 4).
The objects RIA services provide do a good job of manage changes so it would make sense to convert your app to use RIA Services and change your data model to use the RIA objects.
What feature of the DataSet do you require? If you can post a specific example of your data and how it is used we might be able to post a more detailed solution.
I passed the hello world phase in the Silverlight world but I found out that ADO.NET is not part of the party. :_(
I'd like to know what is the easiest method to retrieve tables\rows\single value from SQL Server.
(At the moment I have a very small DB, so simplicity is more important than complicated smart solutions that can handle large amount of data.)
I what to be able to send a query like:
SELECT * FROM a JOIN b....
I found this article which I'm learning at the moment, yet I'd like to know if there are other ways to access the DB.
Thanks
Asaf
Other way is to use WCF RIA service.
You can't access a database directly from a Silverlight application.
The only way is to use some service.
Here you can learn how to do that with RIA service.
As suggested above, use WCF. This means setting up a WCF service on the webserve which does all the SQL magic. You may want to look at LINQ2SQL (obsolete) or Enterprise Framework for accessing database in this service. In Silverlight you just connect to the WCF service and it will be like magic, especially if you use LINQ.
Remember that you must access the same server your Silverlight app was downloaded from. If not there are special rules that apply.
For binding the data and interface Silverlight (and WPF) supports the MVVM model. This model really simplifies GUI implementation and makes it very easy to maintain the code.
I have read most of the literature Google and SO provides on this (correct me if I've missed something).
What I am trying to do is to localize an MVC site using resources, I want the compiletime safety of strongly typed resource files (ResX) but the flexibility of the ASP.NET 2.0 Resource-Provider Model, or something similar to that. I dont mind doing some work but it seems all paths I've researched lead to a dead end.
For displaying localized text in views I can hack together a helper to pull resources from HttpContext.Get(Global|Local)ResourceObject but that gets me nowhere when it comes to model validation and scaffolding, I suppose I could subclass the attributes and provide data but since it means pulling stuff from HttpContext I doubt that is available at the time the attributes are activated.
Since the direction localization in MVC seems to be toward ResX files and away from the 2.0 Resource-Provider model I could try to inject myself in the classes generated by the ResXFileCodeGenerator with a custom ResXFileCodeGenerator to provide my own ResourceProvider but that is terribly hackish involving custom Visual Studio Addins and codegeneration.
So my question is basically, what's the story with flexible MVC localization?
The referenced literature below:
http://adamyan.blogspot.com/2010/02/aspnet-mvc-2-localization-complete.html
http://msdn.microsoft.com/en-us/library/aa905797.aspx
http://www.eworldui.net/blog/post/2008/10/ASPNET-MVC-Simplified-Localization-via-ViewEngines.aspx
http://ryanrivest.com/blog/archive/2010/01/15/reusable-validation-error-message-resource-strings-for-dataannotations.aspx
http://www.codeproject.com/KB/dotnet/ResXFileCodeGeneratorEx.aspx
A resource provider should work fine (i.e. http://msdn.microsoft.com/en-us/library/aa905797.aspx). I've been using this in some projects with a SQL Server backed provider, works fine. It allows you to use all ASP.NET localization features and all the validation attribute translations using resources as well.
Please try a dedicated NuGet package for localization of MVC applications with database resources:
Globsite.Globalization.Mvc
It is built on the native ASP.NET Resource-Provider Model, so it can be integrated with your application in the similar way like standard ResX resources.
What is more, the library allow you to generate Strongly Typed Resources just with a single click, if you need.
The project site with more details:
globsite.net/GlobsiteGlobalizationLibrary
Does anyone know of a simple WPF or Silverlight framework which enables you to e.g. define some database tables in e.g. SQL Server compact database and then the framework automatically creates the Window classes etc. which allows a user to login and edit that data?
I'm not looking for a complicated MVVM pattern example, it can be hard coded, it should just save the developer the time of creating all the CRUD code and forms and authorization necessary for users to edit the data. The developer could define 10 database tables, run the code generation, and then be pretty much 80% finished with any simple database application he wanted to make.
All of that would be generic code so I would think some framework like this would exist or someone would be working on some open source project like this already.
Does anyone know of a framework or tool like this?
It's not Silverlight, but ASP.NET Dynamic Data sounds like it would do what you're asking. It provides a web-based front end for editing database tables.
I've used it for a small project and you can literally have it up and running with CRUD functionality within an hour.
maybe you should take a look at the Sculpture project. There might be something you are looking for.
Since you cannot have direct connection to a database server with Silverlight, you should look at a .NET data access framework using the regular .NET Framework thru a Web Service.