I'm developing a business web application for procurement. I use ASP.NET MVC Core 2.0, EF core 2.0, MSSQL Server. I've been searching for an answer for my question on the Internet for a couple of months but couldn't find one. Lets say i have a document and i want to control permissions for different actions on the document (read, edit, delete, edit doc number, edit different attributes of it, etc.). So i developed some IPermissionControl interface and several classes implementing this interface such as RoleBasedPermissionControl and etc. Now i have a problem. All my business logic is in .Net app, not in Db. So when user opens all permitted documents list all the documents are fetched from the db and checked for permission in the app. It makes a big performance issue, so if db has 1000000 docs, and user has permissions only for 10 of them, it is a bad idea to fetch all of them. How to solve this issue with leaving all the BL in c# app?
Thanks in advance!
Related
I have been tasked with the job of creating a CMS using Symfony 3, which will be offered to various different clients to update their websites. There is one installation for our own use, to control the clients' sites, logins etc. and then another installation which will be the client CMS itself. But it only needs to be a single installation in one place that can be accessed by all clients, via their own personal login.
This means, I would like each client to have their own content stored in a separate database, so essentially there would be one CMS location and installation but hooks up to multiple databases. The database that will be used would be dependent on the client that logs in. As far as they are concerned, it would be their own CMS, with their own data.
I cannot see an obvious way of being able to set this up in Symfony 3, as it uses the parameters.yml file to reference the database setup, and also, how would it know which database to use to persist and flush the content to when it's being saved?
Help on this would be much appreciated.
I think the documentation is crystal clear
http://symfony.com/doc/current/doctrine/multiple_entity_managers.html
Hello we need to develop a web application using Oracle ADF and jdeveloper 12c. This is a big project so we need to develop this application with the help of a team of size 10 members. Our doubt is how we can develop a web application using a team.
Suppose that we have 10 modules. Each module has developed by each member(Each member is using different system with same environment. Jdeveloper 12c). Finally developing all the 10 modules how we can combine all the 10 modules as a single application. How we can modify bindings , page flows and connection details.
Please help.
Thanks in advance.
A comprehensive look at ADF team size and roles you can find on ADF Architecture TV channel.
In terms of architecture, I would suggest SUM of the Parts Pattern:
Simply put, every member can use their own workspace where they will create bounded task flows based on fragments. Then, each of those workspaces will be packaged as ADF Libraries and imported into a MASTER workspace, acting as a portal. One of the most common patterns for implementing Master portal is Dynamic Tabs UI Shell Template Functional UI Pattern
I suggest you watch this to understand ADF large project architecture better, and read this, this and this as well. This book may be of use.
The best approach will be using a version control tool like SVN. Initially, anyone member of the team need to migrate the blank project structure to SVN. later on others can checkout the code and implement their code and after that they can check in the code. The problem here is you have to assume that no 2 developers are working on same file at same time, or else code conflict may happen while committing the code.
Currently, I am also working on a project where some developers are from onshore and some from offshore. So, we use the SVN. Jdevloper itself comes with SVN Client. So no need of installing any SVN client like Tortoise SVN or Smart SVN.
If still you need more information you can reply back.
We are developing a WCF REST service which will be consumed by a desktop WPF application and will also be a source of data for the ASP MVC4 website.
So far I've run into countless technical issues and most importantly I am worried about the future of the Microsoft.OData.EntityFrameworkProvider. (Please check blog comments here).
The issues include:
There is no easy way (without using DTO) to add properties on the service entities which will be passed through OData but won't be stored in the database Actually there is an easy way:
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.ComplexType<CustomType>();
}
There is no easy way (without parsing XML or using DTO) to store properties on client entities without them being sent to the service (v5.6.0). The "hard" way is to hook into RequestPipeline and ResponsePipeline:
Configurations.ResponsePipeline.OnEntryEnded(OnReadingEntry);
Configurations.RequestPipeline.OnEntryEnding(OnWritingEntry);
using DTO is cumbersome to say at least, automapper helps with retrieving of IQueryable results but updating entities requires full implementation of IUpdateable, which actually works on DTO but is required to update entities so implementation of it is very tricky if even possible (I searched for existing solutions and these mostly cover in memory data source so I implemented a working solution but without links, I can dig it from source control if anybody is interested). Tested on v5.6.0.
Client entity containing dynamic field will crash when retrieved from a service (checked on 5.6.1)
accessing DbContext from EntityFrameworkDataServiceProvider requires a hack
This package has not been updated for almost half a year and this fact itself is very worrying.
My question is what Microsoft or open source alternatives to Microsoft.OData.EntityFrameworkProvider link between EF context and a client are suitable to replace this supposedly dead library? The critical requirement for such a link would be to have a tracking client-side context and entity framework 5 or 6 compatible service.
Is Microsoft.AspNet.WebApi.OData a good solution also for desktop applications?
Are there any other Microsoft or open source projects have similar capabilities?
For WCFDS update, you can refer to Future Direction of WCF DS service.
In the issues you listed, I am sure that issue 1 can be easily resolved in web api by tag [IgnoreDataMember], here.
For Issue 2 and 4, one suggestion is you can add a data layer in client, which can handle extra data model and dynamic field
Just a couple of thoughts...REST is not the same as OData...so your question is confusing. If you meant WCF Data Services, then definitely go with the new WebApi. As Maya's link shows, The WCF DS team announced they are basically done.
However, your client is usually agnostic of what technology you are using for odata and its data layer...its a disconnected architecture. So if you have a mapping impedence on the server side, that is one issue, but which client is consuming the odata ought to be irrelevant. But likely I did not understand your stated problem correctly...Do you mean that you own both the client and server and want to share the entity class definitions? If you are that tightly coupled, you can add service resources customized for the client, and others customized for your MVC app.
For some practical workaround, WCF DS offers query interceptors, that let you manipulate outgoing data. The new WebApi is basically works from controllers and gives you full control over intercepting the requests and manipulating what needs to be done with the data.
Finally, just a suggestion for your desktop client...Lightswitch works wonders with oData...point and click...it generates your proxy and client model on the fly and gives you huge control over the client and what it does with the responses from the server.
So, i'm building my first SL application.
I tried to use the MVVM approach, and I think that's the way for me.
Basically, it's a simple application which shows data to the user, the data source is local (maybe in the future will be centric, but right now this is not the case), and the data should be retrieved by:
A. Calling file system's reading
and
B. Method calls from External DLLs
So, as I said, I started to work with MVVM (used this tutorial). I have 3 components: the service, the SL application and the project that host the SL app (excuse me if i'm not using the exact proffecional terms...).
My question is: Do you think that I've chose the right design? if so, is there any way not using IIS to host the service or is it a must? (I don't want to spend time on adminastrative tasks on clients' computers), because as I said, the data is local at the moment and IIS feels unnecessary.
I'll appriciate every comment on this. Thanks!
EDIT:
I'll try to simplify my question: I need my SL app to communicate with some kind of service - that will be able to take requests and reply back to the app.
This service suppose to be able to use .net dlls, and this service should be locally on each client run the app.
EDIT:
I noticed the Self host option.
Does anyone has any experience with it?
If your question is about: You having access to a database server somewhere, you should try WCF RIA Services. This will allow you to create service for each entity and the service will get included into your host project or you can even create a WCF RIA library.
As suppose to your MVVM pattern. I prefer splitting my Views from my ViewModels In different projects. I like to see them as a seperate layer.
Actually using ria services may mean that you have a number of services which apply to one user, but yes they are specific to the user. Which file system would you be attempting to access? The client or the server?
I finally decided to go with XBAP(WPF XAML Browser Application).
It suited perfectly to my requirements:
1. no deployment issues - just press a link, and .net enviroment will do the rest (downloading the needed assemblies, install them and finally run the app)
2. it's hosted on a browser
3. no IIS is needed!! it's a client-only application
I am not sure whether i should call this next big idea but we need to take rapid application development to next level.
Example : I type in google search (assuming i am logged in using google account)
#appspot #myemployeeapp #select name,address from employee where rating >10
Outcome : Should Generate working appengine app
http://myemployeeapp.appspot.com
[this app will automatically generate various screens to create,edit,delete,update employee name,address,rating.
This will revolutionize the way non programmers can generate and organize data with a single query and focus on their business problem.
1.My question to this community : Are there any tools which help me generate UI based on my datastore model or sql query. I want standard UI based on the model and relationships.
Are there any other rapid development tool this community wants to recommend on appengine platform.
Grails with Grails AppEngine plugin, maybe.
I think Grails will be right choice for your requirement. It provide the scaffold view for your domain model.