I want to consume OData services and create a smart graph using opensap UI5.
I can set the model and fetch data in a table but for the same data I am unable to create a Smart-graph.
I am able to fetch data from the odata service and represent in a table, I want to represent same data in the smart-graph
The problem with about question is that to create a smart-chat, we need to have annotations coming from our OData service that should tell how the smart chart is rendered. It's not possible to create smart charts with normal OData.
For further details refer this:
https://blogs.sap.com/2018/12/10/an-ui5-smart-chart-app-based-on-actual-server-backed-by-cloud-foundry-on-sap-web-ide/
Related
I am evaluating this devextreme grid for its remote grouping feature. However I am unable to get enough idea on how to form my SQL Server query to support remote grouping. There aren't enough demos available that can help me getting the idea o how to prepare my SQL query to support the remote grouping feature on devextreme datagrid. Has anyone ever worked on that scenario?
I suggest you to read the documentation section for Remote Grouping, It works when you assign a remote data source to the grid control e.g. OData.
The DataGrid widget allows your end users to shape data as needs
dictate. In this example, we demonstrate the use of the built-in data
grouping feature against a remote data source. Data is provided by an
OData service and grid content is grouped by both Country and City
columns. Note that this demo uses the DataGrid in a virtual mode and
loads data on-demand as the grid content is scrolled vertically.
See the reference documentation guide for Data Source Examples.
References:
How to implement a data service for dxDataGrid based on Web API
dxDataGrid - How to display data from WCF OData data service
We are revamping a big enterprise application which has more business workflows. We are using activiti bpm with spring MVC. Currently we are saving the required variables for workflow inside execution individually. My idea is to create object for each workflow and save the object as variable inside activiti execution instead of individual variables.
For example for the job application workflow I will have JobRequest object which have all the requested details like approvers, interviewers, candidate profiles, current status, etc., I will save this object as variable inside activiti. Whenever I need I will just get the object back and show the needed info on the web page. It will be hassle free than maintaining all those information on separate tables and getting the reference alone from activiti.
Is this good approach?
Still I have some concerns on my approach.
If suppose later we add additional fields to the Class. Then how to
handle the history object variables. (In the above example we are
adding additional field under JobRequest.class).
In our current approach if some values really needs to be verified I
can connect to the activiti database and able to see. Because the
variables are saved individually.
Any valuable suggestion?
Say I have a person table in a database. Whenever a new person is added into the database, a pdf will be generated and emailed to someone.
Does this logic go into the model, so all the application does is pass in the data to insert the new person, and the model also handles the pdf and email?
Or does this logic go into the controller?
If this should go into the model, and I am using entity framework, how do I do this? Create a .cs class that wraps the .edmx model?
It is my understanding that you would not want to muck up the controller with that kind of logic. Things that belong in the controller would be defining models that are going to get passed to the view or turning validations on or off. There are several other view related things that the controller should control but that is just a couple. The general point that I am trying to make is that the controller is responsible for populating models by calling services or mocked repositories and then passing those models to the view.
To do what you are explaining I would add a service layer that sits above the data access layer (dal - where your EDMX and repositories sit). Inside that service layer is where I would call the methods or services to generate the pdf and send emails.
The repositories and data access layer should only be concerned with querying the database and retrieving records. That is regardless of what ORM or data access tool you use. the retrieved records are passed to the service layer where you can perform actions against the data (such as validations or sending out pdf's) and then the presentation layer is returned whatever format of the records that it needs to display it in the view. The controller doesn't perform any logical action against the retrieved data but instead just hands it off to the view.
If you would like some more details about the architecture layout that I have described then I would be happy to give you more insight into it.
I have WCF Data service on top of EF (old-fashioned edmx; not code-first) that has millions of rows of data. I am restricting result set to 500 rows. So far, so good!
I want to give the consumer the ability to "drill" into the data. Ideally, consumer code would run something like select distinct Province from my service, user would choose the state, and then code would run select distinct Zip where Province == p (my business domain is very different, but hopefully you get the picture!).
Obviously, I can't get everything and run distinct on the client side. How do I provide this ability in the service? I don't have EntitySet "Provinces" or "Zips" exposed in the service. Should I extend MyEntities class, and try to simulate those sets there? Or is there a simpler way to expose other collections, besides the ones that are automatically exposed from Entity Framework?
I hope the question makes sense...
UPDATE: I think I caused the confusion when I mentioned that I was using WCF service. I actually am using WCF Data Service trying to provide OData wrapper over Entity Framework 4.1. Hopefully, this clarifies the question...
Have you considered dropping your supposedly propietary interafce and going standards?
It is quit easy to expose ODATA from .NET and that allows the user to drill down. THen all you need are some transformations to expose elements like Province or Zip as in a sane data model and there you go ;)
The good thing about OData is that it allows you to easily pass LINQ to the backend and do projections (get me all proovinces from customers where customer name starts with "a") and doesn ot necessarily deal with compelte entities.
I want to use ASP.NET Dynamic Data for my next project, but there is a problem a can't manage to solve. In the database we manage authorization on a per-row basis. For example no user is permitted to see all rows of the Contracts table. So there is a Many to Many Relationship between Contracts and Users. So everytime Dynamic Data performs a Select to show all Contracts it has to look into the ContractUsers junction table to see what contracts the current user is permitted to see (filtered by UserID which will be stored in a session variable). Of course these junction tables should be invisible to the users.
By default Dynamic Data returns all rows of a table, so is it possible to customize this behaviour for every query the user performs?
I want to use Dynamic Data together with LINQ to SQL but if this task would much easier to accomplish using Entity Framework I would look into that too.
Thanks for your help and time.
Implementing such a solution in Dynamic Data it will probably require the creation of a custom Entity Template; not really easy but once done it will not require the creation of custom pages just the editing of the page templates.
I think it will be really usefull to check the excellent work on DD done by S.J.Naughton and presented on his blog.
Greetings, F.
You should not use dynamic data because you need full control over querying and manually write all linq queries to add your data level security. If you still insist on dynamic data be aware that you will still write most of pages yourselves and you will only use dynamic templates. You will have to manually define ever data source and correctly pass where condition to filter results based on logged user.
In addition linq-to-sql is not able to hide junction table and entity framework is able to do that only if junction table contains just two FKs for many-to-many relation. If this table contains any other column you want to use in the application you will have to map it as any other entity and dynamic data will show it as an entity.
Dynamic data are technology for quick creation of simple application where you need to provide access to database through web interface but what you describe is not a simple scenario. You need per record authorization which can differ among entity types.